From fd953c6898caa58ea683e230633f9429f69644a7 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 30 Oct 2026 16:28:29 +0100 Subject: [PATCH 1/3] (JDK) Specification version backed by Runtime.Version The Specification object as used by JavaPlatform is now using Runtime.Version to store the JDK version. Existing constructors convert SpecificationVersion into Runtime.Version Assisted-by: qwen3.8-27b --- .../nbproject/project.properties | 2 +- contrib/groovy.grails/nbproject/project.xml | 2 +- .../grails/api/GrailsProjectConfig.java | 2 +- .../j2ee.jboss4/nbproject/project.properties | 2 +- contrib/j2ee.jboss4/nbproject/project.xml | 1 + .../customizer/CustomizerDataSupport.java | 2 +- .../j2ee/jboss4/util/JBProperties.java | 2 +- .../glassfish.common/nbproject/project.xml | 2 +- .../glassfish/common/utils/JavaUtils.java | 4 +- .../glassfish.javaee/nbproject/project.xml | 2 +- .../javaee/ide/Hk2PluginProperties.java | 2 +- .../nbproject/project.properties | 2 +- .../j2ee.clientproject/nbproject/project.xml | 1 + .../modules/j2ee/clientproject/Utils.java | 3 +- .../nbproject/project.properties | 2 +- .../nbproject/project.properties | 2 +- .../nbproject/project.properties | 5 +- .../javaee.project/nbproject/project.xml | 2 +- .../AbstractLogicalViewProvider.java | 2 +- .../nbproject/project.properties | 2 +- .../javaee.wildfly/nbproject/project.xml | 1 + .../customizer/CustomizerDataSupport.java | 2 +- .../wildfly/util/WildFlyProperties.java | 3 +- .../org-netbeans-modules-payara-common.sig | 352 +++++++++++++----- .../nbproject/project.properties | 2 +- .../payara.common/nbproject/project.xml | 2 +- .../payara/common/utils/JavaUtils.java | 3 +- .../nbproject/project.properties | 2 +- .../payara.jakartaee/nbproject/project.xml | 2 +- .../jakartaee/ide/Hk2PluginProperties.java | 2 +- .../nbproject/project.properties | 2 +- .../profiler.j2ee/nbproject/project.xml | 2 +- .../profiler/j2ee/J2EEProfilerSPI.java | 2 +- .../tomcat5/nbproject/project.properties | 2 +- enterprise/tomcat5/nbproject/project.xml | 1 + .../customizer/CustomizerDataSupport.java | 2 +- .../tomcat5/util/TomcatProperties.java | 3 +- .../web.project/nbproject/project.properties | 2 +- .../nbproject/project.xml | 2 +- .../debugger/jpda/truffle/MIMETypes.java | 4 +- java/gradle.java/nbproject/project.xml | 2 +- .../gradle/java/execute/JavaRunUtils.java | 2 +- java/java.api.common/nbproject/project.xml | 2 +- .../java/api/common/ui/PlatformUiSupport.java | 4 +- .../api/common/util/CommonProjectUtils.java | 2 +- java/java.j2seembedded/build.xml | 2 +- .../nbproject/project.properties | 6 +- java/java.j2seembedded/nbproject/project.xml | 2 +- .../RemoteRuntimePlatformProvider.java | 2 +- .../java/j2seembedded/project/Utilities.java | 3 +- java/java.j2seplatform/nbproject/project.xml | 2 +- .../modules/java/j2seplatform/UpdateTask.java | 3 +- .../J2SEPlatformSourceJavadocAttacher.java | 2 +- java/java.platform/apichanges.xml | 28 +- .../org-netbeans-modules-java-platform.sig | 24 +- .../nbproject/project.properties | 2 +- .../api/java/platform/Specification.java | 187 +++++++++- .../platform/JavaPlatformManagerTest.java | 16 +- .../api/java/platform/SpecificationTest.java | 100 +++++ java/java.project.ui/nbproject/project.xml | 2 +- .../modules/java/project/ui/FixPlatform.java | 6 +- .../project/ui/FixProjectSourceLevel.java | 6 +- .../project/ui/ProjectProblemsProviders.java | 2 +- java/java.project/nbproject/project.xml | 2 +- .../java/project/support/ProjectPlatform.java | 3 +- java/maven/nbproject/project.xml | 2 +- .../maven/classpath/AbstractBootPathImpl.java | 2 +- .../maven/customizer/CompilePanel.java | 2 +- .../nbproject/project.properties | 2 +- javafx/javafx2.platform/nbproject/project.xml | 2 +- .../platform/JavaFXPlatformJavadoc.java | 4 +- .../nbproject/project.properties | 2 +- javafx/javafx2.project/nbproject/project.xml | 2 +- .../project/ChooseOtherPlatformPanel.java | 2 +- profiler/profiler.j2se/nbproject/project.xml | 2 +- .../J2SEProjectProfilingSupportProvider.java | 2 +- .../profiler.nbimpl/nbproject/project.xml | 2 +- .../providers/JavaPlatformManagerImpl.java | 4 +- .../nbproject/project.properties | 2 +- .../profiler.nbmodule/nbproject/project.xml | 2 +- ...ModuleProjectProfilingSupportProvider.java | 2 +- .../nbproject/project.xml | 2 +- .../utilities/AppletSupport.java | 2 +- 83 files changed, 679 insertions(+), 210 deletions(-) create mode 100644 java/java.platform/test/unit/src/org/netbeans/api/java/platform/SpecificationTest.java diff --git a/contrib/groovy.grails/nbproject/project.properties b/contrib/groovy.grails/nbproject/project.properties index 95b039d0d17d..13610530fdbf 100644 --- a/contrib/groovy.grails/nbproject/project.properties +++ b/contrib/groovy.grails/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.8 +javac.release=21 nbm.homepage=http://wiki.netbeans.org/groovy nbm.module.author=Martin Adamek, Petr Hejl, Matthias Schmidt diff --git a/contrib/groovy.grails/nbproject/project.xml b/contrib/groovy.grails/nbproject/project.xml index 87264f799b79..ecf44eb751d2 100644 --- a/contrib/groovy.grails/nbproject/project.xml +++ b/contrib/groovy.grails/nbproject/project.xml @@ -57,7 +57,7 @@ 1 - 1.11 + 1.77 diff --git a/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsProjectConfig.java b/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsProjectConfig.java index b89c6776fce8..f605db93300e 100644 --- a/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsProjectConfig.java +++ b/contrib/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsProjectConfig.java @@ -245,7 +245,7 @@ public JavaPlatform getJavaPlatform() { return JavaPlatform.getDefault(); } - JavaPlatform[] platforms = PLATFORM_MANAGER.getPlatforms(null, new Specification("j2se", null)); //NOI18N + JavaPlatform[] platforms = PLATFORM_MANAGER.getPlatforms(null, new Specification("j2se")); //NOI18N for (JavaPlatform platform : platforms) { if (platform.getInstallFolders().size() > 0) { String antName = platform.getProperties().get("platform.ant.name"); //NOI18N diff --git a/contrib/j2ee.jboss4/nbproject/project.properties b/contrib/j2ee.jboss4/nbproject/project.properties index c56d0ef3b085..5d1da9ed8b38 100644 --- a/contrib/j2ee.jboss4/nbproject/project.properties +++ b/contrib/j2ee.jboss4/nbproject/project.properties @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. -javac.source=1.8 +javac.release=21 #javac.compilerargs=-Xlint:unchecked diff --git a/contrib/j2ee.jboss4/nbproject/project.xml b/contrib/j2ee.jboss4/nbproject/project.xml index 4f056666e479..ad78813d5053 100644 --- a/contrib/j2ee.jboss4/nbproject/project.xml +++ b/contrib/j2ee.jboss4/nbproject/project.xml @@ -138,6 +138,7 @@ 1 + 1.77 diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/customizer/CustomizerDataSupport.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/customizer/CustomizerDataSupport.java index e77667ed6175..edce00badced 100644 --- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/customizer/CustomizerDataSupport.java +++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/customizer/CustomizerDataSupport.java @@ -146,7 +146,7 @@ public void loadJvmModel() { jvmModel.removeAllElements(); // feed the combo with sorted platform list - JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N JavaPlatformAdapter[] platformAdapters = new JavaPlatformAdapter[j2sePlatforms.length]; for (int i = 0; i < platformAdapters.length; i++) { platformAdapters[i] = new JavaPlatformAdapter(j2sePlatforms[i]); diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/util/JBProperties.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/util/JBProperties.java index a9f253dba67e..7be51e2a7b02 100644 --- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/util/JBProperties.java +++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/util/JBProperties.java @@ -161,7 +161,7 @@ public void setProxyEnabled(boolean enabled) { public JavaPlatform getJavaPlatform() { String currentJvm = ip.getProperty(PROP_JAVA_PLATFORM); JavaPlatformManager jpm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String platformName = (String)installedPlatforms[i].getProperties().get(PLAT_PROP_ANT_NAME); if (platformName != null && platformName.equals(currentJvm)) { diff --git a/enterprise/glassfish.common/nbproject/project.xml b/enterprise/glassfish.common/nbproject/project.xml index 9092bd155290..fe8b1406d4b4 100644 --- a/enterprise/glassfish.common/nbproject/project.xml +++ b/enterprise/glassfish.common/nbproject/project.xml @@ -102,7 +102,7 @@ 1 - 1.36 + 1.77 diff --git a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/utils/JavaUtils.java b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/utils/JavaUtils.java index 2ef06239aaac..49bd40d955ee 100644 --- a/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/utils/JavaUtils.java +++ b/enterprise/glassfish.common/src/org/netbeans/modules/glassfish/common/utils/JavaUtils.java @@ -71,9 +71,7 @@ public class JavaUtils { * @return Installed Java SE platforms. */ public static JavaPlatform[] getInstalledJavaSEPlatforms() { - return JavaPlatformManager.getDefault() - .getPlatforms(null, new Specification( - JAVA_SE_SPECIFICATION_NAME, null)); + return JavaPlatformManager.getDefault().getPlatforms(null, new Specification(JAVA_SE_SPECIFICATION_NAME)); } /** diff --git a/enterprise/glassfish.javaee/nbproject/project.xml b/enterprise/glassfish.javaee/nbproject/project.xml index 63d81a550576..2c1e0110233a 100644 --- a/enterprise/glassfish.javaee/nbproject/project.xml +++ b/enterprise/glassfish.javaee/nbproject/project.xml @@ -184,7 +184,7 @@ 1 - 1.10 + 1.77 diff --git a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2PluginProperties.java b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2PluginProperties.java index 6b0ac3303325..3c2e39059b23 100644 --- a/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2PluginProperties.java +++ b/enterprise/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/ide/Hk2PluginProperties.java @@ -98,7 +98,7 @@ public String getGlassfishRoot() { public JavaPlatform getJavaPlatform() { String currentJvm = ip.getProperty(PROP_JAVA_PLATFORM); JavaPlatformManager jpm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String platformName = installedPlatforms[i].getProperties().get(PLAT_PROP_ANT_NAME); diff --git a/enterprise/j2ee.clientproject/nbproject/project.properties b/enterprise/j2ee.clientproject/nbproject/project.properties index a6e969982f5c..06a4340087e2 100644 --- a/enterprise/j2ee.clientproject/nbproject/project.properties +++ b/enterprise/j2ee.clientproject/nbproject/project.properties @@ -19,7 +19,7 @@ spec.version.base=1.81.0 javadoc.arch=${basedir}/arch.xml javadoc.preview=true javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.8 +javac.release=21 test.config.stableBTD.includes=**/*Test.class test.config.stableBTD.excludes=\ diff --git a/enterprise/j2ee.clientproject/nbproject/project.xml b/enterprise/j2ee.clientproject/nbproject/project.xml index 6f18c918aa45..e557fc9c8e71 100644 --- a/enterprise/j2ee.clientproject/nbproject/project.xml +++ b/enterprise/j2ee.clientproject/nbproject/project.xml @@ -203,6 +203,7 @@ 1 + 1.77 diff --git a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/Utils.java b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/Utils.java index 37fa15e8fd40..722904ef6b6d 100644 --- a/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/Utils.java +++ b/enterprise/j2ee.clientproject/src/org/netbeans/modules/j2ee/clientproject/Utils.java @@ -37,6 +37,7 @@ import org.openide.WizardDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; + import org.openide.util.NbBundle; import org.openide.util.Parameters; @@ -174,7 +175,7 @@ public static JavaPlatform getActivePlatform (final String activePlatformId) { return pm.getDefaultPlatform(); } else { - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se",null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se")); //NOI18N for (int i=0; i 1 - 1.32 + 1.77 diff --git a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/logicalview/AbstractLogicalViewProvider.java b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/logicalview/AbstractLogicalViewProvider.java index 7877deaf47e0..efcdf115d786 100644 --- a/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/logicalview/AbstractLogicalViewProvider.java +++ b/enterprise/javaee.project/src/org/netbeans/modules/javaee/project/api/ant/ui/logicalview/AbstractLogicalViewProvider.java @@ -448,7 +448,7 @@ public static JavaPlatform getActivePlatform (final String activePlatformId) { return pm.getDefaultPlatform(); } else { - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se",null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se")); //NOI18N for (JavaPlatform p : installedPlatforms) { String antName = p.getProperties().get("platform.ant.name"); // NOI18N if (antName != null && antName.equals(activePlatformId)) { diff --git a/enterprise/javaee.wildfly/nbproject/project.properties b/enterprise/javaee.wildfly/nbproject/project.properties index 48794b935d37..d72bea022f3a 100644 --- a/enterprise/javaee.wildfly/nbproject/project.properties +++ b/enterprise/javaee.wildfly/nbproject/project.properties @@ -21,7 +21,7 @@ auxiliary.de-markiewb-netbeans-plugins-eclipse-formatter.eclipseFormatterLocatio auxiliary.de-markiewb-netbeans-plugins-eclipse-formatter.enableFormatAsSaveAction=false auxiliary.de-markiewb-netbeans-plugins-eclipse-formatter.showNotifications=true auxiliary.de-markiewb-netbeans-plugins-eclipse-formatter.useProjectSettings=false -javac.source=1.8 +javac.release=21 #javac.compilerargs=-Xlint:unchecked diff --git a/enterprise/javaee.wildfly/nbproject/project.xml b/enterprise/javaee.wildfly/nbproject/project.xml index 86efebb88681..6009f36f5da2 100644 --- a/enterprise/javaee.wildfly/nbproject/project.xml +++ b/enterprise/javaee.wildfly/nbproject/project.xml @@ -155,6 +155,7 @@ 1 + 1.77 diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/customizer/CustomizerDataSupport.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/customizer/CustomizerDataSupport.java index c7d741328c61..4778fb6ba9ef 100644 --- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/customizer/CustomizerDataSupport.java +++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/customizer/CustomizerDataSupport.java @@ -146,7 +146,7 @@ public void loadJvmModel() { jvmModel.removeAllElements(); // feed the combo with sorted platform list - JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N JavaPlatformAdapter[] platformAdapters = new JavaPlatformAdapter[j2sePlatforms.length]; for (int i = 0; i < platformAdapters.length; i++) { platformAdapters[i] = new JavaPlatformAdapter(j2sePlatforms[i]); diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/util/WildFlyProperties.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/util/WildFlyProperties.java index 711855ee3566..27c19b8cd473 100644 --- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/util/WildFlyProperties.java +++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/util/WildFlyProperties.java @@ -47,6 +47,7 @@ import org.openide.filesystems.FileUtil; import org.openide.filesystems.URLMapper; import org.openide.modules.InstalledFileLocator; + import org.openide.util.NbCollections; /** @@ -176,7 +177,7 @@ public void setProxyEnabled(boolean enabled) { public JavaPlatform getJavaPlatform() { String currentJvm = ip.getProperty(PROP_JAVA_PLATFORM); JavaPlatformManager jpm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String platformName = (String) installedPlatforms[i].getProperties().get(PLAT_PROP_ANT_NAME); if (platformName != null && platformName.equals(currentJvm)) { diff --git a/enterprise/payara.common/nbproject/org-netbeans-modules-payara-common.sig b/enterprise/payara.common/nbproject/org-netbeans-modules-payara-common.sig index c12d586ac3e1..628b859dfdf9 100644 --- a/enterprise/payara.common/nbproject/org-netbeans-modules-payara-common.sig +++ b/enterprise/payara.common/nbproject/org-netbeans-modules-payara-common.sig @@ -1,5 +1,5 @@ #Signature file v4.1 -#Version 2.28 +#Version 2.30 CLSS public abstract java.awt.Component cons protected init() @@ -17,6 +17,7 @@ intf java.awt.MenuContainer intf java.awt.image.ImageObserver intf java.io.Serializable meth protected boolean requestFocus(boolean) +meth protected boolean requestFocus(boolean,java.awt.event.FocusEvent$Cause) meth protected boolean requestFocusInWindow(boolean) meth protected final void disableEvents(long) meth protected final void enableEvents(long) @@ -37,20 +38,20 @@ meth protected void processMouseMotionEvent(java.awt.event.MouseEvent) meth protected void processMouseWheelEvent(java.awt.event.MouseWheelEvent) meth public <%0 extends java.util.EventListener> {%%0}[] getListeners(java.lang.Class<{%%0}>) meth public boolean action(java.awt.Event,java.lang.Object) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean areFocusTraversalKeysSet(int) meth public boolean contains(int,int) meth public boolean contains(java.awt.Point) meth public boolean getFocusTraversalKeysEnabled() meth public boolean getIgnoreRepaint() meth public boolean gotFocus(java.awt.Event,java.lang.Object) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean handleEvent(java.awt.Event) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean hasFocus() meth public boolean imageUpdate(java.awt.Image,int,int,int,int,int) meth public boolean inside(int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean isBackgroundSet() meth public boolean isCursorSet() meth public boolean isDisplayable() @@ -59,7 +60,7 @@ meth public boolean isEnabled() meth public boolean isFocusCycleRoot(java.awt.Container) meth public boolean isFocusOwner() meth public boolean isFocusTraversable() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean isFocusable() meth public boolean isFontSet() meth public boolean isForegroundSet() @@ -72,28 +73,29 @@ meth public boolean isShowing() meth public boolean isValid() meth public boolean isVisible() meth public boolean keyDown(java.awt.Event,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean keyUp(java.awt.Event,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean lostFocus(java.awt.Event,java.lang.Object) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseDown(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseDrag(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseEnter(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseExit(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseMove(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean mouseUp(java.awt.Event,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean postEvent(java.awt.Event) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean prepareImage(java.awt.Image,int,int,java.awt.image.ImageObserver) meth public boolean prepareImage(java.awt.Image,java.awt.image.ImageObserver) meth public boolean requestFocusInWindow() +meth public boolean requestFocusInWindow(java.awt.event.FocusEvent$Cause) meth public final java.lang.Object getTreeLock() meth public final void dispatchEvent(java.awt.AWTEvent) meth public float getAlignmentX() @@ -110,7 +112,7 @@ meth public java.awt.Color getForeground() meth public java.awt.Component getComponentAt(int,int) meth public java.awt.Component getComponentAt(java.awt.Point) meth public java.awt.Component locate(int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Component$BaselineResizeBehavior getBaselineResizeBehavior() meth public java.awt.ComponentOrientation getComponentOrientation() meth public java.awt.Container getFocusCycleRootAncestor() @@ -122,11 +124,11 @@ meth public java.awt.Dimension getPreferredSize() meth public java.awt.Dimension getSize() meth public java.awt.Dimension getSize(java.awt.Dimension) meth public java.awt.Dimension minimumSize() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Dimension preferredSize() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Dimension size() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Font getFont() meth public java.awt.FontMetrics getFontMetrics(java.awt.Font) meth public java.awt.Graphics getGraphics() @@ -138,9 +140,9 @@ meth public java.awt.Point getLocation(java.awt.Point) meth public java.awt.Point getLocationOnScreen() meth public java.awt.Point getMousePosition() meth public java.awt.Point location() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Rectangle bounds() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Rectangle getBounds() meth public java.awt.Rectangle getBounds(java.awt.Rectangle) meth public java.awt.Toolkit getToolkit() @@ -181,14 +183,14 @@ meth public void addPropertyChangeListener(java.beans.PropertyChangeListener) meth public void addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) meth public void applyComponentOrientation(java.awt.ComponentOrientation) meth public void deliverEvent(java.awt.Event) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void disable() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void doLayout() meth public void enable() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void enable(boolean) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void enableInputMethods(boolean) meth public void firePropertyChange(java.lang.String,byte,byte) meth public void firePropertyChange(java.lang.String,char,char) @@ -197,19 +199,19 @@ meth public void firePropertyChange(java.lang.String,float,float) meth public void firePropertyChange(java.lang.String,long,long) meth public void firePropertyChange(java.lang.String,short,short) meth public void hide() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void invalidate() meth public void layout() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void list() meth public void list(java.io.PrintStream) meth public void list(java.io.PrintStream,int) meth public void list(java.io.PrintWriter) meth public void list(java.io.PrintWriter,int) meth public void move(int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void nextFocus() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void paint(java.awt.Graphics) meth public void paintAll(java.awt.Graphics) meth public void print(java.awt.Graphics) @@ -232,12 +234,13 @@ meth public void repaint(int,int,int,int) meth public void repaint(long) meth public void repaint(long,int,int,int,int) meth public void requestFocus() +meth public void requestFocus(java.awt.event.FocusEvent$Cause) meth public void reshape(int,int,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void resize(int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void resize(java.awt.Dimension) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void revalidate() meth public void setBackground(java.awt.Color) meth public void setBounds(int,int,int,int) @@ -257,21 +260,24 @@ meth public void setLocation(int,int) meth public void setLocation(java.awt.Point) meth public void setMaximumSize(java.awt.Dimension) meth public void setMinimumSize(java.awt.Dimension) +meth public void setMixingCutoutShape(java.awt.Shape) meth public void setName(java.lang.String) meth public void setPreferredSize(java.awt.Dimension) meth public void setSize(int,int) meth public void setSize(java.awt.Dimension) meth public void setVisible(boolean) meth public void show() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void show(boolean) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void transferFocus() meth public void transferFocusBackward() meth public void transferFocusUpCycle() meth public void update(java.awt.Graphics) meth public void validate() supr java.lang.Object +hfds FOCUS_TRAVERSABLE_DEFAULT,FOCUS_TRAVERSABLE_SET,FOCUS_TRAVERSABLE_UNKNOWN,LOCK,acc,actionListenerK,adjustmentListenerK,appContext,autoFocusTransferOnDisposal,background,backgroundEraseDisabled,boundsOp,bufferStrategy,changeSupport,coalesceEventsParams,coalesceMap,coalescingEnabled,componentListener,componentListenerK,componentOrientation,componentSerializedDataVersion,compoundShape,containerListenerK,cursor,dropTarget,enabled,eventCache,eventLog,eventMask,focusListener,focusListenerK,focusLog,focusTraversalKeyPropertyNames,focusTraversalKeys,focusTraversalKeysEnabled,focusable,font,foreground,graphicsConfig,height,hierarchyBoundsListener,hierarchyBoundsListenerK,hierarchyListener,hierarchyListenerK,ignoreRepaint,incRate,inputMethodListener,inputMethodListenerK,isAddNotifyComplete,isFocusTraversableOverridden,isInc,isPacked,itemListenerK,keyListener,keyListenerK,locale,log,maxSize,maxSizeSet,minSize,minSizeSet,mixingCutoutRegion,mixingLog,mouseListener,mouseListenerK,mouseMotionListener,mouseMotionListenerK,mouseWheelListener,mouseWheelListenerK,name,nameExplicitlySet,newEventsOnly,objectLock,ownedWindowK,parent,peer,peerFont,popups,prefSize,prefSizeSet,requestFocusController,serialVersionUID,textListenerK,valid,visible,width,windowFocusListenerK,windowListenerK,windowStateListenerK,x,y +hcls AWTTreeLock,BltSubRegionBufferStrategy,DummyRequestFocusController,FlipSubRegionBufferStrategy,ProxyCapabilities,SingleBufferStrategy CLSS public java.awt.Container cons public init() @@ -293,7 +299,7 @@ meth public final void setFocusTraversalPolicyProvider(boolean) meth public float getAlignmentX() meth public float getAlignmentY() meth public int countComponents() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public int getComponentCount() meth public int getComponentZOrder(java.awt.Component) meth public java.awt.Component add(java.awt.Component) @@ -305,19 +311,19 @@ meth public java.awt.Component getComponent(int) meth public java.awt.Component getComponentAt(int,int) meth public java.awt.Component getComponentAt(java.awt.Point) meth public java.awt.Component locate(int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Component[] getComponents() meth public java.awt.Dimension getMaximumSize() meth public java.awt.Dimension getMinimumSize() meth public java.awt.Dimension getPreferredSize() meth public java.awt.Dimension minimumSize() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Dimension preferredSize() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.FocusTraversalPolicy getFocusTraversalPolicy() meth public java.awt.Insets getInsets() meth public java.awt.Insets insets() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.LayoutManager getLayout() meth public java.awt.Point getMousePosition(boolean) meth public java.awt.event.ContainerListener[] getContainerListeners() @@ -330,11 +336,11 @@ meth public void addPropertyChangeListener(java.beans.PropertyChangeListener) meth public void addPropertyChangeListener(java.lang.String,java.beans.PropertyChangeListener) meth public void applyComponentOrientation(java.awt.ComponentOrientation) meth public void deliverEvent(java.awt.Event) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void doLayout() meth public void invalidate() meth public void layout() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void list(java.io.PrintStream,int) meth public void list(java.io.PrintWriter,int) meth public void paint(java.awt.Graphics) @@ -356,6 +362,8 @@ meth public void transferFocusDownCycle() meth public void update(java.awt.Graphics) meth public void validate() supr java.awt.Component +hfds EMPTY_ARRAY,INCLUDE_SELF,SEARCH_HEAVYWEIGHTS,component,containerListener,containerSerializedDataVersion,descendUnconditionallyWhenValidating,descendantsCount,dispatcher,eventLog,focusCycleRoot,focusTraversalPolicy,focusTraversalPolicyProvider,isJavaAwtSmartInvalidate,layoutMgr,listeningBoundsChildren,listeningChildren,log,mixingLog,modalAppContext,modalComp,numOfHWComponents,numOfLWComponents,preserveBackgroundColor,printing,printingThreads,serialPersistentFields,serialVersionUID +hcls DropTargetEventTargetFilter,EventTargetFilter,MouseEventTargetFilter,WakingRunnable CLSS public abstract interface java.awt.ItemSelectable meth public abstract java.lang.Object[] getSelectedObjects() @@ -364,7 +372,7 @@ meth public abstract void removeItemListener(java.awt.event.ItemListener) CLSS public abstract interface java.awt.MenuContainer meth public abstract boolean postEvent(java.awt.Event) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public abstract java.awt.Font getFont() meth public abstract void remove(java.awt.MenuComponent) @@ -402,6 +410,16 @@ meth public void setPreferred(boolean) meth public void setShortDescription(java.lang.String) meth public void setValue(java.lang.String,java.lang.Object) supr java.lang.Object +hfds TRANSIENT,classRef,displayName,expert,hidden,name,preferred,shortDescription,table + +CLSS public abstract interface !annotation java.beans.JavaBean + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String defaultEventSet() +meth public abstract !hasdefault java.lang.String defaultProperty() +meth public abstract !hasdefault java.lang.String description() CLSS public abstract interface java.io.Externalizable intf java.io.Serializable @@ -418,24 +436,31 @@ meth public abstract int compareTo({java.lang.Comparable%0}) CLSS public abstract interface !annotation java.lang.Deprecated anno 0 java.lang.annotation.Documented() anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) - anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE]) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>> cons protected init(java.lang.String,int) +innr public final static EnumDesc intf java.io.Serializable intf java.lang.Comparable<{java.lang.Enum%0}> +intf java.lang.constant.Constable meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException meth protected final void finalize() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="18") meth public final boolean equals(java.lang.Object) meth public final int compareTo({java.lang.Enum%0}) meth public final int hashCode() meth public final int ordinal() meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass() meth public final java.lang.String name() +meth public final java.util.Optional> describeConstable() meth public java.lang.String toString() meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String) supr java.lang.Object +hfds hash,name,ordinal CLSS public java.lang.Exception cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) @@ -444,6 +469,7 @@ cons public init(java.lang.String) cons public init(java.lang.String,java.lang.Throwable) cons public init(java.lang.Throwable) supr java.lang.Throwable +hfds serialVersionUID CLSS public abstract interface !annotation java.lang.FunctionalInterface anno 0 java.lang.annotation.Documented() @@ -455,6 +481,7 @@ CLSS public java.lang.Object cons public init() meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="9") meth public boolean equals(java.lang.Object) meth public final java.lang.Class getClass() meth public final void notify() @@ -477,10 +504,12 @@ cons public init(java.lang.String) cons public init(java.lang.ThreadGroup,java.lang.Runnable) cons public init(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String) cons public init(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String,long) +cons public init(java.lang.ThreadGroup,java.lang.Runnable,java.lang.String,long,boolean) cons public init(java.lang.ThreadGroup,java.lang.String) fld public final static int MAX_PRIORITY = 10 fld public final static int MIN_PRIORITY = 1 fld public final static int NORM_PRIORITY = 5 +innr public abstract interface static Builder innr public abstract interface static UncaughtExceptionHandler innr public final static !enum State intf java.lang.Runnable @@ -488,52 +517,60 @@ meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedExcept meth public boolean isInterrupted() meth public final boolean isAlive() meth public final boolean isDaemon() +meth public final boolean isVirtual() +meth public final boolean join(java.time.Duration) throws java.lang.InterruptedException meth public final int getPriority() meth public final java.lang.String getName() meth public final java.lang.ThreadGroup getThreadGroup() +meth public final long threadId() meth public final void checkAccess() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="17") meth public final void join() throws java.lang.InterruptedException meth public final void join(long) throws java.lang.InterruptedException meth public final void join(long,int) throws java.lang.InterruptedException meth public final void resume() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="1.2") meth public final void setDaemon(boolean) meth public final void setName(java.lang.String) meth public final void setPriority(int) meth public final void stop() - anno 0 java.lang.Deprecated() -meth public final void stop(java.lang.Throwable) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="1.2") meth public final void suspend() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="1.2") meth public int countStackFrames() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="1.2") meth public java.lang.ClassLoader getContextClassLoader() meth public java.lang.StackTraceElement[] getStackTrace() meth public java.lang.String toString() meth public java.lang.Thread$State getState() meth public java.lang.Thread$UncaughtExceptionHandler getUncaughtExceptionHandler() meth public long getId() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="19") meth public static boolean holdsLock(java.lang.Object) meth public static boolean interrupted() meth public static int activeCount() meth public static int enumerate(java.lang.Thread[]) meth public static java.lang.Thread currentThread() +meth public static java.lang.Thread startVirtualThread(java.lang.Runnable) +meth public static java.lang.Thread$Builder$OfPlatform ofPlatform() +meth public static java.lang.Thread$Builder$OfVirtual ofVirtual() meth public static java.lang.Thread$UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() meth public static java.util.Map getAllStackTraces() meth public static void dumpStack() +meth public static void onSpinWait() meth public static void setDefaultUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler) +meth public static void sleep(java.time.Duration) throws java.lang.InterruptedException meth public static void sleep(long) throws java.lang.InterruptedException meth public static void sleep(long,int) throws java.lang.InterruptedException meth public static void yield() -meth public void destroy() - anno 0 java.lang.Deprecated() meth public void interrupt() meth public void run() meth public void setContextClassLoader(java.lang.ClassLoader) meth public void setUncaughtExceptionHandler(java.lang.Thread$UncaughtExceptionHandler) meth public void start() supr java.lang.Object +hfds EMPTY_STACK_TRACE,NEW_THREAD_BINDINGS,NO_INHERIT_THREAD_LOCALS,cont,container,contextClassLoader,defaultUncaughtExceptionHandler,eetop,headStackableScopes,holder,inheritableThreadLocals,inheritedAccessControlContext,interruptLock,interrupted,name,nioBlocker,parkBlocker,scopedValueBindings,threadLocalRandomProbe,threadLocalRandomSecondarySeed,threadLocalRandomSeed,threadLocals,tid,uncaughtExceptionHandler +hcls Caches,Constants,FieldHolder,ThreadIdentifiers,ThreadNumbering CLSS public java.lang.Throwable cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) @@ -556,6 +593,8 @@ meth public void printStackTrace(java.io.PrintStream) meth public void printStackTrace(java.io.PrintWriter) meth public void setStackTrace(java.lang.StackTraceElement[]) supr java.lang.Object +hfds CAUSE_CAPTION,EMPTY_THROWABLE_ARRAY,NULL_CAUSE_MESSAGE,SELF_SUPPRESSION_MESSAGE,SUPPRESSED_CAPTION,SUPPRESSED_SENTINEL,UNASSIGNED_STACK,backtrace,cause,depth,detailMessage,serialVersionUID,stackTrace,suppressedExceptions +hcls PrintStreamOrWriter,SentinelHolder,WrappedPrintStream,WrappedPrintWriter CLSS public abstract interface java.lang.annotation.Annotation meth public abstract boolean equals(java.lang.Object) @@ -583,6 +622,9 @@ CLSS public abstract interface !annotation java.lang.annotation.Target intf java.lang.annotation.Annotation meth public abstract java.lang.annotation.ElementType[] value() +CLSS public abstract interface java.lang.constant.Constable +meth public abstract java.util.Optional describeConstable() + CLSS public abstract java.net.Authenticator cons public init() innr public final static !enum RequestorType @@ -595,11 +637,15 @@ meth protected final java.net.InetAddress getRequestingSite() meth protected java.net.Authenticator$RequestorType getRequestorType() meth protected java.net.PasswordAuthentication getPasswordAuthentication() meth protected java.net.URL getRequestingURL() +meth public java.net.PasswordAuthentication requestPasswordAuthenticationInstance(java.lang.String,java.net.InetAddress,int,java.lang.String,java.lang.String,java.lang.String,java.net.URL,java.net.Authenticator$RequestorType) +meth public static java.net.Authenticator getDefault() meth public static java.net.PasswordAuthentication requestPasswordAuthentication(java.lang.String,java.net.InetAddress,int,java.lang.String,java.lang.String,java.lang.String) meth public static java.net.PasswordAuthentication requestPasswordAuthentication(java.lang.String,java.net.InetAddress,int,java.lang.String,java.lang.String,java.lang.String,java.net.URL,java.net.Authenticator$RequestorType) +meth public static java.net.PasswordAuthentication requestPasswordAuthentication(java.net.Authenticator,java.lang.String,java.net.InetAddress,int,java.lang.String,java.lang.String,java.lang.String,java.net.URL,java.net.Authenticator$RequestorType) meth public static java.net.PasswordAuthentication requestPasswordAuthentication(java.net.InetAddress,int,java.lang.String,java.lang.String,java.lang.String) meth public static void setDefault(java.net.Authenticator) supr java.lang.Object +hfds requestingAuthType,requestingHost,requestingPort,requestingPrompt,requestingProtocol,requestingScheme,requestingSite,requestingURL,theAuthenticator CLSS public abstract interface java.util.Comparator<%0 extends java.lang.Object> anno 0 java.lang.FunctionalInterface() @@ -626,6 +672,8 @@ CLSS public abstract interface java.util.EventListener CLSS public abstract interface java.util.Map<%0 extends java.lang.Object, %1 extends java.lang.Object> innr public abstract interface static Entry +meth public !varargs static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> ofEntries(java.util.Map$Entry[]) + anno 0 java.lang.SafeVarargs() meth public abstract boolean containsKey(java.lang.Object) meth public abstract boolean containsValue(java.lang.Object) meth public abstract boolean equals(java.lang.Object) @@ -642,6 +690,19 @@ meth public abstract {java.util.Map%1} put({java.util.Map%0},{java.util.Map%1}) meth public abstract {java.util.Map%1} remove(java.lang.Object) meth public boolean remove(java.lang.Object,java.lang.Object) meth public boolean replace({java.util.Map%0},{java.util.Map%1},{java.util.Map%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map$Entry<{%%0},{%%1}> entry({%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> copyOf(java.util.Map) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of() +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) +meth public static <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.Map<{%%0},{%%1}> of({%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1},{%%0},{%%1}) meth public void forEach(java.util.function.BiConsumer) meth public void replaceAll(java.util.function.BiFunction) meth public {java.util.Map%1} compute({java.util.Map%0},java.util.function.BiFunction) @@ -679,6 +740,7 @@ meth public void putValue(java.lang.String,java.lang.Object) meth public void removePropertyChangeListener(java.beans.PropertyChangeListener) meth public void setEnabled(boolean) supr java.lang.Object +hfds RECONFIGURE_ON_NULL,arrayTable CLSS public abstract interface javax.swing.Action fld public final static java.lang.String ACCELERATOR_KEY = "AcceleratorKey" @@ -699,8 +761,10 @@ meth public abstract void addPropertyChangeListener(java.beans.PropertyChangeLis meth public abstract void putValue(java.lang.String,java.lang.Object) meth public abstract void removePropertyChangeListener(java.beans.PropertyChangeListener) meth public abstract void setEnabled(boolean) +meth public boolean accept(java.lang.Object) CLSS public javax.swing.JComboBox<%0 extends java.lang.Object> + anno 0 java.beans.JavaBean(java.lang.String defaultEventSet="", java.lang.String defaultProperty="UI", java.lang.String description="A combination of a text field and a drop-down list.") cons public init() cons public init(java.util.Vector<{javax.swing.JComboBox%0}>) cons public init(javax.swing.ComboBoxModel<{javax.swing.JComboBox%0}>) @@ -735,21 +799,28 @@ meth public boolean isLightWeightPopupEnabled() meth public boolean isPopupVisible() meth public boolean selectWithKeyChar(char) meth public int getItemCount() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int getMaximumRowCount() meth public int getSelectedIndex() meth public java.awt.event.ActionListener[] getActionListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.event.ItemListener[] getItemListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.lang.Object getSelectedItem() meth public java.lang.Object[] getSelectedObjects() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.lang.String getActionCommand() meth public java.lang.String getUIClassID() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.accessibility.AccessibleContext getAccessibleContext() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.Action getAction() meth public javax.swing.ComboBoxEditor getEditor() meth public javax.swing.ComboBoxModel<{javax.swing.JComboBox%0}> getModel() meth public javax.swing.JComboBox$KeySelectionManager getKeySelectionManager() meth public javax.swing.ListCellRenderer getRenderer() meth public javax.swing.event.PopupMenuListener[] getPopupMenuListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.plaf.ComboBoxUI getUI() meth public void actionPerformed(java.awt.event.ActionEvent) meth public void addActionListener(java.awt.event.ActionListener) @@ -773,27 +844,43 @@ meth public void removeItemAt(int) meth public void removeItemListener(java.awt.event.ItemListener) meth public void removePopupMenuListener(javax.swing.event.PopupMenuListener) meth public void setAction(javax.swing.Action) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="the Action instance connected with this ActionEvent source", java.lang.String[] enumerationValues=[]) meth public void setActionCommand(java.lang.String) meth public void setEditable(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="If true, the user can type a new value in the combo box.", java.lang.String[] enumerationValues=[]) meth public void setEditor(javax.swing.ComboBoxEditor) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The editor that combo box uses to edit the current value", java.lang.String[] enumerationValues=[]) meth public void setEnabled(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The enabled state of the component.", java.lang.String[] enumerationValues=[]) meth public void setKeySelectionManager(javax.swing.JComboBox$KeySelectionManager) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The objects that changes the selection when a key is pressed.", java.lang.String[] enumerationValues=[]) meth public void setLightWeightPopupEnabled(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Set to false to require heavyweight popups.", java.lang.String[] enumerationValues=[]) meth public void setMaximumRowCount(int) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The maximum number of rows the popup should have", java.lang.String[] enumerationValues=[]) meth public void setModel(javax.swing.ComboBoxModel<{javax.swing.JComboBox%0}>) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Model that the combo box uses to get data to display.", java.lang.String[] enumerationValues=[]) meth public void setPopupVisible(boolean) meth public void setPrototypeDisplayValue({javax.swing.JComboBox%0}) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The display prototype value, used to compute display width and height.", java.lang.String[] enumerationValues=[]) meth public void setRenderer(javax.swing.ListCellRenderer) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The renderer that paints the item selected in the list.", java.lang.String[] enumerationValues=[]) meth public void setSelectedIndex(int) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The item at index is selected.", java.lang.String[] enumerationValues=[]) meth public void setSelectedItem(java.lang.Object) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="Sets the selected item in the JComboBox.", java.lang.String[] enumerationValues=[]) meth public void setUI(javax.swing.plaf.ComboBoxUI) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The UI object that implements the Component's LookAndFeel.", java.lang.String[] enumerationValues=[]) meth public void showPopup() meth public void updateUI() meth public {javax.swing.JComboBox%0} getItemAt(int) meth public {javax.swing.JComboBox%0} getPrototypeDisplayValue() supr javax.swing.JComponent +hfds action,actionPropertyChangeListener,firingActionEvent,prototypeDisplayValue,selectingItem,uiClassID,updateInProgress +hcls ComboBoxActionPropertyChangeListener,DefaultKeySelectionManager CLSS public abstract javax.swing.JComponent + anno 0 java.beans.JavaBean(java.lang.String defaultEventSet="", java.lang.String defaultProperty="UIClassID", java.lang.String description="") cons public init() fld protected javax.swing.event.EventListenerList listenerList fld protected javax.swing.plaf.ComponentUI ui @@ -821,6 +908,7 @@ meth protected void processKeyEvent(java.awt.event.KeyEvent) meth protected void processMouseEvent(java.awt.event.MouseEvent) meth protected void processMouseMotionEvent(java.awt.event.MouseEvent) meth protected void setUI(javax.swing.plaf.ComponentUI) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The component's look and feel delegate.", java.lang.String[] enumerationValues=[]) meth public <%0 extends java.util.EventListener> {%%0}[] getListeners(java.lang.Class<{%%0}>) meth public boolean contains(int,int) meth public boolean getAutoscrolls() @@ -828,17 +916,21 @@ meth public boolean getInheritsPopupMenu() meth public boolean getVerifyInputWhenFocusTarget() meth public boolean isDoubleBuffered() meth public boolean isManagingFocus() - anno 0 java.lang.Deprecated() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean isOpaque() meth public boolean isOptimizedDrawingEnabled() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public boolean isPaintingTile() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public boolean isRequestFocusEnabled() meth public boolean isValidateRoot() meth public boolean requestDefaultFocus() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public boolean requestFocus(boolean) meth public boolean requestFocusInWindow() meth public final boolean isPaintingForPrint() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public final java.lang.Object getClientProperty(java.lang.Object) meth public final javax.swing.ActionMap getActionMap() meth public final javax.swing.InputMap getInputMap() @@ -852,39 +944,54 @@ meth public int getBaseline(int,int) meth public int getConditionForKeyStroke(javax.swing.KeyStroke) meth public int getDebugGraphicsOptions() meth public int getHeight() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int getWidth() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int getX() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int getY() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.Component getNextFocusableComponent() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.awt.Component$BaselineResizeBehavior getBaselineResizeBehavior() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.Container getTopLevelAncestor() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.Dimension getMaximumSize() meth public java.awt.Dimension getMinimumSize() meth public java.awt.Dimension getPreferredSize() meth public java.awt.Dimension getSize(java.awt.Dimension) meth public java.awt.FontMetrics getFontMetrics(java.awt.Font) meth public java.awt.Graphics getGraphics() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.Insets getInsets() + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.Insets getInsets(java.awt.Insets) meth public java.awt.Point getLocation(java.awt.Point) meth public java.awt.Point getPopupLocation(java.awt.event.MouseEvent) meth public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent) meth public java.awt.Rectangle getBounds(java.awt.Rectangle) meth public java.awt.Rectangle getVisibleRect() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.awt.event.ActionListener getActionForKeyStroke(javax.swing.KeyStroke) meth public java.beans.VetoableChangeListener[] getVetoableChangeListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public java.lang.String getToolTipText() meth public java.lang.String getToolTipText(java.awt.event.MouseEvent) meth public java.lang.String getUIClassID() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="UIClassID", java.lang.String[] enumerationValues=[]) meth public javax.swing.InputVerifier getInputVerifier() meth public javax.swing.JPopupMenu getComponentPopupMenu() meth public javax.swing.JRootPane getRootPane() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.JToolTip createToolTip() meth public javax.swing.KeyStroke[] getRegisteredKeyStrokes() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.TransferHandler getTransferHandler() meth public javax.swing.border.Border getBorder() meth public javax.swing.event.AncestorListener[] getAncestorListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) +meth public javax.swing.plaf.ComponentUI getUI() meth public static boolean isLightweightComponent(java.awt.Component) meth public static java.util.Locale getDefaultLocale() meth public static void setDefaultLocale(java.util.Locale) @@ -893,15 +1000,15 @@ meth public void addNotify() meth public void addVetoableChangeListener(java.beans.VetoableChangeListener) meth public void computeVisibleRect(java.awt.Rectangle) meth public void disable() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void enable() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void firePropertyChange(java.lang.String,boolean,boolean) meth public void firePropertyChange(java.lang.String,char,char) meth public void firePropertyChange(java.lang.String,int,int) meth public void grabFocus() meth public void hide() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void paint(java.awt.Graphics) meth public void paintImmediately(int,int,int,int) meth public void paintImmediately(java.awt.Rectangle) @@ -917,40 +1024,63 @@ meth public void repaint(long,int,int,int,int) meth public void requestFocus() meth public void resetKeyboardActions() meth public void reshape(int,int,int,int) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void revalidate() meth public void scrollRectToVisible(java.awt.Rectangle) meth public void setAlignmentX(float) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The preferred horizontal alignment of the component.", java.lang.String[] enumerationValues=[]) meth public void setAlignmentY(float) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The preferred vertical alignment of the component.", java.lang.String[] enumerationValues=[]) meth public void setAutoscrolls(boolean) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Determines if this component automatically scrolls its contents when dragged.", java.lang.String[] enumerationValues=[]) meth public void setBackground(java.awt.Color) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The background color of the component.", java.lang.String[] enumerationValues=[]) meth public void setBorder(javax.swing.border.Border) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The component's border.", java.lang.String[] enumerationValues=[]) meth public void setComponentPopupMenu(javax.swing.JPopupMenu) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="Popup to show", java.lang.String[] enumerationValues=[]) meth public void setDebugGraphicsOptions(int) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="Diagnostic options for graphics operations.", java.lang.String[] enumerationValues=["DebugGraphics.NONE_OPTION", "DebugGraphics.LOG_OPTION", "DebugGraphics.FLASH_OPTION", "DebugGraphics.BUFFERED_OPTION"]) meth public void setDoubleBuffered(boolean) meth public void setEnabled(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The enabled state of the component.", java.lang.String[] enumerationValues=[]) meth public void setFocusTraversalKeys(int,java.util.Set) meth public void setFont(java.awt.Font) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The font for the component.", java.lang.String[] enumerationValues=[]) meth public void setForeground(java.awt.Color) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The foreground color of the component.", java.lang.String[] enumerationValues=[]) meth public void setInheritsPopupMenu(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Whether or not the JPopupMenu is inherited", java.lang.String[] enumerationValues=[]) meth public void setInputVerifier(javax.swing.InputVerifier) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The component's input verifier.", java.lang.String[] enumerationValues=[]) meth public void setMaximumSize(java.awt.Dimension) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The maximum size of the component.", java.lang.String[] enumerationValues=[]) meth public void setMinimumSize(java.awt.Dimension) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The minimum size of the component.", java.lang.String[] enumerationValues=[]) meth public void setNextFocusableComponent(java.awt.Component) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void setOpaque(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The component's opacity", java.lang.String[] enumerationValues=[]) meth public void setPreferredSize(java.awt.Dimension) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The preferred size of the component.", java.lang.String[] enumerationValues=[]) meth public void setRequestFocusEnabled(boolean) meth public void setToolTipText(java.lang.String) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The text to display in a tool tip.", java.lang.String[] enumerationValues=[]) meth public void setTransferHandler(javax.swing.TransferHandler) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Mechanism for transfer of data to and from the component", java.lang.String[] enumerationValues=[]) meth public void setVerifyInputWhenFocusTarget(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="Whether the Component verifies input before accepting focus.", java.lang.String[] enumerationValues=[]) meth public void setVisible(boolean) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public void unregisterKeyboardAction(javax.swing.KeyStroke) meth public void update(java.awt.Graphics) meth public void updateUI() supr java.awt.Container +hfds ACTIONMAP_CREATED,ANCESTOR_INPUTMAP_CREATED,ANCESTOR_USING_BUFFER,AUTOSCROLLS_SET,COMPLETELY_OBSCURED,CREATED_DOUBLE_BUFFER,DEBUG_GRAPHICS_LOADED,FOCUS_INPUTMAP_CREATED,FOCUS_TRAVERSAL_KEYS_BACKWARD_SET,FOCUS_TRAVERSAL_KEYS_FORWARD_SET,INHERITS_POPUP_MENU,INPUT_VERIFIER_SOURCE_KEY,IS_DOUBLE_BUFFERED,IS_OPAQUE,IS_PAINTING_TILE,IS_PRINTING,IS_PRINTING_ALL,IS_REPAINTING,KEYBOARD_BINDINGS_KEY,KEY_EVENTS_ENABLED,NEXT_FOCUS,NOT_OBSCURED,OPAQUE_SET,PARTIALLY_OBSCURED,REQUEST_FOCUS_DISABLED,RESERVED_1,RESERVED_2,RESERVED_3,RESERVED_4,RESERVED_5,RESERVED_6,WHEN_IN_FOCUSED_WINDOW_BINDINGS,WIF_INPUTMAP_CREATED,WRITE_OBJ_COUNTER_FIRST,WRITE_OBJ_COUNTER_LAST,aaHint,actionMap,alignmentX,alignmentY,ancestorInputMap,autoscrolls,border,clientProperties,componentObtainingGraphicsFrom,componentObtainingGraphicsFromLock,defaultLocale,flags,focusController,focusInputMap,inputVerifier,isAlignmentXSet,isAlignmentYSet,lcdRenderingHint,managingFocusBackwardTraversalKeys,managingFocusForwardTraversalKeys,paintingChild,popupMenu,readObjectCallbacks,revalidateRunnableScheduled,tempRectangles,uiClassID,verifyInputWhenFocusTarget,vetoableChangeSupport,windowInputMap +hcls ActionStandin,IntVector,KeyboardState,ReadObjectCallback CLSS public javax.swing.JPanel + anno 0 java.beans.JavaBean(java.lang.String defaultEventSet="", java.lang.String defaultProperty="UI", java.lang.String description="A generic lightweight container.") cons public init() cons public init(boolean) cons public init(java.awt.LayoutManager) @@ -959,13 +1089,18 @@ innr protected AccessibleJPanel intf javax.accessibility.Accessible meth protected java.lang.String paramString() meth public java.lang.String getUIClassID() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=true, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="A string that specifies the name of the L&F class.", java.lang.String[] enumerationValues=[]) meth public javax.accessibility.AccessibleContext getAccessibleContext() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.plaf.PanelUI getUI() meth public void setUI(javax.swing.plaf.PanelUI) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The UI object that implements the Component's LookAndFeel.", java.lang.String[] enumerationValues=[]) meth public void updateUI() supr javax.swing.JComponent +hfds uiClassID CLSS public javax.swing.JTabbedPane + anno 0 java.beans.JavaBean(java.lang.String defaultEventSet="", java.lang.String defaultProperty="UI", java.lang.String description="A component which provides a tab folder metaphor for displaying one component from a set of components.") cons public init() cons public init(int) cons public init(int,int) @@ -988,9 +1123,11 @@ meth public int getDisplayedMnemonicIndexAt(int) meth public int getMnemonicAt(int) meth public int getSelectedIndex() meth public int getTabCount() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int getTabLayoutPolicy() meth public int getTabPlacement() meth public int getTabRunCount() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public int indexAtLocation(int,int) meth public int indexOfComponent(java.awt.Component) meth public int indexOfTab(java.lang.String) @@ -1009,11 +1146,14 @@ meth public java.lang.String getTitleAt(int) meth public java.lang.String getToolTipText(java.awt.event.MouseEvent) meth public java.lang.String getToolTipTextAt(int) meth public java.lang.String getUIClassID() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.accessibility.AccessibleContext getAccessibleContext() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.Icon getDisabledIconAt(int) meth public javax.swing.Icon getIconAt(int) meth public javax.swing.SingleSelectionModel getModel() meth public javax.swing.event.ChangeListener[] getChangeListeners() + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="", java.lang.String[] enumerationValues=[]) meth public javax.swing.plaf.TabbedPaneUI getUI() meth public void add(java.awt.Component,java.lang.Object) meth public void add(java.awt.Component,java.lang.Object,int) @@ -1028,24 +1168,42 @@ meth public void removeAll() meth public void removeChangeListener(javax.swing.event.ChangeListener) meth public void removeTabAt(int) meth public void setBackgroundAt(int,java.awt.Color) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The background color at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setComponentAt(int,java.awt.Component) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The component at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setDisabledIconAt(int,javax.swing.Icon) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The disabled icon at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setDisplayedMnemonicIndexAt(int,int) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="the index into the String to draw the keyboard character mnemonic at", java.lang.String[] enumerationValues=[]) meth public void setEnabledAt(int,boolean) meth public void setForegroundAt(int,java.awt.Color) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The foreground color at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setIconAt(int,javax.swing.Icon) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The icon at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setMnemonicAt(int,int) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The keyboard mnenmonic, as a KeyEvent VK constant, for the specified tab", java.lang.String[] enumerationValues=[]) meth public void setModel(javax.swing.SingleSelectionModel) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=false, boolean required=false, boolean visualUpdate=false, java.lang.String description="The tabbedpane's SingleSelectionModel.", java.lang.String[] enumerationValues=[]) meth public void setSelectedComponent(java.awt.Component) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The tabbedpane's selected component.", java.lang.String[] enumerationValues=[]) meth public void setSelectedIndex(int) + anno 0 java.beans.BeanProperty(boolean bound=false, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The tabbedpane's selected tab index.", java.lang.String[] enumerationValues=[]) meth public void setTabComponentAt(int,java.awt.Component) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The tab component at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setTabLayoutPolicy(int) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The tabbedpane's policy for laying out the tabs", java.lang.String[] enumerationValues=["JTabbedPane.WRAP_TAB_LAYOUT", "JTabbedPane.SCROLL_TAB_LAYOUT"]) meth public void setTabPlacement(int) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The tabbedpane's tab placement.", java.lang.String[] enumerationValues=["JTabbedPane.TOP", "JTabbedPane.LEFT", "JTabbedPane.BOTTOM", "JTabbedPane.RIGHT"]) meth public void setTitleAt(int,java.lang.String) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=true, java.lang.String description="The title at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setToolTipTextAt(int,java.lang.String) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=false, boolean preferred=true, boolean required=false, boolean visualUpdate=false, java.lang.String description="The tooltip text at the specified tab index.", java.lang.String[] enumerationValues=[]) meth public void setUI(javax.swing.plaf.TabbedPaneUI) + anno 0 java.beans.BeanProperty(boolean bound=true, boolean expert=false, boolean hidden=true, boolean preferred=false, boolean required=false, boolean visualUpdate=true, java.lang.String description="The UI object that implements the tabbedpane's LookAndFeel", java.lang.String[] enumerationValues=[]) meth public void updateUI() supr javax.swing.JComponent +hfds haveRegistered,pages,tabLayoutPolicy,uiClassID,visComp +hcls Page CLSS public abstract interface javax.swing.SwingConstants fld public final static int BOTTOM = 3 @@ -1068,6 +1226,13 @@ fld public final static int TRAILING = 11 fld public final static int VERTICAL = 1 fld public final static int WEST = 7 +CLSS public abstract interface !annotation javax.swing.SwingContainer + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean value() +meth public abstract !hasdefault java.lang.String delegate() + CLSS public abstract interface javax.swing.event.ListDataListener intf java.util.EventListener meth public abstract void contentsChanged(javax.swing.event.ListDataEvent) @@ -1147,31 +1312,31 @@ meth public boolean isWritable() meth public boolean supportsRestartInDebug() meth public final org.openide.util.RequestProcessor$Task refresh() meth public int getAdminPortNumber() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public int getHttpPortNumber() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getAdminPort() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getDeployerUri() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getDisplayName() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getDomainName() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getDomainsRoot() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getHostName() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getHttpPort() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getInstallRoot() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getPassword() meth public java.lang.String getPayaraRoot() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String getResourcesXmlName() meth public java.lang.String getUserName() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public java.lang.String setEnvironmentProperty(java.lang.String,java.lang.String,boolean) meth public java.util.Map getInstanceProperties() meth public java.util.Map> getApplications(java.lang.String) @@ -1288,7 +1453,7 @@ meth public boolean isRemovable() meth public boolean isWSL() meth public final org.netbeans.modules.payara.common.CommonServerSupport getCommonSupport() meth public final org.netbeans.modules.payara.spi.PayaraModule$ServerState getServerState() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public int getAdminPort() meth public int getDebugPort() meth public int getPort() @@ -1333,7 +1498,7 @@ meth public org.netbeans.modules.payara.common.parser.DomainXMLChangeListener ge meth public org.netbeans.modules.payara.tooling.data.PayaraAdminInterface getAdminInterface() meth public org.netbeans.modules.payara.tooling.data.PayaraPlatformVersionAPI getPlatformVersion() meth public org.netbeans.modules.payara.tooling.data.PayaraVersion getVersion() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public org.openide.nodes.Node getBasicNode() meth public org.openide.nodes.Node getFullNode() meth public org.openide.util.Lookup getLookup() @@ -1341,7 +1506,7 @@ meth public static java.lang.String getPasswordFromKeyring(java.lang.String,java meth public static java.lang.String passwordKey(java.lang.String,java.lang.String) meth public static org.netbeans.modules.payara.common.PayaraInstance create(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String,java.lang.String,boolean,boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.netbeans.modules.payara.common.PayaraInstanceProvider) meth public static org.netbeans.modules.payara.common.PayaraInstance create(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,int,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.netbeans.modules.payara.common.PayaraInstanceProvider) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public static org.netbeans.modules.payara.common.PayaraInstance create(java.util.Map,org.netbeans.modules.payara.common.PayaraInstanceProvider) meth public static org.netbeans.modules.payara.common.PayaraInstance create(java.util.Map,org.netbeans.modules.payara.common.PayaraInstanceProvider,boolean) meth public static org.netbeans.modules.payara.common.PayaraInstance readInstanceFromFile(org.openide.filesystems.FileObject,boolean) throws java.io.IOException @@ -1497,7 +1662,7 @@ supr org.netbeans.modules.payara.common.BasicTask,boolean) cons public init(java.util.Vector) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") cons public init(javax.swing.ComboBoxModel) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") fld public final static java.lang.String IP_4_127_0_0_1_NAME = "localhost" innr public static InetAddr innr public static InetAddrComparator @@ -1890,11 +2055,11 @@ hfds mailHostField,mailHostLabel,resourceEnabledCB,returnField,returnLabel,userF CLSS public org.netbeans.modules.payara.common.ui.JavaPlatformsComboBox cons public init() cons public init(java.lang.Object[]) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") cons public init(java.util.Vector) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") cons public init(javax.swing.ComboBoxModel) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") cons public init(org.netbeans.api.java.platform.JavaPlatform[]) fld public final static java.lang.String EMPTY_DISPLAY_NAME innr public static Platform @@ -2036,7 +2201,7 @@ meth public static boolean isDefaultOrServerTarget(java.util.Map) meth public static java.lang.String escapePath(java.lang.String) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public static java.lang.String quote(java.lang.String) supr java.lang.Object hfds DOMAIN_XML_PATH,INDICATOR,JDK6_DETECTION_FILTER @@ -2347,7 +2512,7 @@ meth public abstract java.lang.String getUrl() meth public abstract org.netbeans.modules.payara.tooling.data.PayaraAdminInterface getAdminInterface() meth public abstract org.netbeans.modules.payara.tooling.data.PayaraPlatformVersionAPI getPlatformVersion() meth public abstract org.netbeans.modules.payara.tooling.data.PayaraVersion getVersion() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") CLSS public abstract interface org.netbeans.spi.server.ServerInstanceImplementation meth public abstract boolean isRemovable() @@ -2378,11 +2543,11 @@ meth protected boolean clearSharedData() meth public boolean closing() meth public void close() meth public void installed() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void restored() meth public void uninstalled() meth public void updated(int,java.lang.String) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void validate() supr org.openide.util.SharedClassObject hfds serialVersionUID @@ -2454,15 +2619,15 @@ meth public java.lang.String toString() meth public javax.swing.Action getPreferredAction() meth public javax.swing.Action[] getActions(boolean) meth public org.openide.util.actions.SystemAction getDefaultAction() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public org.openide.util.actions.SystemAction[] getActions() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public org.openide.util.actions.SystemAction[] getContextActions() - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void destroy() throws java.io.IOException meth public void setDisplayName(java.lang.String) meth public void setHidden(boolean) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") meth public void setName(java.lang.String) meth public void setShortDescription(java.lang.String) supr java.beans.FeatureDescriptor @@ -2474,10 +2639,10 @@ CLSS public abstract interface static org.openide.nodes.Node$Cookie CLSS public final org.openide.util.HelpCtx cons public init(java.lang.Class) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") cons public init(java.lang.String) cons public init(java.net.URL) - anno 0 java.lang.Deprecated() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") fld public final static org.openide.util.HelpCtx DEFAULT_HELP innr public abstract interface static Displayer innr public abstract interface static Provider @@ -2561,6 +2726,7 @@ meth public abstract void skippedEntity(java.lang.String) throws org.xml.sax.SAX meth public abstract void startDocument() throws org.xml.sax.SAXException meth public abstract void startElement(java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes) throws org.xml.sax.SAXException meth public abstract void startPrefixMapping(java.lang.String,java.lang.String) throws org.xml.sax.SAXException +meth public void declaration(java.lang.String,java.lang.String,java.lang.String) throws org.xml.sax.SAXException CLSS public abstract interface org.xml.sax.DTDHandler meth public abstract void notationDecl(java.lang.String,java.lang.String,java.lang.String) throws org.xml.sax.SAXException diff --git a/enterprise/payara.common/nbproject/project.properties b/enterprise/payara.common/nbproject/project.properties index d204c5fbe572..02dfa0bf3cd4 100644 --- a/enterprise/payara.common/nbproject/project.properties +++ b/enterprise/payara.common/nbproject/project.properties @@ -16,7 +16,7 @@ # under the License. javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.8 +javac.release=21 test.config.stableBTD.includes=**/*Test.class test.config.stableBTD.excludes=\ diff --git a/enterprise/payara.common/nbproject/project.xml b/enterprise/payara.common/nbproject/project.xml index 7b6a8bc53521..fa8863821ca8 100644 --- a/enterprise/payara.common/nbproject/project.xml +++ b/enterprise/payara.common/nbproject/project.xml @@ -94,7 +94,7 @@ 1 - 1.36 + 1.77 diff --git a/enterprise/payara.common/src/org/netbeans/modules/payara/common/utils/JavaUtils.java b/enterprise/payara.common/src/org/netbeans/modules/payara/common/utils/JavaUtils.java index be4fc085ca05..76ba1b7e5315 100644 --- a/enterprise/payara.common/src/org/netbeans/modules/payara/common/utils/JavaUtils.java +++ b/enterprise/payara.common/src/org/netbeans/modules/payara/common/utils/JavaUtils.java @@ -72,8 +72,7 @@ public class JavaUtils { */ public static JavaPlatform[] getInstalledJavaSEPlatforms() { return JavaPlatformManager.getDefault() - .getPlatforms(null, new Specification( - JAVA_SE_SPECIFICATION_NAME, null)); + .getPlatforms(null, new Specification(JAVA_SE_SPECIFICATION_NAME)); } /** diff --git a/enterprise/payara.jakartaee/nbproject/project.properties b/enterprise/payara.jakartaee/nbproject/project.properties index 635a09aeba79..fca89c810a4e 100644 --- a/enterprise/payara.jakartaee/nbproject/project.properties +++ b/enterprise/payara.jakartaee/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.8 +javac.release=21 test.config.stableBTD.includes=**/*Test.class test.config.stableBTD.excludes=\ diff --git a/enterprise/payara.jakartaee/nbproject/project.xml b/enterprise/payara.jakartaee/nbproject/project.xml index 7ac6a146e558..6785480c847f 100644 --- a/enterprise/payara.jakartaee/nbproject/project.xml +++ b/enterprise/payara.jakartaee/nbproject/project.xml @@ -166,7 +166,7 @@ 1 - 1.10 + 1.77 diff --git a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/ide/Hk2PluginProperties.java b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/ide/Hk2PluginProperties.java index 76bf4452d3b6..0e32ebfdfcd9 100644 --- a/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/ide/Hk2PluginProperties.java +++ b/enterprise/payara.jakartaee/src/org/netbeans/modules/payara/jakartaee/ide/Hk2PluginProperties.java @@ -98,7 +98,7 @@ public String getPayaraRoot() { public JavaPlatform getJavaPlatform() { String currentJvm = ip.getProperty(PROP_JAVA_PLATFORM); JavaPlatformManager jpm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String platformName = installedPlatforms[i].getProperties().get(PLAT_PROP_ANT_NAME); diff --git a/enterprise/profiler.j2ee/nbproject/project.properties b/enterprise/profiler.j2ee/nbproject/project.properties index b19cd0806af9..9e647871df9a 100644 --- a/enterprise/profiler.j2ee/nbproject/project.properties +++ b/enterprise/profiler.j2ee/nbproject/project.properties @@ -16,7 +16,7 @@ # under the License. is.eager=true -javac.source=1.8 +javac.release=21 requires.nb.javac=true test-unit-sys-prop.java.awt.headless=true diff --git a/enterprise/profiler.j2ee/nbproject/project.xml b/enterprise/profiler.j2ee/nbproject/project.xml index e504e834d1c1..7b8f1f0f8efe 100644 --- a/enterprise/profiler.j2ee/nbproject/project.xml +++ b/enterprise/profiler.j2ee/nbproject/project.xml @@ -153,7 +153,7 @@ 1 - 1.9 + 1.77 diff --git a/enterprise/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/J2EEProfilerSPI.java b/enterprise/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/J2EEProfilerSPI.java index b7f5550bc02b..3fdd5506515f 100644 --- a/enterprise/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/J2EEProfilerSPI.java +++ b/enterprise/profiler.j2ee/src/org/netbeans/modules/profiler/j2ee/J2EEProfilerSPI.java @@ -707,7 +707,7 @@ private boolean performProfilerAttach(Map props) { private JavaPlatform convert(org.netbeans.modules.profiler.api.JavaPlatform agentJavaPlatform) { String platformName = agentJavaPlatform.getPlatformId(); - JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification("j2se", null)); // NOI18N + JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification("j2se")); // NOI18N for (int i = 0; i < platforms.length; i++) { JavaPlatform platform = platforms[i]; diff --git a/enterprise/tomcat5/nbproject/project.properties b/enterprise/tomcat5/nbproject/project.properties index 14520414804b..96028a57734c 100644 --- a/enterprise/tomcat5/nbproject/project.properties +++ b/enterprise/tomcat5/nbproject/project.properties @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -javac.source=1.8 +javac.release=21 javac.compilerargs=-Xlint -Xlint:-serial javahelp.base=org/netbeans/modules/tomcat5/docs javahelp.hs=tomcat.hs diff --git a/enterprise/tomcat5/nbproject/project.xml b/enterprise/tomcat5/nbproject/project.xml index c0da62f6ed61..97d69c1ba56f 100644 --- a/enterprise/tomcat5/nbproject/project.xml +++ b/enterprise/tomcat5/nbproject/project.xml @@ -198,6 +198,7 @@ 1 + 1.77 diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/customizer/CustomizerDataSupport.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/customizer/CustomizerDataSupport.java index 04036a323e24..221e27d06560 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/customizer/CustomizerDataSupport.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/customizer/CustomizerDataSupport.java @@ -388,7 +388,7 @@ public void loadJvmModel() { Set tomcatPlatforms = tomcatPlatformImpl.getSupportedJavaPlatformVersions(); // jvm platforms registered in NetBeans - JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] j2sePlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N Set platformAdapters = new TreeSet<>(); diff --git a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java index 7c47b14fd520..122e24712933 100644 --- a/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java +++ b/enterprise/tomcat5/src/org/netbeans/modules/tomcat5/util/TomcatProperties.java @@ -47,6 +47,7 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; + import org.openide.util.EditableProperties; import org.openide.util.NbBundle; import org.openide.util.Utilities; @@ -392,7 +393,7 @@ public void setPassword(String value) { public JavaPlatform getJavaPlatform() { String currentJvm = ip.getProperty(PROP_JAVA_PLATFORM); JavaPlatformManager jpm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE", null)); // NOI18N + JavaPlatform[] installedPlatforms = jpm.getPlatforms(null, new Specification("J2SE")); // NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String platformName = installedPlatforms[i].getProperties().get(PLAT_PROP_ANT_NAME); if (platformName != null && platformName.equals(currentJvm)) { diff --git a/enterprise/web.project/nbproject/project.properties b/enterprise/web.project/nbproject/project.properties index 633f50ef4c48..46c0eb8182f6 100644 --- a/enterprise/web.project/nbproject/project.properties +++ b/enterprise/web.project/nbproject/project.properties @@ -27,7 +27,7 @@ extra.module.files=\ ant/extra/jspcompile.jar,\ ant/sources/org/netbeans/modules/web/project/ant/*.java -javac.source=1.8 +javac.release=21 javac.compilerargs=-Xlint -Xlint:-serial javadoc.arch=${basedir}/arch.xml diff --git a/java/debugger.jpda.truffle/nbproject/project.xml b/java/debugger.jpda.truffle/nbproject/project.xml index 1c82b5032a4c..3827d25c789f 100644 --- a/java/debugger.jpda.truffle/nbproject/project.xml +++ b/java/debugger.jpda.truffle/nbproject/project.xml @@ -85,7 +85,7 @@ 1 - 1.40 + 1.77 diff --git a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/MIMETypes.java b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/MIMETypes.java index 173cf4890610..9cfa5142aee6 100644 --- a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/MIMETypes.java +++ b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/MIMETypes.java @@ -160,7 +160,7 @@ public synchronized Set get() { }; pm.addPropertyChangeListener(allPlatformsListener); } - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se", null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se")); //NOI18N Set mTypes = new HashSet<>(); for (int i = 0; i < installedPlatforms.length; i++) { mTypes.addAll(get(installedPlatforms[i])); @@ -182,7 +182,7 @@ private static JavaPlatform getProjectPlatform(Project prj) { ClassPath bootClassPath = ClassPath.getClassPath(sourceGroups[0].getRootFolder(), ClassPath.BOOT); FileObject[] prjBootRoots = bootClassPath.getRoots(); JavaPlatformManager pm = JavaPlatformManager.getDefault(); - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se", null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification ("j2se")); //NOI18N for (int i = 0; i < installedPlatforms.length; i++) { ClassPath bootstrapLibraries = installedPlatforms[i].getBootstrapLibraries(); if (Arrays.equals(prjBootRoots, bootstrapLibraries.getRoots())) { diff --git a/java/gradle.java/nbproject/project.xml b/java/gradle.java/nbproject/project.xml index 5d1e506cbfea..6868e336fdf8 100644 --- a/java/gradle.java/nbproject/project.xml +++ b/java/gradle.java/nbproject/project.xml @@ -128,7 +128,7 @@ 1 - 1.34.1 + 1.77 diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/execute/JavaRunUtils.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/execute/JavaRunUtils.java index 046aa5357cb4..89b764f385c5 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/execute/JavaRunUtils.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/execute/JavaRunUtils.java @@ -61,7 +61,7 @@ public static Pair getActivePlatform(final String activePl JavaPlatform p = pm.getDefaultPlatform(); return Pair.of(p.getProperties().get("platform.ant.name"), p); } else { - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se", null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se")); //NOI18N for (JavaPlatform installedPlatform : installedPlatforms) { String antName = installedPlatform.getProperties().get("platform.ant.name"); //NOI18N if (antName != null && antName.equals(activePlatformId)) { diff --git a/java/java.api.common/nbproject/project.xml b/java/java.api.common/nbproject/project.xml index be65649bb230..f8cc47091ed0 100644 --- a/java/java.api.common/nbproject/project.xml +++ b/java/java.api.common/nbproject/project.xml @@ -144,7 +144,7 @@ 1 - 1.43 + 1.77 diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java index 368abc1769e7..aeae76451497 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java @@ -762,7 +762,7 @@ public void run() { private synchronized PlatformKey[] getPlatformNames() { if (platformNamesCache == null) { final List platforms = new ArrayList<>(); - Collections.addAll(platforms, pm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE, null))); + Collections.addAll(platforms, pm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE))); JavaPlatform projectPlatform = null; final EditableProperties globalProps = PropertyUtils.getGlobalProperties(); if (project != null) { @@ -1258,7 +1258,7 @@ private static JavaPlatform getPlatform(PlatformKey platformKey) { private static JavaPlatform findPlatform(String displayName) { JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms( - displayName, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE, null)); + displayName, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE)); if (platforms.length == 0) { return null; } diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/util/CommonProjectUtils.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/util/CommonProjectUtils.java index 79bfcdd340f4..f3fb6c4fda26 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/util/CommonProjectUtils.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/util/CommonProjectUtils.java @@ -101,7 +101,7 @@ public static JavaPlatform getActivePlatform( null : candidate; } - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification(platformType, null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification(platformType)); //NOI18N for (JavaPlatform javaPlatform : installedPlatforms) { String antName = javaPlatform.getProperties().get("platform.ant.name"); //NOI18N if (antName != null && antName.equals(activePlatformId)) { diff --git a/java/java.j2seembedded/build.xml b/java/java.j2seembedded/build.xml index 5c6a21e1727c..d04871f2c2ac 100644 --- a/java/java.j2seembedded/build.xml +++ b/java/java.j2seembedded/build.xml @@ -25,7 +25,7 @@ - + diff --git a/java/java.j2seembedded/nbproject/project.properties b/java/java.j2seembedded/nbproject/project.properties index 52833f8fdea7..892e97fc8357 100644 --- a/java/java.j2seembedded/nbproject/project.properties +++ b/java/java.j2seembedded/nbproject/project.properties @@ -14,7 +14,11 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -javac.source=1.8 + +javac.release=21 +# keep low as possible +probe.javac.release=8 + javac.compilerargs=-Xlint -Xlint:-serial extra.module.files=modules/ext/org-netbeans-modules-java-j2seembedded-probe.jar jnlp.indirect.jars=modules/ext/org-netbeans-modules-java-j2seembedded-probe.jar diff --git a/java/java.j2seembedded/nbproject/project.xml b/java/java.j2seembedded/nbproject/project.xml index 24e4008744dc..c4a482e9ee9f 100644 --- a/java/java.j2seembedded/nbproject/project.xml +++ b/java/java.j2seembedded/nbproject/project.xml @@ -103,7 +103,7 @@ 1 - 1.36 + 1.77 diff --git a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/RemoteRuntimePlatformProvider.java b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/RemoteRuntimePlatformProvider.java index ee9ec465a560..6cbca2534031 100644 --- a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/RemoteRuntimePlatformProvider.java +++ b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/RemoteRuntimePlatformProvider.java @@ -48,7 +48,7 @@ public Collection getPlatformType( final Collection result = new ArrayList<>(); for (JavaPlatform jp : JavaPlatformManager.getDefault().getPlatforms( null, - new Specification(RemotePlatform.SPEC_NAME, null))) { + new Specification(RemotePlatform.SPEC_NAME))) { if ((jp instanceof RemotePlatform) && isSupported((RemotePlatform)jp, targetLevel, profile)) { result.add(jp); diff --git a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/Utilities.java b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/Utilities.java index 540f2110e509..a860fd91e90c 100644 --- a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/Utilities.java +++ b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/project/Utilities.java @@ -52,6 +52,7 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.loaders.DataObject; + import org.openide.util.Mutex; import org.openide.util.MutexException; import org.openide.util.Parameters; @@ -342,7 +343,7 @@ private static RemotePlatform findRemotePlatform(@NonNull final String platformI Parameters.notNull("platformId", platformId); //NOI18N final JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms( null, - new Specification(RemotePlatform.SPEC_NAME, null)); + new Specification(RemotePlatform.SPEC_NAME)); for (JavaPlatform platform : platforms) { final String antPlatformName = platform.getProperties().get(RemotePlatform.PLAT_PROP_ANT_NAME); if (platformId.equals(antPlatformName) && (platform instanceof RemotePlatform)) { diff --git a/java/java.j2seplatform/nbproject/project.xml b/java/java.j2seplatform/nbproject/project.xml index 46576d8bd832..5ed727bf2ea7 100644 --- a/java/java.j2seplatform/nbproject/project.xml +++ b/java/java.j2seplatform/nbproject/project.xml @@ -100,7 +100,7 @@ 1 - 1.43 + 1.77 diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/UpdateTask.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/UpdateTask.java index 6095c259664c..24751dd68e82 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/UpdateTask.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/UpdateTask.java @@ -30,6 +30,7 @@ import org.netbeans.modules.java.j2seplatform.platformdefinition.PlatformConvertor; import org.netbeans.spi.project.support.ant.EditableProperties; import org.netbeans.spi.project.support.ant.PropertyUtils; + import org.openide.util.Exceptions; /** @@ -78,7 +79,7 @@ private static boolean updateSourceLevel(EditableProperties ep) { private static boolean updateBuildProperties (EditableProperties ep) { boolean changed = false; - JavaPlatform[] installedPlatforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification ("j2se",null)); //NOI18N + JavaPlatform[] installedPlatforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification("j2se")); //NOI18N for (int i=0; i toURLList(@NonNull final List } private J2SEPlatformImpl findOwner(final URL root) { - for (JavaPlatform p : JavaPlatformManager.getDefault().getPlatforms(null, new Specification(J2SEPlatformImpl.PLATFORM_J2SE, null))) { + for (JavaPlatform p : JavaPlatformManager.getDefault().getPlatforms(null, new Specification(J2SEPlatformImpl.PLATFORM_J2SE))) { if (!(p instanceof J2SEPlatformImpl)) { //Cannot handle unknown platform continue; diff --git a/java/java.platform/apichanges.xml b/java/java.platform/apichanges.xml index cca2c01ad7c1..25f7455f51ae 100644 --- a/java/java.platform/apichanges.xml +++ b/java/java.platform/apichanges.xml @@ -20,7 +20,7 @@ --> - + + + + Added Specification.getJdkVersion returning + the platform version as a Runtime.Version, added + constructors accepting a Runtime.Version, a + one-argument constructor for version-less specifications, and made + Specification comparable by version + + + + + +

