Bug 52460 [spell checking] Spell check index out of range
I was running in console mode for other reasons, when I spotted this stack trace, that did not appear in the log. This is in M7; JDK 1.4.2_03. I just turned on spell checking in the In Progress pref pane but didn't otherwise do anything to configure. I don't know what specific action triggered this (nor did I observe any effect). java.lang.StringIndexOutOfBoundsException: String index out of range: 7 [Dynamic-linking native method java.lang.Throwable.getStackTraceDepth ... JNI] [Dynamic-linking native method java.lang.Throwable.getStackTraceElement ... JNI] at java.lang.String.charAt(String.java:444) at org.eclipse.jdt.internal.ui.text.spelling.SpellCheckIterator.nextToken (SpellCheckIterator.java:297) at org.eclipse.jdt.internal.ui.text.spelling.SpellCheckIterator.next (SpellCheckIterator.java:241) at org.eclipse.jdt.internal.ui.text.spelling.engine.DefaultSpellChecker.execute (DefaultSpellChecker.java:208) at org.eclipse.jdt.internal.ui.text.spelling.SpellReconcileStrategy.reconcile (SpellReconcileStrategy.java:347) at org.eclipse.jface.text.reconciler.CompositeReconcilingStrategy.reconcile (CompositeReconcilingStrategy.java:83) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile (JavaCompositeReconcilingStrategy.java:97) at org.eclipse.jface.text.reconciler.MonoReconciler.process (MonoReconciler.java:76) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run (AbstractReconciler.java:189)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/spelling/SpellCheckIterator.java
*/
	protected final int nextSentence() {
		return ((Integer) fSentenceBreaks.getFirst()).intValue();
	}
	/**
	 * Determines the next token to be spell-checked.
	 * 
	 * @return The next token to be spell-checked, or <code>null</code> iff
	 *               the next token is not a candidate for spell-checking.
	 */
	protected String nextToken() {
		String token= null;
		fPrevious= fPredecessor;
		fStartsSentence= false;
		nextBreak();
		boolean update= false;
		if (fNext - fPrevious > 0) {
			if (fContent.charAt(fPrevious) == JAVADOC_TAG_PREFIX && fSuccessor != BreakIterator.DONE) {
				nextBreak();
				if (Character.isLetter(fContent.charAt(fPrevious + 1))) {
					update= true;
					token= fContent.substring(fPrevious, fNext);
				} else
					fPredecessor= fNext;
			} else if (fContent.charAt(fPrevious) == HTML_TAG_PREFIX && (Character.isLetter(fContent.charAt(fNext)) || fContent.charAt(fNext) == '/') && fSuccessor != BreakIterator.DONE) {
				if (fContent.startsWith(HTML_CLOSE_PREFIX, fPrevious))
					nextBreak();
				nextBreak();
				if (fContent.charAt(fNext) == HTML_TAG_POSTFIX && fSuccessor != BreakIterator.DONE) {
					nextBreak();