Skip to content

Commit 4f1e5cd

Browse files
committed
IntelliJ Themes: do not release JSON memory to allow re-using theme instance (issue #1020)
1 parent 070cf9c commit 4f1e5cd

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ FlatLaf Change Log
3232
modal dialogs. (issue #1048)
3333
- JideButton, JideToggleButton, JideSplitButton and JideToggleSplitButton: Paint
3434
border in button style `TOOLBAR_STYLE` if in selected state. (issue #1045)
35+
- IntelliJ Themes: Fixed problem when using theme instance more than once when
36+
switching to that theme. (issue #990)
3537

3638

3739
## 3.6.2

flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ public class IntelliJTheme
5858
public final boolean dark;
5959
public final String author;
6060

61-
private Map<String, String> jsonColors;
62-
private Map<String, Object> jsonUI;
63-
private Map<String, Object> jsonIcons;
61+
private final Map<String, String> jsonColors;
62+
private final Map<String, Object> jsonUI;
63+
private final Map<String, Object> jsonIcons;
6464

6565
private Map<String, String> namedColors = Collections.emptyMap();
6666

@@ -276,11 +276,6 @@ private void applyProperties( Properties properties ) {
276276

277277
put( properties, key, value );
278278
}
279-
280-
// let Java release memory
281-
jsonColors = null;
282-
jsonUI = null;
283-
jsonIcons = null;
284279
}
285280

286281
private String get( Properties properties, Map<String, String> themeSpecificProps, String key ) {

0 commit comments

Comments
 (0)