Project: JDT
Bug 61286 StringOutOfBoundsException during NLS search
Reported: 2004-05-06 15:09:33 | Status: resolved fixed

Build id: 200404281424 I did an NLS search with Resource bundle accessor class: org.eclipse.ui.internal.WorkbenchMessages Property file name: /org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties Some results are reported in the Search view, but there was an error dialog and I found the following exception in the log file: !MESSAGE An internal error occurred during: "Search for broken NLS keys". !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -44 at java.lang.String.substring(Unknown Source) at java.lang.String.substring(Unknown Source) at org.eclipse.jdt.internal.ui.refactoring.nls.search. NLSSearchResultRequestor.findKey(NLSSearchResultRequestor.java:155) at org.eclipse.jdt.internal.ui.refactoring.nls.search. NLSSearchResultRequestor.acceptSearchMatch(NLSSearchResultRequestor.java:96) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. report(MatchLocator.java:1168) at org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator. matchReportImportRef(TypeReferenceLocator.java:143) at org.eclipse.jdt.internal.core.search.matching.PatternLocator. matchLevelAndReportImportRef(PatternLocator.java:207) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. reportMatching(MatchLocator.java:1378) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. process(MatchLocator.java:1101) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. locateMatches(MatchLocator.java:739) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. locateMatches(MatchLocator.java:770) at org.eclipse.jdt.internal.core.search.matching.MatchLocator. locateMatches(MatchLocator.java:867) at org.eclipse.jdt.internal.core.search.JavaSearchParticipant. locateMatches(JavaSearchParticipant.java:94) at org.eclipse.jdt.core.search.SearchEngine.findMatches(SearchEngine.java: 468) at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:760) at org.eclipse.jdt.internal.ui.refactoring.nls.search.NLSSearchQuery. run(NLSSearchQuery.java:67) at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob. run(InternalSearchUI.java:71) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/nls/search/NLSSearchResultRequestor.java