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.
Summary: | StringIndexOutOfBoundsException when trying to implement interface methods | ||
---|---|---|---|
Product: | java | Reporter: | Torbjorn Norbye <tor> |
Component: | Source | Assignee: | Pavel Flaska <pflaska> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Torbjorn Norbye
2007-01-17 17:51:56 UTC
Please provide the build number. I was unable to reproduce the issue in current build. If you are able to reproduce it in current trunk build, try to provide both sources, SourceFileReader and the source where exception occured. I tried it again and was not able to reproduce it. Check that it works for you, marking WORKSFORME. Reopen with additional information if you are able to reproduce it. I couldn't really boil the example down and still get it to break. So I've been waiting to submit files because I was moving my files to the NetBeans CVS repository; they're there now so you can reproduce this for yourself. Check out the scripting module in CVS, then open the NetBeans module scripting/gsf/. Open org.netbeans.api.retouche.source.Source (you might recognize it as a modified version of JavaSource in java/source/). Scan for the line "new SourceFileReader", and in that inner class, remove the whole method definition for getCaretOffset(ParserFile). You'll now get a quickfix to implement all interfaces. When you do that, you still get the same exception (with trunk sources as of yesterday). Thanks for the steps, I'll investigate it. Yes, reproducible. Try to remove semicolon at the end of enum Priority (line 132). Then, it will work like a charm. No, it the tip was joke. (It will work, but definitely it has to be fixed.) I solved similar problem with syntetic constructors and not available super() calls. The semicolon is redundant and represented like a initializer block {}, which is member of class, but it does not have position defined. Seems that the root cause is the same as #92127, but still leaving both issues opened. Checking in src/org/netbeans/modules/java/source/save/CasualDiff.java; /cvs/java/source/src/org/netbeans/modules/java/source/save/CasualDiff.java,v <-- CasualDiff.java new revision: 1.56; previous revision: 1.55 done Checking in src/org/netbeans/modules/java/source/save/PositionEstimator.java; /cvs/java/source/src/org/netbeans/modules/java/source/save/PositionEstimator.java,v <-- PositionEstimator.java new revision: 1.6; previous revision: 1.5 done |