Permalink
Browse files

Merge branch 'findbugs' into spotbugs

  • Loading branch information...
mebigfatguy committed Jan 9, 2018
2 parents a5a3853 + 2775406 commit 556f9f3c42314ca5b2ab8208bfbe70a3041c5205
@@ -72,7 +72,9 @@
// @formatter:off
new FQMethod("java/util/Enumeration", "hasMoreElements", SignatureBuilder.SIG_VOID_TO_BOOLEAN),
new FQMethod("java/util/StringTokenizer", "hasMoreElements", SignatureBuilder.SIG_VOID_TO_BOOLEAN),
new FQMethod("java/util/StringTokenizer", "hasMoreTokens", SignatureBuilder.SIG_VOID_TO_BOOLEAN)
new FQMethod("java/util/StringTokenizer", "hasMoreTokens", SignatureBuilder.SIG_VOID_TO_BOOLEAN),
new FQMethod("java/util/regex/Matcher", "find", SignatureBuilder.SIG_VOID_TO_BOOLEAN),
new FQMethod("java/util/regex/Matcher", "find", SignatureBuilder.SIG_INT_TO_BOOLEAN)
// @formatter:on
);
@@ -33,6 +33,8 @@
public static final String SIG_VOID_TO_OBJECT = new SignatureBuilder().withReturnType(Values.SLASHED_JAVA_LANG_OBJECT).toString();
public static final String SIG_INT_TO_VOID = new SignatureBuilder().withParamTypes(Values.SIG_PRIMITIVE_INT).toString();
public static final String SIG_INT_TO_BOOLEAN = new SignatureBuilder().withParamTypes(Values.SIG_PRIMITIVE_INT).withReturnType(Values.SIG_PRIMITIVE_BOOLEAN)
.toString();
public static final String SIG_INT_TO_OBJECT = new SignatureBuilder().withParamTypes(Values.SIG_PRIMITIVE_INT)
.withReturnType(Values.SLASHED_JAVA_LANG_OBJECT).toString();
@@ -14,6 +14,7 @@
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
import java.util.regex.Matcher;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
@@ -274,6 +275,19 @@ public void fpInitMultipleOnSameRef(boolean a, boolean b) {
immutable2 = Collections.unmodifiableSet(s);
}
public List<String> fpMatcher(Matcher m) {
List<String> ss = new ArrayList<>();
int start = 0;
while (m.find(start)) {
String g = m.group(1);
ss.add(g);
start = m.end();
}
return ss;
}
interface BooReader {
enum BooTokenType {
START, MIDDLE, END

0 comments on commit 556f9f3

Please sign in to comment.