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
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.text.spelling;
import java.text.BreakIterator;
import java.util.LinkedList;
import java.util.Locale;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.TextUtilities;
import org.eclipse.jdt.internal.ui.text.spelling.engine.DefaultSpellChecker;
import org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckIterator;
import org.eclipse.jdt.internal.corext.refactoring.nls.NLSElement;
import org.eclipse.jdt.internal.ui.text.javadoc.IHtmlTagConstants;
import org.eclipse.jdt.internal.ui.text.javadoc.IJavaDocTagConstants;
/**
 * Iterator to spell-check javadoc comment regions.
 * 
 * @since 3.0
 */
public class SpellCheckIterator implements ISpellCheckIterator, IJavaDocTagConstants, IHtmlTagConstants {