Bug 73579 Source view: StringOutOfBounds error after changing encoding
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)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/infoviews/SourceView.java
super.run(elements);
				startListeningForSelectionChanges();
			}
		}; 
	}
	
	
	/*
	 * @see org.eclipse.jdt.internal.ui.infoviews.AbstractInfoView#getSelectAllAction()
	 * @since 3.0
	 */
	protected IAction getSelectAllAction() {
		return fSelectAllAction;
	}
	/*
	 * @see AbstractInfoView#fillActionBars(IActionBars)
	 */
	protected void fillActionBars(IActionBars actionBars) {
		super.fillActionBars(actionBars);
		actionBars.setGlobalActionHandler(JdtActionConstants.OPEN, fOpen);
	}
	/*
	 * @see AbstractInfoView#getControl()
	 */
	protected Control getControl() {
		return fViewer.getControl();
	}
	/*
	 * @see AbstractInfoView#menuAboutToShow(IMenuManager)
	 */