Add Java SE 26 and 27 platforms to GlassFish 7.1 and 8.0 server configs#9445
Add Java SE 26 and 27 platforms to GlassFish 7.1 and 8.0 server configs#9445renatsaf wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
given that JDK 27 will be released during the lifetime of NB31 we could be one step ahead of the next bug report by optimistically assuming that everything which supports 26 today will also support 27 once its released.
feel free to update the other GlassFishVX.xml files too add 27 too and squash everything into one commit + force push.
also: I don't really know how to handle LLM assisted contributions yet, so I started a thread at the dev list https://lists.apache.org/thread/qhr3mfxg5wsv89d80nxzdd63ldjth07p. Based on the result you might have to update the PRs you opened. (but it might also be fine as is)
JDK 26 support was added to JavaSEPlatform (commit a0d2484) by adding the v26 enum constant, but no GlassFish server config XML declared <platform version="26"/>. JavaUtils.findSupportedPlatforms() therefore intersected the installed platforms with the server's supported set ({21..25}) and returned an empty array when the only registered JDK was 26, leaving the Java SE platform selector with an empty dropdown so the server could not be started (apache#9423). Restore enum/config parity by declaring 26 in the two current-generation configs that already list 25 (GlassFishV8_0_0.xml, GlassFishV7_1_0.xml). Also add JDK 27 proactively, ahead of its release during the NB 31 lifecycle. A config entry is inert without a matching enum constant -- JavaSESet filters out unknown version strings, and the installed JDK's spec version is itself resolved through JavaSEPlatform.toValue -- so the v27 enum constant is added alongside the config entries so that 27 is actually recognized when present. Fixes apache#9423
d2bbf97 to
cc0a60e
Compare
|
Done — added One note while doing it: a |
Fixes #9423
Problem
On NetBeans 30 (which bundles JDK 26), starting a GlassFish server pops up the
"select a Java SE platform" dialog with an empty platform dropdown and only a
Cancel button, so the server cannot be launched.
Root cause
Support for JDK 26 was added in
JavaSEPlatform.java(commit a0d2484) by addingthe
v26enum constant, but the corresponding<platform version="26"/>entry wasnever added to any GlassFish server config XML. (The earlier "add JDK 24" change,
1e42bf8, correctly updated both the enum and
GlassFishV8_0_0.xml; the JDK 25 andJDK 26 changes updated only the enum.)
As a result,
JavaUtils.findSupportedPlatforms(instance)intersects the installedplatforms with the server's supported set (
{21..25}) and returns an empty array whenthe only registered JDK is 26.
JavaSEPlatformPanel.setDescriptorButtonsthen disablesthe OK button and
JavaPlatformsComboBoxrenders empty.Fix
Add
<platform version="26"/>(and, per review,<platform version="27"/>) to the twocurrent-generation GlassFish configs that already declare JDK 25 support:
GlassFishV8_0_0.xmlGlassFishV7_1_0.xmlJDK 27 — why the enum constant is also added
A config
<platform version="N"/>entry is inert without a matching enum constant:JavaSESet.platforms()converts the config's version strings viaJavaSEPlatform.toValue(...)and silently drops any string with no enum constant.JavaSEPlatform.toValue(...)inJavaUtils.findSupportedPlatforms, so an unmatchedversion can never be
contains-matched in the supportedEnumSet.So adding
version="27"to the XML alone would do nothing. To make 27 real (and to keepthe enum/config in sync — the very asymmetry that caused this bug), this PR also adds the
v27constant toJavaSEPlatform.Out of scope
GlassFishV7_0_*configs cap at lower JDK levels and represent specific pastreleases; bumping them is a compatibility judgement, intentionally left out (per review).
PayaraV7.xmllists only<platform version="21"/>); a separate, larger gap, not touched here.🤖 Generated with Claude Code