+ Added Specification.getJdkVersion returning the + platform version as a java.lang.Runtime.Version + (converted from getVersion), plus new constructors + accepting a Runtime.Version instead of a + SpecificationVersion. +

+

+ A one-argument constructor Specification(String) + was added for specifications without a version. +

+
+ +
Added a isValid method into JavaPlatform diff --git a/java/java.platform/nbproject/org-netbeans-modules-java-platform.sig b/java/java.platform/nbproject/org-netbeans-modules-java-platform.sig index 0b6177ff01e4..3aefe71f2ba9 100644 --- a/java/java.platform/nbproject/org-netbeans-modules-java-platform.sig +++ b/java/java.platform/nbproject/org-netbeans-modules-java-platform.sig @@ -1,5 +1,8 @@ #Signature file v4.1 -#Version 1.75 +#Version 1.77 + +CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object> +meth public abstract int compareTo({java.lang.Comparable%0}) CLSS public java.lang.Object cons public init() @@ -65,6 +68,20 @@ supr java.lang.Object hfds name,version CLSS public final org.netbeans.api.java.platform.Specification +cons public init(java.lang.String) + anno 1 org.netbeans.api.annotations.common.NullAllowed() +cons public init(java.lang.String,java.lang.Runtime$Version) + anno 1 org.netbeans.api.annotations.common.NullAllowed() + anno 2 org.netbeans.api.annotations.common.NullAllowed() +cons public init(java.lang.String,java.lang.Runtime$Version,java.lang.String,org.netbeans.api.java.platform.Profile[]) + anno 1 org.netbeans.api.annotations.common.NullAllowed() + anno 2 org.netbeans.api.annotations.common.NullAllowed() + anno 3 org.netbeans.api.annotations.common.NullAllowed() + anno 4 org.netbeans.api.annotations.common.NullAllowed() +cons public init(java.lang.String,java.lang.Runtime$Version,org.netbeans.api.java.platform.Profile[]) + anno 1 org.netbeans.api.annotations.common.NullAllowed() + anno 2 org.netbeans.api.annotations.common.NullAllowed() + anno 3 org.netbeans.api.annotations.common.NullAllowed() cons public init(java.lang.String,org.openide.modules.SpecificationVersion) anno 1 org.netbeans.api.annotations.common.NullAllowed() anno 2 org.netbeans.api.annotations.common.NullAllowed() @@ -77,16 +94,19 @@ cons public init(java.lang.String,org.openide.modules.SpecificationVersion,org.n anno 1 org.netbeans.api.annotations.common.NullAllowed() anno 2 org.netbeans.api.annotations.common.NullAllowed() anno 3 org.netbeans.api.annotations.common.NullAllowed() +intf java.lang.Comparable meth public boolean equals(java.lang.Object) meth public final java.lang.String getName() meth public final org.netbeans.api.java.platform.Profile[] getProfiles() meth public final org.openide.modules.SpecificationVersion getVersion() +meth public int compareTo(org.netbeans.api.java.platform.Specification) meth public int hashCode() +meth public java.lang.Runtime$Version getJdkVersion() meth public java.lang.String getDisplayName() anno 0 org.netbeans.api.annotations.common.NonNull() meth public java.lang.String toString() supr java.lang.Object -hfds displayName,name,profiles,version +hfds VERSION_FLOOR,displayName,name,profiles,version CLSS public abstract interface org.netbeans.modules.java.platform.implspi.JavaPlatformProvider fld public final static java.lang.String PROP_INSTALLED_PLATFORMS = "installedPlatforms" diff --git a/java/java.platform/nbproject/project.properties b/java/java.platform/nbproject/project.properties index f4ebb7ec0888..f12e40235daa 100644 --- a/java/java.platform/nbproject/project.properties +++ b/java/java.platform/nbproject/project.properties @@ -18,7 +18,7 @@ is.autoload=true javac.compilerargs=-Xlint -Xlint:-serial -javac.release=17 +javac.release=21 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff --git a/java/java.platform/src/org/netbeans/api/java/platform/Specification.java b/java/java.platform/src/org/netbeans/api/java/platform/Specification.java index 0c732165667d..12f6aafcc38d 100644 --- a/java/java.platform/src/org/netbeans/api/java/platform/Specification.java +++ b/java/java.platform/src/org/netbeans/api/java/platform/Specification.java @@ -19,36 +19,64 @@ package org.netbeans.api.java.platform; +import java.util.Arrays; import java.util.Locale; +import java.util.Objects; import org.netbeans.api.annotations.common.NonNull; import org.netbeans.api.annotations.common.NullAllowed; import org.openide.modules.SpecificationVersion; -/** Specification of the Java SDK +/** + * Specification of the JDK. + *

