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.
I was following TS 73 ApiSupportSanity with jdk 1.7.0_25 on 201308202300 ide build. If I remove a dependency from project.xml it is correctly removed from libraries node. If I add again the dependency in project.xml it is correctly added to libraries node. After this if I try to remove the dependency from libraries node I get an IllegalArgumentException: bad position.
You can only add dependency, then open project.xml and place caret and the last line. After that remove that dependency and you get also an IllegalArgumentException: bad position. Problem is with caret position, b/c project.xml file is modified (shortened) and after refresh it is not possible to place caret back to nonexistent position.
Problem is probably in openide.text DocumentOpenClose.DocumentLoad.run()->atomicLockedRun() in for (int i = 0; i < reloadCaretOffsets.length; i++) { try { caretPositions[i] = loadDoc.createPosition(reloadCaretOffsets[i]); } catch (BadLocationException ex) { caretPositions[i] = loadDoc.getEndPosition(); } } b/c loadDoc.createPosition(reloadCaretOffsets[i]) fails and returning an end position of caret comes from the old file. Returning loadDoc.getSartPosition() would help.
Reassigned to default owner.