You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/11 20:36:13 UTC

[GitHub] [netbeans] matthiasblaesing opened a new pull request, #5279: Prevent NullPointerException when matching filenames in SourceUtils

matthiasblaesing opened a new pull request, #5279:
URL: https://github.com/apache/netbeans/pull/5279

   Closes: #5266
   


-- 
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


[GitHub] [netbeans] matthiasblaesing merged pull request #5279: Prevent NullPointerException when matching filenames in SourceUtils

Posted by GitBox <gi...@apache.org>.
matthiasblaesing merged PR #5279:
URL: https://github.com/apache/netbeans/pull/5279


-- 
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


[GitHub] [netbeans] matthiasblaesing commented on pull request #5279: Prevent NullPointerException when matching filenames in SourceUtils

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on PR #5279:
URL: https://github.com/apache/netbeans/pull/5279#issuecomment-1382758685

   Seems to work and is minimally invasive, so lets get this in.


-- 
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


[GitHub] [netbeans] mbien commented on a diff in pull request #5279: Prevent NullPointerException when matching filenames in SourceUtils

Posted by GitBox <gi...@apache.org>.
mbien commented on code in PR #5279:
URL: https://github.com/apache/netbeans/pull/5279#discussion_r1067766660


##########
java/java.source.base/src/org/netbeans/api/java/source/SourceUtils.java:
##########
@@ -683,7 +683,7 @@ private abstract static class Match {
         }
 
         final boolean apply(final FileObject fo) {
-            if (name.equals(fo.getNameExt())) {
+            if (fo.getNameExt().equals(name)) {

Review Comment:
   good that getNameExt() returns empty Strings. This makes it better than the JDK 20 proposal of the Path API which was luckily dropped last minute because of it returning null:
   https://bugs.openjdk.org/browse/JDK-8297814
   
   I already had a [code inspection](https://github.com/mbien/jackpot-inspections/commit/89c3f68840351b745d16f9cc4a0b4191e6afe1d6) for that ready expecting it to be a common bug.
   
   new version is the PR 11545 which might make it into JDK 21 following the same null safe logic
   
   good choice back then @jtulach!



-- 
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