Changeset 11192 in josm
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r10919 r11192 889 889 } catch (PatternSyntaxException e) { 890 890 throw new ParseError(tr(rxErrorMsg, e.getPattern(), e.getIndex(), e.getMessage()), e); 891 } catch (IllegalArgumentException e) { 891 } catch (IllegalArgumentException | StringIndexOutOfBoundsException e) { 892 // StringIndexOutOfBoundsException catched because of https://bugs.openjdk.java.net/browse/JI-9044959 893 // See #13870: To remove after we switch to a version of Java which resolves this bug 892 894 throw new ParseError(tr(rxErrorMsgNoPos, s, e.getMessage()), e); 893 895 } -
trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
r10373 r11192 9 9 import org.junit.Rule; 10 10 import org.junit.Test; 11 import org.openstreetmap.josm.actions.search.SearchAction.SearchSetting; 11 12 import org.openstreetmap.josm.actions.search.SearchCompiler.Match; 12 13 import org.openstreetmap.josm.actions.search.SearchCompiler.ParseError; … … 449 450 assertTrue(SearchCompiler.compile(search2).match(tag2)); 450 451 } 452 453 /** 454 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/13870">Bug #13870</a>. 455 * @throws ParseError always 456 */ 457 @Test(expected = ParseError.class) 458 public void testPattern13870() throws ParseError { 459 // https://bugs.openjdk.java.net/browse/JI-9044959 460 SearchSetting setting = new SearchSetting(); 461 setting.regexSearch = true; 462 setting.text = "["; 463 SearchCompiler.compile(setting); 464 } 451 465 }
Note:
See TracChangeset
for help on using the changeset viewer.