+ * Since version 1.77 the version is represented by a + * {@link Runtime.Version}, and this class implements {@link Comparable}. + * When creating a specification that carries a version, the constructors + * accepting a {@link Runtime.Version} are preferred over those accepting a + * {@link SpecificationVersion}: the latter convert the given version to + * {@link Runtime.Version} internally. */ -public final class Specification { +public final class Specification implements Comparable { private final String name; - private final SpecificationVersion version; + private final Runtime.Version version; private final Profile[] profiles; private final String displayName; + /** + * The oldest parseable {@link Runtime.Version}; used in {@link #compareTo} + * as the stand-in for specifications without a version. + */ + private static final Runtime.Version VERSION_FLOOR = Runtime.Version.parse("1"); //NOI18N + + /** + * Creates a new specification of a JDK without a version. + * @param name of the specification e.g J2SE + * @since 1.77 + */ + public Specification(@NullAllowed String name) { + this(name, (Runtime.Version) null, null, null); + } /** - * Creates new SDK Specification + * Creates a new specification of a JDK with the given name and version. + * Prefer {@link #Specification(String, Runtime.Version)}, which stores the + * version directly. * @param name of the specification e.g J2SE * @param version of the specification e.g. 1.4 */ public Specification (@NullAllowed String name, @NullAllowed SpecificationVersion version) { this (name, version, null, null); } - /** - * Creates new SDK Specification + * Creates a new specification of a JDK with the given name, version + * and supported profiles. + * Prefer {@link #Specification(String, Runtime.Version, Profile[])}, which + * stores the version directly. * @param name of the specification e.g J2SE * @param version of the specification e.g. 1.4 - * @param profiles of the Java SDK + * @param profiles of the JDK */ public Specification ( @NullAllowed final String name, @@ -58,11 +86,14 @@ public Specification ( } /** - * Creates new SDK Specification + * Creates a new specification of a JDK with the given name, version, + * display name and supported profiles. + * Prefer {@link #Specification(String, Runtime.Version, String, Profile[])}, + * which stores the version directly. * @param name of the specification e.g J2SE * @param version of the specification e.g. 1.4 - * @param displayName the display name of the Java SDK e.g. "Java SE". - * @param profiles of the Java SDK + * @param displayName the display name of the JDK e.g. "Java SE". + * @param profiles of the JDK * @since 1.26 */ public Specification ( @@ -71,6 +102,51 @@ public Specification ( @NullAllowed final String displayName, @NullAllowed final Profile[] profiles) { this.name = name; + this.version = toJdkVersion(version); + this.displayName = displayName; + this.profiles = profiles; + } + + /** + * Creates a new specification of a JDK with the given name and version. + * @param name of the specification e.g J2SE + * @param version of the specification, e.g. {@code Runtime.Version.parse("17")} + * @since 1.77 + */ + public Specification(@NullAllowed String name, @NullAllowed Runtime.Version version) { + this(name, version, null, null); + } + + /** + * Creates a new specification of a JDK with the given name, version + * and supported profiles. + * @param name of the specification e.g J2SE + * @param version of the specification, e.g. {@code Runtime.Version.parse("17")} + * @param profiles of the JDK + * @since 1.77 + */ + public Specification( + @NullAllowed String name, + @NullAllowed Runtime.Version version, + @NullAllowed Profile[] profiles) { + this(name, version, null, profiles); + } + + /** + * Creates a new specification of a JDK with the given name, version, + * display name and supported profiles. + * @param name of the specification e.g J2SE + * @param version of the specification, e.g. {@code Runtime.Version.parse("17")} + * @param displayName the display name of the JDK e.g. "Java SE". + * @param profiles of the JDK + * @since 1.77 + */ + public Specification( + @NullAllowed String name, + @NullAllowed Runtime.Version version, + @NullAllowed String displayName, + @NullAllowed Profile[] profiles) { + this.name = name; this.version = version; this.displayName = displayName; this.profiles = profiles; @@ -86,14 +162,43 @@ public final String getName () { /** * Returns the version of the Java specification e.g 1.4 - * @return instance of SpecificationVersion + * @return instance of SpecificationVersion derived from the stored + * {@link Runtime.Version}, or null if the specification version is + * not set + */ + public final SpecificationVersion getVersion() { + if (this.version == null) { + return null; + } + // SpecificationVersion can only hold numeric components; + // rebuild the version from its numeric parts, which drops + // pre-release and build information, + // e.g. 28-ea+21-1707 becomes 28, 17.0.2+9 becomes 17.0.2 + StringBuilder s = new StringBuilder(); + s.append(version.feature()); + if (version.interim() > 0 || version.update() > 0 || version.patch() > 0) { + s.append('.').append(version.interim()); //NOI18N + } + if (version.update() > 0 || version.patch() > 0) { + s.append('.').append(version.update()); //NOI18N + } + if (version.patch() > 0) { + s.append('.').append(version.patch()); //NOI18N + } + return new SpecificationVersion(s.toString()); + } + + /** + * Returns the version of the Java platform as a {@link Runtime.Version}. + * @return the platform version, or null if not set. + * @since 1.77 */ - public final SpecificationVersion getVersion () { + public Runtime.Version getJdkVersion() { return this.version; } /** - * Returns profiles supported by the Java platform. + * Returns JDK 8 profiles supported by the Java platform. * @return list of profiles, or null if not applicable */ public final Profile[] getProfiles () { @@ -101,11 +206,11 @@ public final Profile[] getProfiles () { } /** - * Returns the display name of the Java SDK. + * Returns the display name of the JDK. * While the {@link Specification#getName()} is used as a system name * the {@link Specification#getDisplayName()} is used while presenting the - * Java SDK to the user. - * @return the user friendly name, e.g. "Java SE" for "j2se" SDK. + * JDK to the user. + * @return the user friendly name, e.g. "Java SE" for the "j2se" JDK. * @since 1.26 */ @NonNull @@ -130,11 +235,10 @@ public int hashCode () { } @Override - public boolean equals (Object other) { - if (other instanceof Specification) { - Specification os = (Specification) other; + public boolean equals(Object other) { + if (other instanceof Specification os) { boolean re = this.name == null ? os.name == null : this.name.equals(os.name) && - this.version == null ? os.version == null : this.version.equals (os.version); + this.version == null ? os.version == null : this.version.equals (os.version); if (!re || this.profiles == null) return re; if (os.profiles == null || this.profiles.length != os.profiles.length) @@ -161,4 +265,47 @@ public String toString () { return str; } + private static Runtime.Version toJdkVersion(SpecificationVersion version) { + if (version == null) { + return null; + } + String s = version.toString(); + String[] parts = s.split("\\."); //NOI18N + // Runtime.Version.parse() rejects a trailing zero component + // (e.g. "9.0" or "1.8.0"); it is insignificant, strip it. Unparseable + // input, e.g. a version starting with "0", is mapped to null below. + int end = parts.length; + while (end > 1 && "0".equals(parts[end-1])) { //NOI18N + end--; + } + if (end < parts.length) { + s = String.join(".", Arrays.copyOf(parts, end)); //NOI18N + } + try { + return Runtime.Version.parse(s); + } catch (IllegalArgumentException e) { + return null; + } + } + + /** + * Compares this specification with the specified one for order, + * by version; specifications without a version are treated as the + * oldest possible ones. Specifications with equal versions are + * compared by display name. + * @param other the specification to compare to + * @return a negative integer, zero, or a positive integer as this + * specification is older than, the same as, or newer than the other + * @since 1.77 + */ + @Override + public int compareTo(Specification other) { + Runtime.Version v1 = Objects.requireNonNullElse(this.getJdkVersion(), VERSION_FLOOR); + Runtime.Version v2 = Objects.requireNonNullElse(other.getJdkVersion(), VERSION_FLOOR); + int cmp = v1.compareTo(v2); + if (cmp != 0) { + return cmp; + } + return this.getDisplayName().compareTo(other.getDisplayName()); + } } diff --git a/java/java.platform/test/unit/src/org/netbeans/api/java/platform/JavaPlatformManagerTest.java b/java/java.platform/test/unit/src/org/netbeans/api/java/platform/JavaPlatformManagerTest.java index 898106642061..b1cf38bed53b 100644 --- a/java/java.platform/test/unit/src/org/netbeans/api/java/platform/JavaPlatformManagerTest.java +++ b/java/java.platform/test/unit/src/org/netbeans/api/java/platform/JavaPlatformManagerTest.java @@ -141,11 +141,11 @@ public void testGetPlatforms() { assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0] == p1); - r = manager.getPlatforms("P1", new Specification ("P1", null)); + r = manager.getPlatforms("P1", new Specification ("P1", (SpecificationVersion) null)); assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0] == p1); - r = manager.getPlatforms(null, new Specification ("P1", null)); + r = manager.getPlatforms(null, new Specification ("P1", (SpecificationVersion) null)); assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0] == p1); @@ -162,40 +162,40 @@ public void testGetPlatforms() { assertNotNull (r); assertTrue (r.length == 4); assertEquivalent (r, new JavaPlatform[] {p5, p6, p7, p8}); - r = manager.getPlatforms (null, new Specification ("CDC", null, new Profile[] { // CDC with PersonalJava/* and RMI/* + r = manager.getPlatforms (null, new Specification ("CDC", (SpecificationVersion) null, new Profile[] { // CDC with PersonalJava/* and RMI/* new Profile ("PersonalJava",null), new Profile ("RMI",null) })); assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0]==p5); - r = manager.getPlatforms (null, new Specification ("CDC",null,new Profile[] { // CDC with any existing profile + r = manager.getPlatforms (null, new Specification ("CDC",(SpecificationVersion) null,new Profile[] { // CDC with any existing profile new Profile (null,null) })); assertNotNull (r); assertTrue (r.length == 3); assertEquivalent (r, new JavaPlatform[] {p5,p7,p8}); - r = manager.getPlatforms (null, new Specification ("CDC",null,new Profile[] { // CDC with PersonalJava/* and */* + r = manager.getPlatforms (null, new Specification ("CDC",(SpecificationVersion) null,new Profile[] { // CDC with PersonalJava/* and */* new Profile ("PersonalJava",null), new Profile (null,null) })); assertNotNull (r); assertTrue (r.length == 3); assertEquivalent (r, new JavaPlatform[] {p5,p7,p8}); - r = manager.getPlatforms (null, new Specification ("CDC",null,new Profile[] { //CDC with PersonalJava/* + r = manager.getPlatforms (null, new Specification ("CDC",(SpecificationVersion) null,new Profile[] { //CDC with PersonalJava/* new Profile ("PersonalJava",null) })); assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0] == p7); - r = manager.getPlatforms (null, new Specification ("CDC",null,new Profile[] { //CDC with RMI/* and */* + r = manager.getPlatforms (null, new Specification ("CDC",(SpecificationVersion) null,new Profile[] { //CDC with RMI/* and */* new Profile ("RMI",null), new Profile (null,null) })); assertNotNull (r); assertTrue (r.length == 1); assertTrue (r[0] == p5); - r = manager.getPlatforms (null, new Specification ("CDC",null,new Profile[] { //CDC with Gateway/* and */* + r = manager.getPlatforms (null, new Specification ("CDC",(SpecificationVersion) null,new Profile[] { //CDC with Gateway/* and */* new Profile ("Gateway",null), new Profile (null, null) })); diff --git a/java/java.platform/test/unit/src/org/netbeans/api/java/platform/SpecificationTest.java b/java/java.platform/test/unit/src/org/netbeans/api/java/platform/SpecificationTest.java new file mode 100644 index 000000000000..d2a0cfa6a142 --- /dev/null +++ b/java/java.platform/test/unit/src/org/netbeans/api/java/platform/SpecificationTest.java @@ -0,0 +1,100 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.api.java.platform; + +import org.netbeans.junit.NbTestCase; +import org.openide.modules.SpecificationVersion; + +public class SpecificationTest extends NbTestCase { + + public SpecificationTest(String name) { + super(name); + } + + public void testJdkVersionFromSpecificationVersion() { + assertEquals(Runtime.Version.parse("1.8"), new Specification("j2se", new SpecificationVersion("1.8")).getJdkVersion()); + assertEquals(Runtime.Version.parse("1.8"), new Specification("j2se", new SpecificationVersion("1.8.0")).getJdkVersion()); + assertEquals(Runtime.Version.parse("17"), new Specification("j2se", new SpecificationVersion("17")).getJdkVersion()); + assertEquals(Runtime.Version.parse("17.0.2"), new Specification("j2se", new SpecificationVersion("17.0.2")).getJdkVersion()); + // trailing zero components are insignificant, Runtime.Version.parse() rejects them + assertEquals(Runtime.Version.parse("9"), new Specification("j2se", new SpecificationVersion("9.0")).getJdkVersion()); + assertEquals(Runtime.Version.parse("9"), new Specification("j2se", new SpecificationVersion("9.0.0")).getJdkVersion()); + assertEquals(Runtime.Version.parse("17"), new Specification("j2se", new SpecificationVersion("17.0")).getJdkVersion()); + // non-zero update components are kept + assertEquals(Runtime.Version.parse("9.0.1"), new Specification("j2se", new SpecificationVersion("9.0.1")).getJdkVersion()); + assertNull(new Specification("j2se", (SpecificationVersion) null).getJdkVersion()); + // 1.0's trailing zero is stripped like any other version (1.0 == 1), + // while 1.0.2 is kept, just like 9.0.1 + assertEquals(Runtime.Version.parse("1"), new Specification("j2se", new SpecificationVersion("1.0")).getJdkVersion()); + assertEquals(Runtime.Version.parse("1.0.2"), new Specification("j2se", new SpecificationVersion("1.0.2")).getJdkVersion()); + assertEquals(new SpecificationVersion("1"), new Specification("j2se", new SpecificationVersion("1.0")).getVersion()); + // a bare "1" parses as-is (feature 1) + assertEquals(Runtime.Version.parse("1"), new Specification("j2se", new SpecificationVersion("1")).getJdkVersion()); + assertEquals(new SpecificationVersion("1"), new Specification("j2se", new SpecificationVersion("1")).getVersion()); + // "0" is not a JDK version at all + assertNull(new Specification("j2se", new SpecificationVersion("0")).getJdkVersion()); + } + + public void testVersionFromJdkVersion() { + assertEquals(new SpecificationVersion("1.8"), new Specification("j2se", Runtime.Version.parse("1.8")).getVersion()); + assertEquals(new SpecificationVersion("17"), new Specification("j2se", Runtime.Version.parse("17")).getVersion()); + assertEquals(new SpecificationVersion("17.0.2"), new Specification("j2se", Runtime.Version.parse("17.0.2")).getVersion()); + // pre-release/build parts are not representable, they are dropped + assertEquals(new SpecificationVersion("28"), new Specification("j2se", Runtime.Version.parse("28-ea")).getVersion()); + assertEquals(new SpecificationVersion("28"), new Specification("j2se", Runtime.Version.parse("28-ea+21-1707")).getVersion()); + assertEquals(new SpecificationVersion("1.8"), new Specification("j2se", Runtime.Version.parse("1.8-ea")).getVersion()); + assertEquals(new SpecificationVersion("17.0.2"), new Specification("j2se", Runtime.Version.parse("17.0.2+9")).getVersion()); + assertEquals(new SpecificationVersion("9.0.1.2"), new Specification("j2se", Runtime.Version.parse("9.0.1.2")).getVersion()); + // legacy version with insignificant trailing zeros + assertEquals(new SpecificationVersion("9"), new Specification("j2se", new SpecificationVersion("9.0")).getVersion()); + assertNull(new Specification("j2se", (Runtime.Version) null).getVersion()); + } + + public void testCompareTo() { + Specification v17 = new Specification("j2se", Runtime.Version.parse("17")); + Specification v1702 = new Specification("j2se", Runtime.Version.parse("17.0.2")); + Specification v8 = new Specification("j2se", Runtime.Version.parse("1.8")); + assertTrue(v17.compareTo(v1702) < 0); + assertTrue(v1702.compareTo(v17) > 0); + assertTrue(v8.compareTo(v17) < 0); + assertEquals(0, v17.compareTo(new Specification("j2se", Runtime.Version.parse("17")))); + // versionless platforms: fall back to comparing the version strings + Specification vNone1 = new Specification("j2se", (Runtime.Version) null); + Specification vNone2 = new Specification("j2se", (Runtime.Version) null); + assertEquals(0, vNone1.compareTo(vNone2)); + assertTrue(vNone1.compareTo(v17) < 0); + assertTrue(v17.compareTo(vNone1) > 0); + } + + public void testEqualityRoundTrip() { + assertEquals( + new Specification("j2se", new SpecificationVersion("1.8")), + new Specification("j2se", Runtime.Version.parse("1.8"))); + assertEquals( + new Specification("j2se", new SpecificationVersion("17.0.2")), + new Specification("j2se", Runtime.Version.parse("17.0.2"))); + if (new Specification("j2se", Runtime.Version.parse("17")). + equals(new Specification("j2se", Runtime.Version.parse("17.0.2")))) { + fail("17 and 17.0.2 should not be equal"); + } + assertEquals( + new Specification("j2se", (SpecificationVersion) null), + new Specification("j2se", (Runtime.Version) null)); + } +} diff --git a/java/java.project.ui/nbproject/project.xml b/java/java.project.ui/nbproject/project.xml index 218105bc6784..7cc838a0ae78 100644 --- a/java/java.project.ui/nbproject/project.xml +++ b/java/java.project.ui/nbproject/project.xml @@ -108,7 +108,7 @@ 1 - 1.43 + 1.77 diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java index 9c303409ec35..3ece40574781 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java @@ -296,9 +296,7 @@ public JavaPlatform getElementAt(int index) { private void init () { final List newPlatfs = new ArrayList<>(); - Arrays.stream(this.pm.getPlatforms(null, new Specification( - this.platformType, - null))) + Arrays.stream(this.pm.getPlatforms(null, new Specification(this.platformType))) .filter((jp) -> !jp.getInstallFolders().isEmpty()) .forEach(newPlatfs::add); final Optional resolved = newPlatfs.stream() @@ -405,7 +403,7 @@ public String getVendor() { @Override public Specification getSpecification() { - return new Specification(null, null); + return new Specification(null); } @Override diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java index 943cc5acdfa6..e4fd755b2eb2 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java @@ -189,14 +189,14 @@ void refresh() { removeAllElements(); final JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms( null, - new Specification(type, null)); + new Specification(type)); for (JavaPlatform jp : platforms) { - if (minVersion.compareTo(jp.getSpecification().getVersion())<=0) { + if (minVersion.compareTo(jp.getSpecification().getVersion()) <= 0) { addElement(jp); } } + } } - } private static class PlatformRenderer extends DefaultListCellRenderer { diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java index 07a632d689a1..276a728065cf 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/ProjectProblemsProviders.java @@ -1524,7 +1524,7 @@ private JavaPlatform getActivePlatform() { } final JavaPlatform[] installedPlatforms = pm.getPlatforms( null, - new Specification(platformType, null)); + new Specification(platformType)); for (JavaPlatform javaPlatform : installedPlatforms) { final String antName = javaPlatform.getProperties().get(PLAT_PROP_ANT_NAME); if (activePlatformId.equals(antName)) { diff --git a/java/java.project/nbproject/project.xml b/java/java.project/nbproject/project.xml index ea435b22559d..74929c2736b7 100644 --- a/java/java.project/nbproject/project.xml +++ b/java/java.project/nbproject/project.xml @@ -66,7 +66,7 @@ 1 - 1.43 + 1.77 diff --git a/java/java.project/src/org/netbeans/spi/java/project/support/ProjectPlatform.java b/java/java.project/src/org/netbeans/spi/java/project/support/ProjectPlatform.java index 93fc6433b140..9a14281118f2 100644 --- a/java/java.project/src/org/netbeans/spi/java/project/support/ProjectPlatform.java +++ b/java/java.project/src/org/netbeans/spi/java/project/support/ProjectPlatform.java @@ -40,6 +40,7 @@ import org.netbeans.spi.project.support.ant.PropertyUtils; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; + import org.openide.util.Lookup; import org.openide.util.Parameters; @@ -181,7 +182,7 @@ private static FileObject resolvePlatformHome( private static JavaPlatform findJavaPlatform( @NonNull final FileObject jdkHome, @NonNull final String platformType) { - return Arrays.stream(JavaPlatformManager.getDefault().getPlatforms(null, new Specification(platformType, null))) + return Arrays.stream(JavaPlatformManager.getDefault().getPlatforms(null, new Specification(platformType))) .filter((jp) -> jp.getInstallFolders().contains(jdkHome)) .findFirst() .orElse(null); diff --git a/java/maven/nbproject/project.xml b/java/maven/nbproject/project.xml index 94ff3287ed83..01aa577a8832 100644 --- a/java/maven/nbproject/project.xml +++ b/java/maven/nbproject/project.xml @@ -166,7 +166,7 @@ 1 - 1.43 + 1.77 diff --git a/java/maven/src/org/netbeans/modules/maven/classpath/AbstractBootPathImpl.java b/java/maven/src/org/netbeans/modules/maven/classpath/AbstractBootPathImpl.java index d79f0c1dcbf1..3899b4f25cd1 100644 --- a/java/maven/src/org/netbeans/modules/maven/classpath/AbstractBootPathImpl.java +++ b/java/maven/src/org/netbeans/modules/maven/classpath/AbstractBootPathImpl.java @@ -95,7 +95,7 @@ public static JavaPlatform getActivePlatform(final String activePlatformId) { if (activePlatformId == null) { return pm.getDefaultPlatform(); } else { - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE, null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE)); //NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String antName = installedPlatforms[i].getProperties().get("platform.ant.name"); //NOI18N if (antName != null && antName.equals(activePlatformId)) { diff --git a/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java b/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java index daf2662f056a..6411c4455e90 100644 --- a/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java +++ b/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java @@ -995,7 +995,7 @@ public void propertyChange(PropertyChangeEvent evt) { } private void getPlatforms(JavaPlatformManager jpm) { - List> tmp = Arrays.stream(jpm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE, null))) + List> tmp = Arrays.stream(jpm.getPlatforms(null, new Specification(CommonProjectUtils.J2SE_PLATFORM_TYPE))) .filter(JavaPlatform::isValid) .peek((jp) -> LOG.log(Level.FINE, "Adding JavaPlaform: {0}", jp.getDisplayName())) //NOI18N .map((jp) -> Union2.createFirst(jp)) diff --git a/javafx/javafx2.platform/nbproject/project.properties b/javafx/javafx2.platform/nbproject/project.properties index ec4cf7317021..eceac33a0060 100644 --- a/javafx/javafx2.platform/nbproject/project.properties +++ b/javafx/javafx2.platform/nbproject/project.properties @@ -14,6 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -javac.source=1.8 +javac.release=21 javac.compilerargs=-Xlint -Xlint:-serial diff --git a/javafx/javafx2.platform/nbproject/project.xml b/javafx/javafx2.platform/nbproject/project.xml index ae6c75fbcb1b..11f519236290 100644 --- a/javafx/javafx2.platform/nbproject/project.xml +++ b/javafx/javafx2.platform/nbproject/project.xml @@ -67,7 +67,7 @@ 1 - 1.22 + 1.77 diff --git a/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/JavaFXPlatformJavadoc.java b/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/JavaFXPlatformJavadoc.java index 5bfed1b06211..a1c24d381529 100644 --- a/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/JavaFXPlatformJavadoc.java +++ b/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/JavaFXPlatformJavadoc.java @@ -170,9 +170,7 @@ public void propertyChange(PropertyChangeEvent evt) { private Collection findJavaPlatforms(@NonNull final File jfxrt) { final JavaPlatform[] jps = JavaPlatformManager.getDefault().getPlatforms( null, - new Specification( - "j2se", //NOI18N - null)); + new Specification("j2se")); //NOI18N final Collection res = new ArrayList(jps.length); final FileObject jfxrfFo = FileUtil.toFileObject(jfxrt); if (jfxrfFo != null) { diff --git a/javafx/javafx2.project/nbproject/project.properties b/javafx/javafx2.project/nbproject/project.properties index b6bb147a6316..406111c005cd 100644 --- a/javafx/javafx2.project/nbproject/project.properties +++ b/javafx/javafx2.project/nbproject/project.properties @@ -14,7 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -javac.source=1.8 +javac.release=21 javac.compilerargs=-Xlint -Xlint:-serial test.config.stable.includes=**/NewJavaFX2ProjectTest.class diff --git a/javafx/javafx2.project/nbproject/project.xml b/javafx/javafx2.project/nbproject/project.xml index 00520720d04d..15f39927b781 100644 --- a/javafx/javafx2.project/nbproject/project.xml +++ b/javafx/javafx2.project/nbproject/project.xml @@ -136,7 +136,7 @@ 1 - 1.36 + 1.77 diff --git a/javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/ChooseOtherPlatformPanel.java b/javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/ChooseOtherPlatformPanel.java index 1dd30f418053..72898cd6ca9b 100644 --- a/javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/ChooseOtherPlatformPanel.java +++ b/javafx/javafx2.project/src/org/netbeans/modules/javafx2/project/ChooseOtherPlatformPanel.java @@ -125,7 +125,7 @@ void refresh() { removeAllElements(); final JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms( null, - new Specification(type, null)); + new Specification(type)); for (JavaPlatform jp : platforms) { if (JavaFXPlatformUtils.isJavaFXEnabled(jp)) { addElement(jp); diff --git a/profiler/profiler.j2se/nbproject/project.xml b/profiler/profiler.j2se/nbproject/project.xml index d48dc76647ed..3475b3b313dc 100644 --- a/profiler/profiler.j2se/nbproject/project.xml +++ b/profiler/profiler.j2se/nbproject/project.xml @@ -48,7 +48,7 @@ 1 - 1.33 + 1.77 diff --git a/profiler/profiler.j2se/src/org/netbeans/modules/profiler/j2se/J2SEProjectProfilingSupportProvider.java b/profiler/profiler.j2se/src/org/netbeans/modules/profiler/j2se/J2SEProjectProfilingSupportProvider.java index 5e834fb643a2..1752d518e947 100644 --- a/profiler/profiler.j2se/src/org/netbeans/modules/profiler/j2se/J2SEProjectProfilingSupportProvider.java +++ b/profiler/profiler.j2se/src/org/netbeans/modules/profiler/j2se/J2SEProjectProfilingSupportProvider.java @@ -174,7 +174,7 @@ protected void setMainClass(final PropertyEvaluator pp, SessionSettings ss) { private static String getRemotePlatformHost(JavaPlatform platform) { for (org.netbeans.api.java.platform.JavaPlatform jp : JavaPlatformManager.getDefault().getPlatforms( null, - new Specification("j2se-remote", null))) { //NOI18N + new Specification("j2se-remote"))) { //NOI18N if (platform.getPlatformId().equals(jp.getProperties().get("platform.ant.name"))) { //NOI18N return jp.getProperties().get("platform.host"); //NOI18N } diff --git a/profiler/profiler.nbimpl/nbproject/project.xml b/profiler/profiler.nbimpl/nbproject/project.xml index 7cfecd140bdd..9448b50a07e3 100644 --- a/profiler/profiler.nbimpl/nbproject/project.xml +++ b/profiler/profiler.nbimpl/nbproject/project.xml @@ -138,7 +138,7 @@ 1 - 1.36 + 1.77 diff --git a/profiler/profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/providers/JavaPlatformManagerImpl.java b/profiler/profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/providers/JavaPlatformManagerImpl.java index 77201a776472..3c090a5874a7 100644 --- a/profiler/profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/providers/JavaPlatformManagerImpl.java +++ b/profiler/profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/providers/JavaPlatformManagerImpl.java @@ -34,8 +34,8 @@ @org.openide.util.lookup.ServiceProvider(service = org.netbeans.modules.profiler.spi.JavaPlatformManagerProvider.class) public class JavaPlatformManagerImpl extends JavaPlatformManagerProvider { - public static final Specification J2SE = new Specification("j2se", null); - public static final Specification REMOTE_J2SE = new Specification("j2se-remote", null); + public static final Specification J2SE = new Specification("j2se"); + public static final Specification REMOTE_J2SE = new Specification("j2se-remote"); @Override public List getPlatforms() { diff --git a/profiler/profiler.nbmodule/nbproject/project.properties b/profiler/profiler.nbmodule/nbproject/project.properties index eae27f46b248..5e4fb65fbc94 100644 --- a/profiler/profiler.nbmodule/nbproject/project.properties +++ b/profiler/profiler.nbmodule/nbproject/project.properties @@ -17,5 +17,5 @@ is.eager=true javac.compilerargs=-Xlint -Xlint:-serial -javac.source=1.8 +javac.release=21 diff --git a/profiler/profiler.nbmodule/nbproject/project.xml b/profiler/profiler.nbmodule/nbproject/project.xml index 89793e612420..2751542fbddf 100644 --- a/profiler/profiler.nbmodule/nbproject/project.xml +++ b/profiler/profiler.nbmodule/nbproject/project.xml @@ -58,7 +58,7 @@ 1 - 1.9 + 1.77 diff --git a/profiler/profiler.nbmodule/src/org/netbeans/modules/profiler/nbmodule/NbModuleProjectProfilingSupportProvider.java b/profiler/profiler.nbmodule/src/org/netbeans/modules/profiler/nbmodule/NbModuleProjectProfilingSupportProvider.java index aac270ca9fbe..04b9b9e0e9b0 100644 --- a/profiler/profiler.nbmodule/src/org/netbeans/modules/profiler/nbmodule/NbModuleProjectProfilingSupportProvider.java +++ b/profiler/profiler.nbmodule/src/org/netbeans/modules/profiler/nbmodule/NbModuleProjectProfilingSupportProvider.java @@ -113,7 +113,7 @@ private JavaPlatform getProjectJavaPlatform(Project project) { ProfilerLogger.debug("File " + projectDir.getPath()); //NOI18N } - org.netbeans.api.java.platform.JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification("j2se", null)); // NOI18N + org.netbeans.api.java.platform.JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms(null, new Specification("j2se")); // NOI18N for (int i = 0; i < platforms.length; i++) { org.netbeans.api.java.platform.JavaPlatform platform = platforms[i]; diff --git a/profiler/profiler.projectsupport/nbproject/project.xml b/profiler/profiler.projectsupport/nbproject/project.xml index a3c121b5ac29..1db85bf06eee 100644 --- a/profiler/profiler.projectsupport/nbproject/project.xml +++ b/profiler/profiler.projectsupport/nbproject/project.xml @@ -75,7 +75,7 @@ 1 - 1.9 + 1.77 diff --git a/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java b/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java index a582a0e77605..868fd6588b5e 100644 --- a/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java +++ b/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java @@ -120,7 +120,7 @@ public static URL generateHtmlFileURL(FileObject appletFile, FileObject buildDir if (activePlatform == null) { platform = pm.getDefaultPlatform(); } else { - JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se", null)); //NOI18N + JavaPlatform[] installedPlatforms = pm.getPlatforms(null, new Specification("j2se")); //NOI18N for (int i = 0; i < installedPlatforms.length; i++) { String antName = installedPlatforms[i].getProperties().get("platform.ant.name"); //NOI18N From 96fb5a91037308b894f6c70a3c45e380277514b6 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 30 Oct 2026 18:01:36 +0100 Subject: [PATCH 2/3] Refactored more usages to Runtime.Version variants. Assisted-by: qwen3.8-27b --- .../j2ee/jboss4/ide/JBStartRunnable.java | 8 ++--- .../wildfly/ide/WildflyStartRunnable.java | 6 ++-- .../java/api/common/applet/AppletSupport.java | 8 ++--- .../java/api/common/ui/PlatformUiSupport.java | 9 ++--- .../j2seembedded/platform/RemotePlatform.java | 16 ++++----- java/java.j2semodule/nbproject/project.xml | 2 +- .../ui/customizer/CustomizerLibraries.java | 5 ++- .../J2SELibraryClassPathProvider.java | 4 +-- .../J2SEPlatformCustomizer.java | 3 +- .../J2SEPlatformDefaultSourcesImpl.java | 8 ++--- .../platformdefinition/J2SEPlatformImpl.java | 3 +- .../queries/DefaultClassPathProvider.java | 6 ++-- java/java.j2seproject/nbproject/project.xml | 1 + .../j2seproject/J2SEProjectPlatformImpl.java | 6 ++-- .../ui/customizer/CustomizerLibraries.java | 5 ++- .../platform/FallbackDefaultJavaPlatform.java | 2 +- .../classpath/PlatformClassPathProvider.java | 7 ++-- .../queries/PlatformSourceForBinaryQuery.java | 5 ++- java/java.source/nbproject/project.xml | 2 +- .../org/netbeans/modules/java/JavaNode.java | 10 ++---- java/jshell.support/nbproject/project.xml | 2 +- .../modules/jshell/launch/ShellOptions.java | 9 ++--- .../execute/MavenCommandLineExecutor.java | 6 ++-- java/nashorn.execution/nbproject/project.xml | 1 + .../nashorn/execution/NashornPlatform.java | 36 ++++++++++--------- .../modules/javafx2/platform/Utils.java | 8 ++--- .../utilities/AppletSupport.java | 8 ++--- 27 files changed, 93 insertions(+), 93 deletions(-) diff --git a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java index 881261695849..733ca930f3fd 100644 --- a/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java +++ b/contrib/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/ide/JBStartRunnable.java @@ -49,7 +49,6 @@ import org.openide.execution.NbProcessDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.Utilities; @@ -96,8 +95,8 @@ class JBStartRunnable implements Runnable { private static final String NEW_IF_CONDITION_STRING = "\"xx\" == \"x\""; // NOI18N - private static final SpecificationVersion - JDK_14 = new SpecificationVersion("1.4"); // NOI18N + private static final Runtime.Version + JDK_14 = Runtime.Version.parse("1.4"); // NOI18N private static final Logger LOGGER = Logger.getLogger(JBStartRunnable.class.getName()); @@ -191,7 +190,8 @@ private String[] createEnvironment(final InstanceProperties ip) { if (startServer.getMode() == JBStartServer.MODE.DEBUG && !haveDebugOptions(javaOptsBuilder.toString())) { // if in debug mode and the debug options not specified manually - if (platform.getSpecification().getVersion().compareTo(JDK_14) <= 0) { + Runtime.Version platformVersion = platform.getSpecification().getJdkVersion(); + if (platformVersion != null && platformVersion.compareTo(JDK_14) <= 0) { javaOptsBuilder.append(" -classic"); javaOptsBuilder.append(" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address="). // NOI18N append(dm.getDebuggingPort()). diff --git a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java index de4dc79037d1..0737443547d5 100644 --- a/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java +++ b/enterprise/javaee.wildfly/src/org/netbeans/modules/javaee/wildfly/ide/WildflyStartRunnable.java @@ -52,7 +52,6 @@ import org.netbeans.modules.javaee.wildfly.util.WildFlyProperties; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.NbBundle; import org.openide.util.Utilities; @@ -88,7 +87,7 @@ class WildflyStartRunnable implements Runnable { private static final String NEW_IF_CONDITION_STRING = "\"xx\" == \"x\""; // NOI18N - private static final SpecificationVersion JDK_18 = new SpecificationVersion("1.8"); + private static final Runtime.Version JDK_18 = Runtime.Version.parse("1.8"); private final WildflyDeploymentManager dm; private final String instanceName; @@ -141,7 +140,8 @@ private void setupEnvironment(final InstanceProperties ip, Environment env) { javaOptsBuilder.append(" -Dlogging.configuration=").append(loggingProperties.toURL()); } } - if (platform.getSpecification().getVersion().compareTo(JDK_18) < 0) { + Runtime.Version platformVersion = platform.getSpecification().getJdkVersion(); + if (platformVersion != null && platformVersion.compareTo(JDK_18) < 0) { javaOptsBuilder.append(" -XX:MaxPermSize=256m"); } if ("64".equals(platform.getSystemProperties().get("sun.arch.data.model"))) { diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java index afd5fb7ec2dd..e9d1d4b4d04c 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/applet/AppletSupport.java @@ -36,7 +36,6 @@ import org.netbeans.api.java.source.TreeUtilities; import org.openide.*; -import org.openide.modules.SpecificationVersion; import org.openide.filesystems.*; import org.openide.util.*; @@ -53,7 +52,7 @@ public class AppletSupport { // JDK issue #6193279: Appletviewer does not accept encoded URLs - private static final SpecificationVersion JDK_15 = new SpecificationVersion("1.5"); // NOI18N + private static final Runtime.Version JDK_15 = Runtime.Version.parse("1.5"); // NOI18N /** constant for html extension */ private static final String HTML_EXT = "html"; // NOI18N @@ -211,8 +210,9 @@ public static URL getHTMLPageURL (FileObject htmlFile, String activePlatform) { assert htmlFile != null : "htmlFile cannot be null"; //NOI18N // JDK issue #6193279: Appletviewer does not accept encoded URLs JavaPlatform platform = CommonProjectUtils.getActivePlatform(activePlatform); - boolean workAround6193279 = platform != null //In case of nonexisting platform don't use the workaround - && platform.getSpecification().getVersion().compareTo(JDK_15)>=0; //JDK1.5 and higher + final Runtime.Version platformVersion = platform != null ? platform.getSpecification().getJdkVersion() : null; + boolean workAround6193279 = platformVersion != null //In case of nonexisting platform don't use the workaround + && platformVersion.compareTo(JDK_15) >= 0; //JDK1.5 and higher URL url = null; if (workAround6193279) { File f = FileUtil.toFile(htmlFile); diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java index aeae76451497..6d5682f03088 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java @@ -265,7 +265,7 @@ public static void storePlatform( if (updatePreferredPlatform && !isProjectLocalPlatform(platform)) { PreferredProjectPlatform.setPreferredPlatform(platform); } - SpecificationVersion jdk13 = new SpecificationVersion("1.3"); //NOI18N + Runtime.Version jdk13 = Runtime.Version.parse("1.3"); //NOI18N String platformAntName = platform.getProperties().get("platform.ant.name"); //NOI18N assert platformAntName != null; props.put(javaPlatformKey, platformAntName); @@ -313,11 +313,12 @@ public static void storePlatform( throw new AssertionError("Broken project.xml file"); } String explicitSourceAttrValue = explicitPlatform.getAttribute("explicit-source-supported"); //NOI18N - if (jdk13.compareTo(platform.getSpecification().getVersion()) >= 0 + Runtime.Version platformJdkVersion = platform.getSpecification().getJdkVersion(); + if (platformJdkVersion != null && jdk13.compareTo(platformJdkVersion) >= 0 && !"false".equals(explicitSourceAttrValue)) { //NOI18N explicitPlatform.setAttribute("explicit-source-supported", "false"); //NOI18N changed = true; - } else if (jdk13.compareTo(platform.getSpecification().getVersion()) < 0 + } else if (platformJdkVersion != null && jdk13.compareTo(platformJdkVersion) < 0 && !"true".equals(explicitSourceAttrValue)) { //NOI18N explicitPlatform.setAttribute("explicit-source-supported", "true"); //NOI18N changed = true; @@ -343,7 +344,7 @@ public static void storePlatform( // JDK 7 1.7 1.7 - coin // JDK 8 1.8 1.8 - lambdas // JDK 9 1.9 1.9 - jigsaw - if (jdk13.compareTo(sourceLevel) >= 0) { + if (new SpecificationVersion("1.3").compareTo(sourceLevel) >= 0) { javacTarget = "1.1"; //NOI18N } diff --git a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/RemotePlatform.java b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/RemotePlatform.java index c9c366dcd8d9..9bc35f0eea1c 100644 --- a/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/RemotePlatform.java +++ b/java/java.j2seembedded/src/org/netbeans/modules/java/j2seembedded/platform/RemotePlatform.java @@ -39,7 +39,7 @@ import org.netbeans.api.java.queries.SourceLevelQuery; import org.netbeans.spi.project.support.ant.PropertyUtils; import org.openide.filesystems.FileObject; -import org.openide.modules.SpecificationVersion; + import org.openide.util.NbBundle; import org.openide.util.Parameters; @@ -79,7 +79,7 @@ private RemotePlatform( this.props = new HashMap<>(properties); this.spec = new Specification( SPEC_NAME, - createSpecificationVersion(sysProperties.get("java.specification.version")), // NOI18N + createJdkVersion(sysProperties.get("java.specification.version")), // NOI18N NbBundle.getMessage(RemotePlatform.class, "TXT_RemotePlatform"), null); setSystemProperties(sysProperties); @@ -307,12 +307,12 @@ void setExecDecorator(@NullAllowed final String command) { //Utility methods @NonNull - private static SpecificationVersion createSpecificationVersion( + private static Runtime.Version createJdkVersion( @NullAllowed String version) { if (version != null) { try { - return new SpecificationVersion(version); - } catch (NumberFormatException nfe) { + return Runtime.Version.parse(version); + } catch (IllegalArgumentException e) { LOG.log( Level.WARNING, "Invalid specification version: {0}", // NOI18N @@ -321,14 +321,14 @@ private static SpecificationVersion createSpecificationVersion( do { version = version.substring(0, version.length() - 1); try { - return new SpecificationVersion(version); - } catch (NumberFormatException nfe) { + return Runtime.Version.parse(version); + } catch (IllegalArgumentException e) { // ignore } } while (version.length() > 0); } //Nothing return lower bound JDK 1.1 - return new SpecificationVersion("1.1"); // NOI18N + return Runtime.Version.parse("1.1"); // NOI18N } } diff --git a/java/java.j2semodule/nbproject/project.xml b/java/java.j2semodule/nbproject/project.xml index 07912272a040..5c7c58b6888b 100644 --- a/java/java.j2semodule/nbproject/project.xml +++ b/java/java.j2semodule/nbproject/project.xml @@ -110,7 +110,7 @@ 1 - 1.40 + 1.77 diff --git a/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/ui/customizer/CustomizerLibraries.java b/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/ui/customizer/CustomizerLibraries.java index d2828b081a39..f5b6e02dc945 100644 --- a/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/ui/customizer/CustomizerLibraries.java +++ b/java/java.j2semodule/src/org/netbeans/modules/java/j2semodule/ui/customizer/CustomizerLibraries.java @@ -45,7 +45,6 @@ import org.openide.NotifyDescriptor; import org.openide.awt.Mnemonics; import org.openide.filesystems.FileUtil; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; @@ -303,8 +302,8 @@ private void testBroken() { private void enableModules() { Object selectedItem = this.jComboBoxTarget.getSelectedItem(); JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem)); - SpecificationVersion sv = jp != null ? jp.getSpecification().getVersion() : null; - boolean modulesEnabled = sv != null && new SpecificationVersion("1.9").compareTo(sv) <= 0; + Runtime.Version sv = jp != null ? jp.getSpecification().getJdkVersion() : null; + boolean modulesEnabled = sv != null && Runtime.Version.parse("1.9").compareTo(sv) <= 0; compilePathsCustomizer.setModulesEnabled(modulesEnabled); processorPathsCustomizer.setModulesEnabled(modulesEnabled); compileTestsPathsCustomizer.setModulesEnabled(modulesEnabled); diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SELibraryClassPathProvider.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SELibraryClassPathProvider.java index bc54494f51a2..f7e14daf3793 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SELibraryClassPathProvider.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/libraries/J2SELibraryClassPathProvider.java @@ -36,7 +36,6 @@ import org.netbeans.spi.java.classpath.ClassPathProvider; import org.netbeans.spi.java.classpath.support.ClassPathSupport; import org.netbeans.api.java.platform.JavaPlatformManager; -import org.netbeans.modules.java.j2seplatform.platformdefinition.Util; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.filesystems.URLMapper; @@ -89,6 +88,7 @@ private ClassPath[] findClassPathOrNull( FileObject root = getOwnerRoot(file,resources); if (root != null) { final JavaPlatform defPlatform = JavaPlatformManager.getDefault().getDefaultPlatform(); + final Runtime.Version defPlatformVersion = defPlatform.getSpecification().getJdkVersion(); setLastUsedLibrary(root, lib); if (ClassPath.SOURCE.equals(type)) { return new ClassPath[] {ClassPathSupport.createClassPath(resources.toArray(new URL[0]))}; @@ -98,7 +98,7 @@ private ClassPath[] findClassPathOrNull( } else if (ClassPath.BOOT.equals(type)) { return new ClassPath[] {defPlatform.getBootstrapLibraries()}; } else if (JavaClassPathConstants.MODULE_BOOT_PATH.equals(type) && - Util.JDK9.compareTo(defPlatform.getSpecification().getVersion()) <= 0) { + defPlatformVersion != null && defPlatformVersion.feature() >= 9) { return new ClassPath[] {defPlatform.getBootstrapLibraries()}; } else { return new ClassPath[] {null}; diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java index 5d69e64fb8ae..237ed202cded 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformCustomizer.java @@ -224,6 +224,7 @@ public void valueChanged(ListSelectionEvent e) { c.weighty = 1.0; ((GridBagLayout)this.getLayout()).setConstraints(spane,c); this.add (spane); + Runtime.Version jdkVersion = platform.getSpecification().getJdkVersion(); if (type == SOURCES || type == JAVADOC) { this.addButton = new JButton (); String text; @@ -327,7 +328,7 @@ public void actionPerformed(ActionEvent e) { c.insets = new Insets (5,6,6,6); ((GridBagLayout)this.getLayout()).setConstraints(moveDownButton,c); this.add (moveDownButton); - } else if (platform.getSpecification().getVersion().compareTo(Util.JDK9) >= 0) { + } else if (jdkVersion != null && jdkVersion.feature() >= 9) { RP.execute(new Runnable() { @Override public void run() { diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultSourcesImpl.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultSourcesImpl.java index 5174215c6183..1511a5fed092 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultSourcesImpl.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultSourcesImpl.java @@ -30,12 +30,12 @@ import java.util.List; import java.util.stream.Collectors; import org.netbeans.api.annotations.common.NonNull; +import org.netbeans.api.annotations.common.NullAllowed; import org.netbeans.api.java.platform.JavaPlatform; import org.netbeans.modules.java.j2seplatform.spi.J2SEPlatformDefaultSources; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.filesystems.URLMapper; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.Utilities; import org.openide.util.lookup.ServiceProvider; @@ -61,13 +61,13 @@ public List getDefaultSources(@NonNull final JavaPlatform platform) { if (javaHome == null) { return Collections.emptyList(); } - return getSources(javaHome, platform.getSpecification().getVersion()); + return getSources(javaHome, platform.getSpecification().getJdkVersion()); } @NonNull private static List getSources ( @NonNull final File javaHome, - @NonNull final SpecificationVersion version) { + @NullAllowed final Runtime.Version version) { try { File f; //On VMS, the root of the "src.zip" is "src", and this causes @@ -97,7 +97,7 @@ private static List getSources ( if (f.exists() && f.canRead()) { URL url = FileUtil.getArchiveRoot(Utilities.toURI(f).toURL()); List res = Collections.singletonList (url.toURI()); - if (Util.JDK9.compareTo(version)<=0) { + if (version != null && version.feature() >= 9) { final FileObject fo = URLMapper.findFileObject(url); if (fo.getFileObject("java.base") != null) { //NOI18N res = Arrays.stream(fo.getChildren()) diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java index 99d55277bd6e..a3b1f4151221 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformImpl.java @@ -252,7 +252,8 @@ public ClassPath getBootstrapLibraries() { if (cp != null) { return cp; } - if (Util.JDK9.compareTo(getSpecification().getVersion())<=0) { //NOI18N + Runtime.Version platformVersion = getSpecification().getJdkVersion(); + if (platformVersion != null && platformVersion.feature() >= 9) { cp = Util.createModulePath(getInstallFolders()); } if (cp == null) { diff --git a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java index 032040df1534..d365de5e1de6 100644 --- a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java +++ b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/queries/DefaultClassPathProvider.java @@ -198,7 +198,8 @@ public ClassPath findClassPath(FileObject file, String type) { } } else if (JavaClassPathConstants.MODULE_BOOT_PATH.equals(type)) { final JavaPlatform defaultPlatform = JavaPlatformManager.getDefault().getDefaultPlatform(); - if (defaultPlatform != null && Util.JDK9.compareTo(defaultPlatform.getSpecification().getVersion()) <= 0) { + final Runtime.Version platformVersion = defaultPlatform != null ? defaultPlatform.getSpecification().getJdkVersion() : null; + if (platformVersion != null && platformVersion.feature() >= 9) { return defaultPlatform.getBootstrapLibraries(); } } @@ -299,7 +300,8 @@ private JavaPlatform hasJava9( Collections.addAll(platforms, JavaPlatformManager.getDefault().getInstalledPlatforms()); for (JavaPlatform jp : platforms) { final Specification spec = jp.getSpecification(); - if ("j2se".equals(spec.getName()) && Util.JDK9.compareTo(spec.getVersion()) <= 0) { //NOI18N + final Runtime.Version version = spec.getJdkVersion(); + if ("j2se".equals(spec.getName()) && version != null && version.feature() >= 9) { //NOI18N java9 = jp; break; } diff --git a/java/java.j2seproject/nbproject/project.xml b/java/java.j2seproject/nbproject/project.xml index 48354c457de8..f92d3c62aacd 100644 --- a/java/java.j2seproject/nbproject/project.xml +++ b/java/java.j2seproject/nbproject/project.xml @@ -127,6 +127,7 @@ 1 + 1.77 diff --git a/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectPlatformImpl.java b/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectPlatformImpl.java index 3ee915693b4f..5573263df5bc 100644 --- a/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectPlatformImpl.java +++ b/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectPlatformImpl.java @@ -36,7 +36,6 @@ import org.netbeans.spi.project.support.ant.AntProjectHelper; import org.netbeans.spi.project.support.ant.EditableProperties; import org.netbeans.spi.project.support.ant.PropertyEvaluator; -import org.openide.modules.SpecificationVersion; import org.openide.util.Mutex; import org.openide.util.MutexException; import org.openide.util.Parameters; @@ -163,11 +162,10 @@ static boolean updateProjectXml( final Element platformNode = insertBefore.getOwnerDocument().createElementNS( J2SEProject.PROJECT_CONFIGURATION_NAMESPACE, "explicit-platform"); //NOI18N + Runtime.Version version = platform.getSpecification().getJdkVersion(); platformNode.setAttribute( "explicit-source-supported", //NOI18N - platform.getSpecification().getVersion().compareTo(new SpecificationVersion("1.3"))>0? //NOI18N - "true": //NOI18N - "false"); //NOI18N + (version != null && version.compareTo(Runtime.Version.parse("1.3")) > 0) ? "true" : "false"); //NOI18N root.insertBefore(platformNode, insertBefore); if ("explicit-platform".equals(insertBefore.getNodeName())) { //NOI18N root.removeChild(insertBefore); diff --git a/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java b/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java index c74551fc9b49..18f07028889c 100644 --- a/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java +++ b/java/java.j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerLibraries.java @@ -45,7 +45,6 @@ import org.openide.NotifyDescriptor; import org.openide.awt.Mnemonics; import org.openide.filesystems.FileUtil; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.HelpCtx; import org.openide.util.NbBundle; @@ -303,8 +302,8 @@ private void testBroken() { private void enableModules() { Object selectedItem = this.jComboBoxTarget.getSelectedItem(); JavaPlatform jp = (selectedItem == null ? null : PlatformUiSupport.getPlatform(selectedItem)); - SpecificationVersion sv = jp != null ? jp.getSpecification().getVersion() : null; - boolean modulesEnabled = sv != null && new SpecificationVersion("1.9").compareTo(sv) <= 0; + Runtime.Version sv = jp != null ? jp.getSpecification().getJdkVersion() : null; + boolean modulesEnabled = sv != null && Runtime.Version.parse("1.9").compareTo(sv) <= 0; compilePathsCustomizer.setModulesEnabled(modulesEnabled); processorPathsCustomizer.setModulesEnabled(modulesEnabled); compileTestsPathsCustomizer.setModulesEnabled(modulesEnabled); diff --git a/java/java.platform/src/org/netbeans/modules/java/platform/FallbackDefaultJavaPlatform.java b/java/java.platform/src/org/netbeans/modules/java/platform/FallbackDefaultJavaPlatform.java index 38ca05b478de..0011186eb781 100644 --- a/java/java.platform/src/org/netbeans/modules/java/platform/FallbackDefaultJavaPlatform.java +++ b/java/java.platform/src/org/netbeans/modules/java/platform/FallbackDefaultJavaPlatform.java @@ -135,7 +135,7 @@ public String getVendor() { @Override public Specification getSpecification() { - return new Specification(/*J2SEPlatformImpl.PLATFORM_J2SE*/"j2se", Dependency.JAVA_SPEC); // NOI18N + return new Specification(/*J2SEPlatformImpl.PLATFORM_J2SE*/"j2se", Runtime.version()); // NOI18N } @Override diff --git a/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java b/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java index ccfdbb574994..cc197623dc7a 100644 --- a/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java +++ b/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java @@ -35,13 +35,9 @@ import org.netbeans.api.java.platform.JavaPlatform; import org.netbeans.api.java.platform.JavaPlatformManager; import org.netbeans.spi.java.classpath.PathResourceImplementation; -import org.openide.modules.SpecificationVersion; - @org.openide.util.lookup.ServiceProvider(service=org.netbeans.spi.java.classpath.ClassPathProvider.class, position=150) public class PlatformClassPathProvider implements ClassPathProvider { - private static final SpecificationVersion JAVA_9 = new SpecificationVersion("9"); //NOI18N - private static final Set SUPPORTED_CLASS_PATH_TYPES = new HashSet(Arrays.asList(new String[]{ ClassPath.SOURCE, @@ -78,7 +74,8 @@ public ClassPath findClassPath(FileObject fo, String type) { ClassPath libraryPath = jp.getStandardLibraries(); ClassPath sourcePath = jp.getSourceFolders(); FileObject root = null; - boolean jdk9 = JAVA_9.compareTo(jp.getSpecification().getVersion()) <= 0; + Runtime.Version platformVersion = jp.getSpecification().getJdkVersion(); + boolean jdk9 = platformVersion != null && platformVersion.feature() >= 9; if (ClassPath.SOURCE.equals(type) && sourcePath != null && (root = sourcePath.findOwnerRoot(fo))!=null) { this.setLastUsedPlatform (root,jp); diff --git a/java/java.platform/src/org/netbeans/modules/java/platform/queries/PlatformSourceForBinaryQuery.java b/java/java.platform/src/org/netbeans/modules/java/platform/queries/PlatformSourceForBinaryQuery.java index abf224a1e0cd..ae95ae52346e 100644 --- a/java/java.platform/src/org/netbeans/modules/java/platform/queries/PlatformSourceForBinaryQuery.java +++ b/java/java.platform/src/org/netbeans/modules/java/platform/queries/PlatformSourceForBinaryQuery.java @@ -42,7 +42,6 @@ import org.netbeans.api.java.platform.Specification; import org.netbeans.api.java.queries.SourceForBinaryQuery; import org.netbeans.spi.java.queries.SourceForBinaryQueryImplementation2; -import org.openide.modules.SpecificationVersion; import org.openide.util.ChangeSupport; import org.openide.util.Exceptions; import org.openide.util.Parameters; @@ -153,7 +152,6 @@ static boolean contains( private static final class Result implements SourceForBinaryQueryImplementation2.Result, PropertyChangeListener { private static final String J2SE = "j2se"; //NOI18N - private static final SpecificationVersion JAVA_9 = new SpecificationVersion("9"); //NOI18N private final JavaPlatformManager jpm; private final URL artifact; @@ -265,7 +263,8 @@ private synchronized boolean updateCandidates() { //Todo: SPI will be required when more platforms than J2SE will be modular private static boolean isModular(@NonNull final JavaPlatform platform) { final Specification spec = platform.getSpecification(); - return J2SE.equals(spec.getName()) && JAVA_9.compareTo(spec.getVersion()) <= 0; + final Runtime.Version version = spec.getJdkVersion(); + return J2SE.equals(spec.getName()) && version != null && version.feature() >= 9; } @CheckForNull diff --git a/java/java.source/nbproject/project.xml b/java/java.source/nbproject/project.xml index a095d39ec937..696ed5405890 100644 --- a/java/java.source/nbproject/project.xml +++ b/java/java.source/nbproject/project.xml @@ -202,7 +202,7 @@ 1 - 1.35 + 1.77 diff --git a/java/java.source/src/org/netbeans/modules/java/JavaNode.java b/java/java.source/src/org/netbeans/modules/java/JavaNode.java index f37541af3bb2..de462bd57e82 100644 --- a/java/java.source/src/org/netbeans/modules/java/JavaNode.java +++ b/java/java.source/src/org/netbeans/modules/java/JavaNode.java @@ -75,7 +75,6 @@ import org.openide.filesystems.*; import org.openide.loaders.DataNode; import org.openide.loaders.DataObject; -import org.openide.modules.SpecificationVersion; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.PropertySupport; @@ -435,18 +434,15 @@ public JDKPicker() { private void initModel() { jdks = Stream.of(JavaPlatformManager.getDefault().getInstalledPlatforms()) - .filter(jdk -> isCompatible(jdk.getSpecification().getVersion())) + .filter(jdk -> isCompatible(jdk.getSpecification().getJdkVersion())) .map(jdk -> jdk.getDisplayName()) .sorted(Comparator.reverseOrder()) .toArray(String[]::new); jdkCombo.setModel(new DefaultComboBoxModel(jdks)); } - private static boolean isCompatible(SpecificationVersion jdkVerison) { - try { - return Integer.parseInt(jdkVerison.toString()) >= 11; - } catch (NumberFormatException ignore) {} - return false; + private static boolean isCompatible(Runtime.Version jdkVersion) { + return jdkVersion != null && jdkVersion.feature() >= 11; } @Override diff --git a/java/jshell.support/nbproject/project.xml b/java/jshell.support/nbproject/project.xml index db3c32fc99f6..b098e3d9483a 100644 --- a/java/jshell.support/nbproject/project.xml +++ b/java/jshell.support/nbproject/project.xml @@ -279,7 +279,7 @@ 1 - 1.40 + 1.77 diff --git a/java/jshell.support/src/org/netbeans/modules/jshell/launch/ShellOptions.java b/java/jshell.support/src/org/netbeans/modules/jshell/launch/ShellOptions.java index de9509c4204c..774c02a62475 100644 --- a/java/jshell.support/src/org/netbeans/modules/jshell/launch/ShellOptions.java +++ b/java/jshell.support/src/org/netbeans/modules/jshell/launch/ShellOptions.java @@ -22,7 +22,6 @@ import org.netbeans.api.java.platform.JavaPlatform; import org.netbeans.api.java.platform.JavaPlatformManager; import org.netbeans.api.java.platform.Specification; -import org.openide.modules.SpecificationVersion; import org.openide.util.NbPreferences; /** @@ -30,7 +29,7 @@ * @author sdedic */ public final class ShellOptions { - public static final SpecificationVersion MIN_SPEC_VERSION = new SpecificationVersion("1.6"); // NOI18N + public static final Runtime.Version MIN_SPEC_VERSION = Runtime.Version.parse("1.6"); // NOI18N private static final String PREF_PLATFORM = "launchPlatformId"; // NOI18N private static final String PREF_OPEN_CONSOLE = "openConsoleOnLaunch"; // NOI18N @@ -105,7 +104,8 @@ public JavaPlatform getSelectedPlatform() { public JavaPlatform getDefaultPlatform() { JavaPlatform check = JavaPlatform.getDefault(); - if (check.getSpecification().getVersion().compareTo(MIN_SPEC_VERSION) >= 0) { + Runtime.Version v = check.getSpecification().getJdkVersion(); + if (v != null && v.compareTo(MIN_SPEC_VERSION) >= 0) { return check; } JavaPlatform[] candidates = JavaPlatformManager.getDefault().getPlatforms(null, @@ -118,6 +118,7 @@ public static ShellOptions get() { } public boolean accepts(JavaPlatform p) { - return p.getSpecification().getVersion().compareTo(MIN_SPEC_VERSION) >= 0; + Runtime.Version v = p.getSpecification().getJdkVersion(); + return v != null && v.compareTo(MIN_SPEC_VERSION) >= 0; } } diff --git a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java index 10c461f86cbd..a8a4d2668dff 100644 --- a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java +++ b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java @@ -81,7 +81,6 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; -import org.openide.modules.SpecificationVersion; import org.openide.util.Exceptions; import org.openide.util.ImageUtilities; import org.openide.util.Lookup; @@ -135,7 +134,7 @@ public class MavenCommandLineExecutor extends AbstractMavenExecutor { */ private final Throwable trace; - private static final SpecificationVersion VER18 = new SpecificationVersion("1.8"); //NOI18N + private static final Runtime.Version VER18 = Runtime.Version.parse("1.8"); //NOI18N private static final Logger LOGGER = Logger.getLogger(MavenCommandLineExecutor.class.getName()); private static final RequestProcessor RP = new RequestProcessor(MavenCommandLineExecutor.class.getName(),1); @@ -401,7 +400,8 @@ private boolean isEventSpyCompatible(final BeanRunConfig clonedConfig) { if (clonedConfig.getProject() != null) { ActiveJ2SEPlatformProvider javaprov = clonedConfig.getProject().getLookup().lookup(ActiveJ2SEPlatformProvider.class); JavaPlatform platform = javaprov.getJavaPlatform(); - return (platform.getSpecification().getVersion().compareTo(VER18) >= 0); + final Runtime.Version version = platform.getSpecification().getJdkVersion(); + return version != null && version.compareTo(VER18) >= 0; } else { return true; } diff --git a/java/nashorn.execution/nbproject/project.xml b/java/nashorn.execution/nbproject/project.xml index 47037b00927a..85c62e1f619d 100644 --- a/java/nashorn.execution/nbproject/project.xml +++ b/java/nashorn.execution/nbproject/project.xml @@ -64,6 +64,7 @@ 1 + 1.77 diff --git a/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/NashornPlatform.java b/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/NashornPlatform.java index c2869e9960a6..57539820e492 100644 --- a/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/NashornPlatform.java +++ b/java/nashorn.execution/src/org/netbeans/modules/nashorn/execution/NashornPlatform.java @@ -33,7 +33,6 @@ import org.netbeans.api.java.platform.JavaPlatformManager; import org.netbeans.modules.java.api.common.ui.PlatformFilter; import org.netbeans.modules.nashorn.execution.options.Settings; -import org.openide.modules.SpecificationVersion; import org.openide.util.WeakListeners; /** @@ -43,7 +42,7 @@ public class NashornPlatform { private static final String NASHORN_PLATFORM_VERSION = "1.8"; // NOI18N - private static final SpecificationVersion SMALLEST_VERSION = new SpecificationVersion(NASHORN_PLATFORM_VERSION); + private static final Runtime.Version SMALLEST_VERSION = Runtime.Version.parse(NASHORN_PLATFORM_VERSION); private static NashornPlatform INSTANCE; @@ -74,27 +73,30 @@ public JavaPlatform getPlatform() { return nashornPlatform; } - private static SpecificationVersion getPlatformVersion(JavaPlatform p) { + private static Runtime.Version getPlatformVersion(JavaPlatform p) { if (p == null) { - return new SpecificationVersion("1.8"); // NOI18N + return Runtime.Version.parse("1.8"); // NOI18N } - return p.getSpecification().getVersion(); + return p.getSpecification().getJdkVersion(); } public static boolean isNashornSupported(JavaPlatform p) { - SpecificationVersion version = getPlatformVersion(p); + Runtime.Version version = getPlatformVersion(p); + if (version == null) { + return false; + } if (version.equals(SMALLEST_VERSION)) { return true; } - if (version.compareTo(new SpecificationVersion("15")) < 0) { // NOI18N + if (version.feature() < 15) { return true; } return false; } public static boolean isGraalJsSupported(JavaPlatform p) { - SpecificationVersion version = getPlatformVersion(p); - if (version.compareTo(SMALLEST_VERSION) < 0) { + Runtime.Version version = getPlatformVersion(p); + if (version == null || version.compareTo(SMALLEST_VERSION) < 0) { return false; } return true; @@ -129,10 +131,9 @@ private void fireChangeEvent() { private static JavaPlatform getNashornPlatform(JavaPlatformManager platformManager) { String nashornPlatformDisplayName = Settings.getPreferences().get(Settings.PREF_NASHORN_PLATFORM_DISPLAY_NAME, null); - SpecificationVersion smallestVersion = new SpecificationVersion(NASHORN_PLATFORM_VERSION); JavaPlatform defaultPlatform = platformManager.getDefaultPlatform(); - SpecificationVersion version = defaultPlatform.getSpecification().getVersion(); - if (version.compareTo(smallestVersion) >= 0) { + Runtime.Version version = defaultPlatform.getSpecification().getJdkVersion(); + if (version != null && version.compareTo(SMALLEST_VERSION) >= 0) { if (nashornPlatformDisplayName == null || nashornPlatformDisplayName.equals(defaultPlatform.getDisplayName())) { return defaultPlatform; @@ -140,7 +141,8 @@ private static JavaPlatform getNashornPlatform(JavaPlatformManager platformManag } // Check the rest: for (JavaPlatform jp : platformManager.getInstalledPlatforms()) { - if (jp.getSpecification().getVersion().compareTo(smallestVersion) >= 0) { + Runtime.Version jpVersion = jp.getSpecification().getJdkVersion(); + if (jpVersion != null && jpVersion.compareTo(SMALLEST_VERSION) >= 0) { if (nashornPlatformDisplayName == null || nashornPlatformDisplayName.equals(jp.getDisplayName())) { @@ -153,12 +155,13 @@ private static JavaPlatform getNashornPlatform(JavaPlatformManager platformManag if (nashornPlatformDisplayName != null) { // Did not find the platform that we have in settings, // choose some suitable one instead: - if (version.compareTo(smallestVersion) >= 0) { + if (version != null && version.compareTo(SMALLEST_VERSION) >= 0) { return defaultPlatform; } // The default is insufficient, check the rest: for (JavaPlatform jp : platformManager.getInstalledPlatforms()) { - if (jp.getSpecification().getVersion().compareTo(smallestVersion) >= 0) { + Runtime.Version jpVersion = jp.getSpecification().getJdkVersion(); + if (jpVersion != null && jpVersion.compareTo(SMALLEST_VERSION) >= 0) { if (!jp.getInstallFolders().isEmpty()) { // Check for broken platforms return jp; } @@ -182,7 +185,8 @@ public void setPlatform(JavaPlatform selectedPlatform) { } public static boolean isJsJvmPlatform(JavaPlatform platform) { - return platform.getSpecification().getVersion().compareTo(SMALLEST_VERSION) >= 0; + Runtime.Version version = platform.getSpecification().getJdkVersion(); + return version != null && version.compareTo(SMALLEST_VERSION) >= 0; } public static PlatformFilter getFilter() { diff --git a/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/Utils.java b/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/Utils.java index 9d03cac12d6e..7c247091a6c7 100644 --- a/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/Utils.java +++ b/javafx/javafx2.platform/src/org/netbeans/modules/javafx2/platform/Utils.java @@ -28,7 +28,6 @@ import org.netbeans.api.java.classpath.ClassPath; import org.netbeans.api.java.platform.JavaPlatform; import org.openide.filesystems.FileUtil; -import org.openide.modules.SpecificationVersion; import org.openide.util.NbBundle; import org.openide.util.Parameters; @@ -53,7 +52,6 @@ public final class Utils { private static final String JDK_JRE_PATH = "jre/"; //NOI18N private static final String[] JFXRT_JAR_JRE_PATHS = {"lib/", "lib/ext/"}; //NOI18N private static final String[] JFXRT_OPTIONAL_JARS = {"javaws.jar", "deploy.jar", "plugin.jar"}; // NOI18N - private static final SpecificationVersion JDK9 = new SpecificationVersion("9"); //NOI18N private static final String MODULE_PROTOCOL = "nbjrt"; //NOI18N private static final String MODULE_JFX_BASE = "javafx.base"; //NOI18N private static final String URL_SEPARATOR = "/"; //NOI18N @@ -105,7 +103,8 @@ public static String[] getJavaFxRuntimeLocations() { */ @NonNull public static String getJavaFxRuntimeSubDir(@NonNull final JavaPlatform platform) { - return JDK9.compareTo(platform.getSpecification().getVersion()) <= 0 && isModular(platform) ? + Runtime.Version version = platform.getSpecification().getJdkVersion(); + return version != null && version.feature() >= 9 && isModular(platform) ? "": //NOI18N JDK_JRE_PATH; } @@ -135,7 +134,8 @@ public static String[] getJavaFxRuntimeOptionalNames() { * @return returns true if the JavaFx is available as a platform module */ public static boolean hasJavaFxModule(@NonNull final JavaPlatform javaPlatform) { - if (JDK9.compareTo(javaPlatform.getSpecification().getVersion()) > 0) { + Runtime.Version version = javaPlatform.getSpecification().getJdkVersion(); + if (version == null || version.feature() < 9) { return false; } for (ClassPath.Entry e : javaPlatform.getBootstrapLibraries().entries()) { diff --git a/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java b/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java index 868fd6588b5e..94a7c109cc74 100644 --- a/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java +++ b/profiler/profiler.projectsupport/src/org/netbeans/modules/profiler/projectsupport/utilities/AppletSupport.java @@ -23,7 +23,6 @@ import org.netbeans.api.java.platform.*; import org.openide.*; import org.openide.filesystems.*; -import org.openide.modules.SpecificationVersion; import org.openide.util.*; import java.io.*; import java.net.*; @@ -54,7 +53,7 @@ public class AppletSupport { //~ Static fields/initializers ----------------------------------------------------------------------------------------------- // JDK issue #6193279: Appletviewer does not accept encoded URLs - private static final SpecificationVersion JDK_15 = new SpecificationVersion("1.5"); // NOI18N + private static final Runtime.Version JDK_15 = Runtime.Version.parse("1.5"); // NOI18N /** * constant for html extension @@ -133,8 +132,9 @@ public static URL generateHtmlFileURL(FileObject appletFile, FileObject buildDir } } - boolean workAround6193279 = (platform != null //In case of nonexisting platform don't use the workaround - ) && (platform.getSpecification().getVersion().compareTo(JDK_15) >= 0); //JDK1.5 and higher + Runtime.Version platformVersion = platform != null ? platform.getSpecification().getJdkVersion() : null; + boolean workAround6193279 = platformVersion != null //In case of nonexisting platform don't use the workaround + && platformVersion.compareTo(JDK_15) >= 0; //JDK1.5 and higher if (workAround6193279) { File f = FileUtil.toFile(html); From 06c1c1d3fa4b590e48a5ea749bd792bb31fe911d Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 30 Oct 2026 17:14:04 +0100 Subject: [PATCH 3/3] Consistently sort java platforms in drop down menus newest first, as implemented in other places already --- .../java/api/common/ui/PlatformUiSupport.java | 13 ++++++++----- java/java.platform.ui/nbproject/project.xml | 2 +- .../java/platform/ui/PlatformsCustomizer.java | 7 ++++++- .../modules/java/project/ui/FixPlatform.java | 13 +++---------- .../java/project/ui/FixProjectSourceLevel.java | 16 +++++++++++----- .../modules/maven/customizer/CompilePanel.java | 9 +++++++-- .../modules/maven/options/SettingsPanel.java | 5 ++++- 7 files changed, 40 insertions(+), 25 deletions(-) diff --git a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java index 6d5682f03088..5538bb5808d8 100644 --- a/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java +++ b/java/java.api.common/src/org/netbeans/modules/java/api/common/ui/PlatformUiSupport.java @@ -527,7 +527,7 @@ public static ListCellRenderer createProfileListCellRenderer() { * This class represents a JavaPlatform in the {@link ListModel} * created by the {@link PlatformUiSupport#createPlatformComboBoxModel(String)} method. */ - private static final class PlatformKey implements Comparable { + private static final class PlatformKey implements Comparable { private String name; private boolean equalsDefaultPlatformName; @@ -574,14 +574,17 @@ public PlatformKey( this.name = name; } - public int compareTo(Object o) { - return this.getDisplayName().compareTo(((PlatformKey) o).getDisplayName()); + @Override + public int compareTo(PlatformKey other) { + if (this.platform != null && other.platform != null) { + return other.platform.getSpecification().compareTo(this.platform.getSpecification()); + } + return other.getDisplayName().compareTo(this.getDisplayName()); } @Override public boolean equals(Object other) { - if (other instanceof PlatformKey) { - PlatformKey otherKey = (PlatformKey) other; + if (other instanceof PlatformKey otherKey) { boolean equals; if (this.platform == null) { equals = otherKey.platform == null; diff --git a/java/java.platform.ui/nbproject/project.xml b/java/java.platform.ui/nbproject/project.xml index afb308f4f3d2..0e0565a164f1 100644 --- a/java/java.platform.ui/nbproject/project.xml +++ b/java/java.platform.ui/nbproject/project.xml @@ -58,7 +58,7 @@ 1 - 1.36 + 1.77 diff --git a/java/java.platform.ui/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java b/java/java.platform.ui/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java index d8b84fc7a9e7..2c216c72e5ad 100644 --- a/java/java.platform.ui/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java +++ b/java/java.platform.ui/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java @@ -726,7 +726,12 @@ private static class PlatformNodeComparator implements Comparator { @Override public int compare(Node n1, Node n2) { - return n1.getDisplayName().compareTo(n2.getDisplayName()); + JavaPlatform p1 = n1.getLookup().lookup(JavaPlatform.class); + JavaPlatform p2 = n2.getLookup().lookup(JavaPlatform.class); + if (p1 != null && p2 != null) { + return p2.getSpecification().compareTo(p1.getSpecification()); + } + return n2.getDisplayName().compareTo(n1.getDisplayName()); } } diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java index 3ece40574781..b49d8eba4227 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixPlatform.java @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Optional; @@ -309,16 +310,8 @@ private void init () { toSelect = broken; newPlatfs.add(broken); } - newPlatfs.sort((p1,p2) -> { - if (p1 == broken) { - return -1; - } - if (p2 == broken) { - return 1; - } - return p1.getDisplayName().compareTo(p2.getDisplayName()); - }); - platforms = newPlatfs.toArray(new JavaPlatform[0]); + newPlatfs.sort(Comparator.comparing(JavaPlatform::getSpecification).reversed()); + platforms = newPlatfs.toArray(JavaPlatform[]::new); setSelectedItem(toSelect); } diff --git a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java index e4fd755b2eb2..324f15a13f9e 100644 --- a/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java +++ b/java/java.project.ui/src/org/netbeans/modules/java/project/ui/FixProjectSourceLevel.java @@ -19,6 +19,9 @@ package org.netbeans.modules.java.project.ui; import java.awt.Component; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListCellRenderer; import javax.swing.JList; @@ -175,7 +178,6 @@ private static final class PlatformModel extends DefaultComboBoxModel { private final String type; private final SpecificationVersion minVersion; - PlatformModel( @NonNull final String type, @NonNull final SpecificationVersion minVersion) { @@ -184,19 +186,23 @@ private static final class PlatformModel extends DefaultComboBoxModel { refresh(); } - void refresh() { removeAllElements(); final JavaPlatform[] platforms = JavaPlatformManager.getDefault().getPlatforms( null, new Specification(type)); + List filteredPlatforms = new ArrayList<>(); for (JavaPlatform jp : platforms) { if (minVersion.compareTo(jp.getSpecification().getVersion()) <= 0) { - addElement(jp); + filteredPlatforms.add(jp); } } + filteredPlatforms.sort(Comparator.comparing(JavaPlatform::getSpecification).reversed()); + for (JavaPlatform jp : filteredPlatforms) { + addElement(jp); } } + } private static class PlatformRenderer extends DefaultListCellRenderer { @@ -207,8 +213,8 @@ public Component getListCellRendererComponent( final int index, final boolean isSelected, final boolean cellHasFocus) { - if (value instanceof JavaPlatform) { - value = ((JavaPlatform)value).getDisplayName(); + if (value instanceof JavaPlatform javaPlatform) { + value = javaPlatform.getDisplayName(); } return super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); } diff --git a/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java b/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java index 6411c4455e90..48a6486846e2 100644 --- a/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java +++ b/java/maven/src/org/netbeans/modules/maven/customizer/CompilePanel.java @@ -999,8 +999,13 @@ private void getPlatforms(JavaPlatformManager jpm) { .filter(JavaPlatform::isValid) .peek((jp) -> LOG.log(Level.FINE, "Adding JavaPlaform: {0}", jp.getDisplayName())) //NOI18N .map((jp) -> Union2.createFirst(jp)) - .sorted((jp1, jp2) -> displayName(jp2).compareTo(displayName(jp1))) - .collect(Collectors.toCollection(ArrayList::new)); + .sorted((jp1, jp2) -> { + if (jp1.hasFirst() && jp2.hasFirst()) { + return jp2.first().getSpecification().compareTo(jp1.first().getSpecification()); + } + return displayName(jp2).compareTo(displayName(jp1)); + }) + .collect(Collectors.toCollection(ArrayList::new)); // mutable String val = null; final Properties props = handle.getPOMModel().getProject().getProperties(); if (props != null) { diff --git a/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java b/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java index 5ca4fee95def..cf1000060e01 100644 --- a/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java +++ b/java/maven/src/org/netbeans/modules/maven/options/SettingsPanel.java @@ -29,6 +29,7 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; +import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -1176,7 +1177,9 @@ public void run() { if (defJdkName.isEmpty()) { defJdkName = def.getDisplayName(); } - for (JavaPlatform p : JavaPlatformManager.getDefault().getInstalledPlatforms()) { + List platforms = Arrays.asList(JavaPlatformManager.getDefault().getInstalledPlatforms()); + platforms.sort(Comparator.comparing(JavaPlatform::getSpecification).reversed()); + for (JavaPlatform p : platforms) { jdkHomeDataModel.addElement(p.getDisplayName()); String antName = p.getProperties().get("platform.ant.name"); // NOI18N if (defJdkName.equals(p.getDisplayName()) || defJdkName.equals(antName)) {