Skip to content

Commit

Permalink
JDK 21+ Fixes: Build / NullPointerException in JFileChooser with Flat…
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubb13 committed Mar 28, 2024
1 parent cb0adf7 commit 242176c
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<classpathentry exported="true" kind="lib" path="lib/apng-writer/apng-writer-core.jar" sourcepath="lib/apng-writer/apng-writer-core-src.zip"/>
<classpathentry exported="true" kind="lib" path="lib/json/json-20230227.jar" sourcepath="lib/json/JSON-java-20230227.zip"/>
<classpathentry exported="true" kind="lib" path="lib/commonmark/commonmark-0.21.0.jar" sourcepath="lib/commonmark/commonmark-java-commonmark-parent-0.21.0.zip"/>
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-3.1.1.jar" sourcepath="lib/flatlaf/flatlaf-3.1.1-sources.jar">
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-3.4.jar" sourcepath="lib/flatlaf/flatlaf-3.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-3.1.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-3.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-intellij-themes-3.1.1.jar" sourcepath="lib/flatlaf/flatlaf-intellij-themes-3.1.1-sources.jar">
<classpathentry exported="true" kind="lib" path="lib/flatlaf/flatlaf-intellij-themes-3.4.jar" sourcepath="lib/flatlaf/flatlaf-intellij-themes-3.4-sources.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-intellij-themes-3.1.1-javadoc.jar!/"/>
<attribute name="javadoc_location" value="jar:platform:/resource/NearInfinity/lib/flatlaf/flatlaf-intellij-themes-3.4-javadoc.jar!/"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Expand Down
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<property name="apng_writer.file" value="${lib.path.rel}/apng-writer/apng-writer-core.jar"/>
<property name="json.file" value="${lib.path.rel}/json/json-20230227.jar"/>
<property name="commonmark.file" value="${lib.path.rel}/commonmark/commonmark-0.21.0.jar"/>
<property name="flatlaf.file" value="${lib.path.rel}/flatlaf/flatlaf-3.1.1.jar"/>
<property name="flatlafthemes.file" value="${lib.path.rel}/flatlaf/flatlaf-intellij-themes-3.1.1.jar"/>
<property name="flatlaf.file" value="${lib.path.rel}/flatlaf/flatlaf-3.4.jar"/>
<property name="flatlafthemes.file" value="${lib.path.rel}/flatlaf/flatlaf-intellij-themes-3.4.jar"/>
<property name="javacc.home" value="lib/javacc"/>
<property name="parser.path" value="org/infinity/resource/bcs/parser"/>
<property name="src.parser.path" value="${src.path}/org/infinity/resource/bcs/parser"/>
Expand Down
Binary file removed lib/flatlaf/flatlaf-3.1.1-javadoc.jar
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-3.1.1-sources.jar
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-3.1.1.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4-javadoc.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4-sources.jar
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-3.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed lib/flatlaf/flatlaf-intellij-themes-3.1.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added lib/flatlaf/flatlaf-intellij-themes-3.4.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions src/org/infinity/resource/key/ResourceTreeFolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ public synchronized boolean retainAll(Collection<?> c) {
return bRet;
}

/**
* Fixes build on JDK 21+, where both List and SortedSet have a default reversed() method that clashes
*/
public SortedListSet<T> reversed() {
throw new UnsupportedOperationException();
}

/**
* Replaces the element at the specified position in this set with the specified one. The new element will be moved
* to the correct location to preserve the sorted state of the list.
Expand Down

0 comments on commit 242176c

Please sign in to comment.