This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE Dev (Build 20140227-8aabb71e3f6d) VM: Java HotSpot(TM) 64-Bit Server VM, 24.0-b56, Java(TM) SE Runtime Environment, 1.7.0_40-b43 OS: Linux User Comments: GUEST: Added the @data annotation from lombok to a class gualtiero65: Opening a new file in the editor hmichel: Opening a class file Stacktrace: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1904) at java.lang.String.subSequence(String.java:1946) at org.netbeans.modules.java.hints.errors.Utilities.resolveAlternativeInvocation(Utilities.java:1792) at org.netbeans.modules.java.hints.errors.Utilities.checkAlternativeInvocation(Utilities.java:1664) at org.netbeans.modules.java.hints.suggestions.TooStrongCast.checkAmbiguous(TooStrongCast.java:245) at org.netbeans.modules.java.hints.suggestions.TooStrongCast.broadTypeCast(TooStrongCast.java:174)
Created attachment 145911 [details] stacktrace
Created attachment 145912 [details] stacktrace Opening a class with a bunch of lombok annotations
Created attachment 146184 [details] stacktrace Opening a file with Lombok annotations
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=206994
Cause by Lombok; some inserted tree parts do not have positions. The code in question attempts to alter source to ensure the result will resolve correctly - I can make the issue less irritating by pretending the alternative call would be ambiguous which would suppress the hint, but at the same time may leave some situations unnoticed. More elaborate fix (which could be done later) could involve pretty-printing part of the source tree possibly generated by Lombok and reparsing it back. Leaving open, exception should be avoided by jet-main#b8199830f4b9
Integrated into 'main-silver', will be available in build *201404050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b8199830f4b9 User: Svata Dedic <sdedic@netbeans.org> Log: #242756: ignore synthesized trees
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss