Build: NetBeans IDE Dev (Build 200911251400)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.0-b08, Java(TM) SE Runtime Environment, 1.7.0-ea-b71
OS: Linux, 2.6.27-15-generic, amd64
GUEST: remove cast
GUEST: Tried to move a class from one package to another (via drag-and-drop).
Sometimes refactoring works, sometimes it doesn't, although it's consistant per specific file. That is, I can move class X from package A to B, but cannot move class Y from package C to D.
t_yano: I used a refacturring action 'inner to outer' against inner enum class.
mhuebner: clicked on "surround block with try/catch"
emononen: Applied a hint suggesting casting
GUEST: removing cast
java.lang.StringIndexOutOfBoundsException: String index out of range: -4
Created attachment 91721 [details]
Created attachment 91733 [details]
Created attachment 91783 [details]
This bug already has 20 duplicates
I am not completely sure what is the root cause, but I think that the CompilationUnitTree.getLineMap is likely not correctly updated after partial reparse. I have introduced a workaround that should hopefully fix this particular exception:
I have created a new bug #178862 to keep track about the CUT.getLineMap().
The workaround might be a good 6.8 patch1 candidate.
Integrated into 'main-golden', will be available in build *200912200200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jan Lahoda <firstname.lastname@example.org>
Log: #177660: trying to prevent a StringIndexOutOfBoundsException.
The whiteboard changed back to 68patch-candidate. The whiteboard 68patch1-candidate can be added by QA or Sustaining to issues those has been verified in the trunk already.
I was not able to reproduce. Verified in trunk.
The fix has been ported into the release68_fixes repository.