8356175: Remove unnecessary Map.get from XWM.getInsets

Reviewed-by: tr, aivanov, serb
This commit is contained in:
Andrey Turbanov 2025-05-13 08:10:11 +00:00
parent ad161a4ef8
commit 522c7b446f

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1738,9 +1738,7 @@ final class XWM
correctWM.left = win.scaleUp(correctWM.left);
correctWM.right = win.scaleUp(correctWM.right);
if (storedInsets.get(win.getClass()) == null) {
storedInsets.put(win.getClass(), correctWM);
}
storedInsets.putIfAbsent(win.getClass(), correctWM);
return correctWM;
}
boolean isDesktopWindow( long w ) {