Color (@NotNull String path, @NotNull String colorMode) { Map<String, Color> paletteToColor = myPath2Palette.getOrDefault(colorMode, myPath2Palette.get(DEFAULT_COLOR_MODE)); Color color = paletteToColor.get(path); if (color == null) { LOG.error("No color record for path " + path + ". All paths: " + paletteToColor); color = getDefaultRootColor(); } return color; }