Project: JDT
Bug 73579 Source view: StringOutOfBounds error after changing encoding
Reported: 2004-09-09 12:15:07 | Status: resolved fixed

I got the following error after doing these steps: 1) create a new java class in the default package called dddd.java, open it 1b) open a second file in an editor 1c) switch back to dddd.java (i.e. make it the active editor) 2) change the encoding for that file to "UTF-16 (little-endian)" from the Edit > Encoding menu 3) click on the other file in the package explorer to cause the editor to activate 4) click back on dddd.java in the explorer and ... the follow exception is printed to the console java.lang.StringIndexOutOfBoundsException at java.lang.String.charAt(String.java:385) at org.eclipse.jdt.internal.ui.infoviews.SourceView.computeInput(Unknown Source) at org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView$2.run(Unknown Source)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/SourceView.java