You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2026/02/18 07:52:15 UTC
[PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
mbien opened a new pull request, #9213:
URL: https://github.com/apache/netbeans/pull/9213
- replace reflective access with direct calls
- replace java version parsing with `Runtime.version()`
- remove dead code paths due to past JDK bumps
- minor cleanup in touched files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #9213:
URL: https://github.com/apache/netbeans/pull/9213
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "haidubogdan (via GitHub)" <gi...@apache.org>.
haidubogdan commented on PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#issuecomment-3938624800
@mbien
Tested on php project with ftp client.
Seems good. No issues found.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on code in PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#discussion_r2825572701
##########
java/debugger.jpda/src/org/netbeans/modules/debugger/jpda/util/JPDAUtils.java:
##########
@@ -43,25 +43,10 @@
* @author Jan Jancura
*/
public class JPDAUtils {
- private static final String JAVA_VERSION = System.getProperty("java.version");
/**
* <code>true</code> when the current JDK version is 1.8.0 update 40, or newer.
*/
- public static final boolean IS_JDK_180_40 = !JAVA_VERSION.startsWith("1.8.0") || // we know that it's 1.8.0 at least
- getVersionUpdate(JAVA_VERSION) >= 40;
-
-
- private static int getVersionUpdate(String javaVersion) {
- if (javaVersion.length() < 7) {
- return 0;
- }
- String update = javaVersion.substring(6);
- try {
- return Integer.parseInt(update);
- } catch (NumberFormatException nfex) {
- return 0;
- }
- }
+ public static final boolean IS_JDK_180_40 = true;
Review Comment:
todo: deprecate
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#issuecomment-3932103136
made two little changes: First in `GradleJavaCompatProblemsProvider` to use `Runtime.Version.parse()` during java home version parsing and removed the now unused Bundle entries for the deleted `WindowsJdk7WarningPanel`.
planning to merge once green.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#issuecomment-3922929637
@haidubogdan this also removes some php code which shouldn't be reachable anymore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "BradWalker (via GitHub)" <gi...@apache.org>.
BradWalker commented on PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#issuecomment-3924747705
Good stuff!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use Runtime.version() where applicable and remove unreachable code [netbeans]
Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #9213:
URL: https://github.com/apache/netbeans/pull/9213#issuecomment-3939847411
@haidubogdan thanks a lot for checking!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists