@ edu . umd . cs . findbugs . annotations . SuppressFBWarnings ( value = "LII_LIST_INDEXED_ITERATING" , justification = "this doesn't iterate over every element, so we can't use a for-each loop" ) private static boolean hasSimilarParms ( List < String > argTypes ) { for ( int i = 0 ; i < ( argTypes . size ( ) - 1 ) ; i ++ ) { if ( argTypes . get ( i ) . startsWith ( Values . SIG_ARRAY_PREFIX ) ) { return true ; } } String baseType = argTypes . get ( argTypes . size ( ) - 1 ) ; while ( baseType . startsWith ( Values . SIG_ARRAY_PREFIX ) ) { baseType = baseType . substring ( 1 ) ; } for ( int i = 0 ; i < ( argTypes . size ( ) - 1 ) ; i ++ ) { if ( argTypes . get ( i ) . equals ( baseType ) ) { return true ; } } return false ; }
determines whether a bunch of types are similar and thus would be confusing to have one be a varargs .