EmptyIcon (int width, int height, boolean preScaled) { if (width != height || width >= 129) { EmptyIcon icon = new EmptyIcon(width, height, true); icon.setIconPreScaled(preScaled); return icon; } return cache.computeIfAbsent(new Pair<>(width, preScaled), __ -> { EmptyIcon icon = new EmptyIcon(width, height, true); icon.setIconPreScaled(preScaled); return icon; }); }