@Test public void testOpenQuote() { assertTrue(FindSqlInjection.isOpenQuote("'")); assertTrue(FindSqlInjection.isOpenQuote(" '")); assertTrue(FindSqlInjection.isOpenQuote("='")); assertTrue(FindSqlInjection.isOpenQuote(",'")); assertTrue(FindSqlInjection.isOpenQuote("('")); assertFalse(FindSqlInjection.isOpenQuote("'abc'")); assertFalse(FindSqlInjection.isOpenQuote("='abc'")); }
public static boolean isOpenQuote(String s) { return openQuotePattern.matcher(s).find(); }
FindSqlInjection implements Detector { public static boolean isOpenQuote(String s) { return openQuotePattern.matcher(s).find(); } }
FindSqlInjection implements Detector { public static boolean isOpenQuote(String s) { return openQuotePattern.matcher(s).find(); } FindSqlInjection(BugReporter bugReporter); }
FindSqlInjection implements Detector { public static boolean isOpenQuote(String s) { return openQuotePattern.matcher(s).find(); } FindSqlInjection(BugReporter bugReporter); @Override void visitClassContext(ClassContext classContext); static boolean isOpenQuote(String s); static boolean isCloseQuote(String s); @Override void report(); }
FindSqlInjection implements Detector { public static boolean isOpenQuote(String s) { return openQuotePattern.matcher(s).find(); } FindSqlInjection(BugReporter bugReporter); @Override void visitClassContext(ClassContext classContext); static boolean isOpenQuote(String s); static boolean isCloseQuote(String s); @Override void report();  }