First of all, thank you all very much for the kind support in helping
me out, I really appreciate it.

I am writing because of how Netbeans should select the Glassfish
version to be used.
I have tried using Glassfish 6.2, and Netbeans thinks it's ok to use
Glassfish 6 as a base (it also told erroneously it was picking 6.1
while it was not, see PR#3101).

This happens in
org.netbeans.modules.glassfish.tooling.data.GlassFishVersion::toValue
(1), that is the method that checks if there is a valid Glassfish
instance configured for the one selected in the desired location.
Since it doesn't find the exact version (2), it does a string
comparison but since the only same number is 6, it thinks that version
6 is better than version 6.1 as a base.

What is the desired outcome here?
Should it return the nearest version (6.1 for 6.2), admit defeat and
not find anything, or let the user decide?
In this case 6.2 AFAIK works correctly set as 6.1, and by blocking
this we are simply frustrating power users that may know what they are
doing.

As a related question, why not also accept that the user can override
the supported JDK, and for example select also JDK17 for Netbeans when
it comes out? It may help in testing.

It seems that the current system was made when releases were more far
apart, now they are much more frequent.

(1) 
https://github.com/apache/netbeans/blob/60957e38044088545b791192f978d689704c0e28/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java#L269
(2) 
https://github.com/apache/netbeans/blob/60957e38044088545b791192f978d689704c0e28/enterprise/glassfish.tooling/src/org/netbeans/modules/glassfish/tooling/data/GlassFishVersion.java#L274

-- 
Nicola Ken Barozzi [email protected]
 - verba volant, scripta manent -
discussions get forgotten, just code remains

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to