Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-26 Thread via GitHub


ebarboni commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2501571482

   #8 on ci is what will be RC4, trying to get mail soon :D


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-26 Thread via GitHub


ebarboni merged PR #7983:
URL: https://github.com/apache/netbeans/pull/7983


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


lahodaj commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2498892009

   I've tweaked the code to attach the message to the exception.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


matthiasblaesing commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2498870017

   My focus is to get a new VC fast. We can discuss this longer, but from my 
perspective we gain little. I don't care either way. The fix is here and is 
mergeable, everything else takes more time.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


mbien commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2498850559

   > I think this is good to go as is. The exception backtrace is a 100% match 
into the right file. While I agree, that knowing the problematic file, this is 
IMHO not really needed for this hotfix.
   
   the exception trace won't contain the file path which is causing the 
exception. To clarify the diff: the `i` is the `Indexable` method parameter. 
`i.toString()` would provide the path - this is no index or anything like that.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


matthiasblaesing commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2498821632

   I think this is good to go as is. The exception backtrace is a 100% match 
into the right file. While I agree, that knowing the problematic file, this is 
IMHO not really needed for this hotfix.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


mbien commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2498464967

   > I merge as it is ? and @mbien patch is for NB25 ?
   
   @ebarboni I think it would be good to have better logging there. Since the 
exception does not tell where the problem is. In my case: i had probably about 
100 projects open and had to narrow it down first. A good log line would point 
to the right place right away.
   
   I suppose I could a) open a second PR or b) add a commit to this PR? cc 
@lahodaj @matthiasblaesing 


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-25 Thread via GitHub


ebarboni commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2497954226

   I merge as it is ? and @mbien patch is for NB25 ?


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



Re: [PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-24 Thread via GitHub


matthiasblaesing commented on PR #7983:
URL: https://github.com/apache/netbeans/pull/7983#issuecomment-2495993015

   The warnings that cause this for the sample case @mbien described are:
   
   ```
   "NodesAnnotationProcessor.java:119: Warnung: [deprecation] 
SimpleAnnotationValueVisitor6() in 
javax.lang.model.util.SimpleAnnotationValueVisitor6 ist veraltet
   String clsName = type.accept(new 
SimpleAnnotationValueVisitor6() {

^"


   "NodesAnnotationProcessor.java:119: Warnung: [deprecation] 
SimpleAnnotationValueVisitor6() in 
javax.lang.model.util.SimpleAnnotationValueVisitor6 ist veraltet
   String clsName = type.accept(new 
SimpleAnnotationValueVisitor6() {

^"
   
   "NBClassReader.java:123: Warnung: [unchecked] Nicht geprüfter Aufruf von 
ForwardingJavaFileObject(F) als Mitglied des Raw-Typs 
javax.tools.ForwardingJavaFileObject
   c.classfile = new 
ForwardingJavaFileObject(origFile) {

^"
   
   "JavaHintsAnnotationProcessor.java:142: Warnung: [deprecation] 
ElementScanner6() in javax.lang.model.util.ElementScanner6 ist veraltet
   new ElementScanner6() {
 ^"
   
   "TestBase.java:409: Warnung: [deprecation] MIMEResolver() in 
org.openide.filesystems.MIMEResolver ist veraltet
   static class MIMEResolverImpl extends MIMEResolver {
  ^"
   ```
   
   For these cases the new code path is hit, so from my POV this fixes the 
issue. Thank you.


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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



[PR] [NETBEANS-7981] Handling Diagnostics with position -1 while writing error/warning index. [netbeans]

2024-11-23 Thread via GitHub


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

   When code like:
   ```
   package javaapplication2;
   
   public class JavaApplication2 {
   
   public static void main(String[] args) {
   new G() {
   
   };
   }
   
   }
   
   class G {
   @Deprecated
   G() {}
   }
   ```
   is indexed with `-Xlint:deprecation`, writing error/warning index may fail 
due to an exception like:
   ```
   java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 
605
at 
com.sun.tools.javac.util.Position$LineTabMapImpl.getColumnNumber(Position.java:266)
at 
com.sun.tools.javac.util.Position$LineMapImpl.getColumnNumber(Position.java:236)
at 
com.sun.tools.javac.util.Position$LineTabMapImpl.getColumnNumber(Position.java:253)
at 
org.netbeans.modules.java.source.indexing.JavaCustomIndexer$ErrorConvertorImpl.getRange(JavaCustomIndexer.java:1329)
   ```
   
   This is because the Diagnostics has end position `-1`. This patch simply 
proposes to treat this case as a missing end position.
   
   Separately, it should be investigated if javac should produce errors or 
warnings like this.
   


-- 
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-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

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