void () { final String source = ""; try { findMatchesCount(source, "import java.util.ArrayList;"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "\\'aa\\'"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "\\'$var$ \\'"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "0x100000000"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "assert '_C;\n" + "System.out.println("); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "get'_property()"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "'_exp // asdf"); fail("malformed pattern warning expected"); } catch (MalformedPatternException ignored) {} try { findMatchesCount(source, "<'_E extends '_T>"); fail("don't hide malformed patterns"); } catch (MalformedPatternException ignored) {} }