@@ -5882,8 +5882,8 @@ private static void filterReturnValueChecks(MethodType targetType, MethodType fi
5882
5882
BoundMethodHandle result = target .rebind ();
5883
5883
LambdaForm lform = result .editor ().collectReturnValueForm (filterType .basicType ());
5884
5884
MethodType newType = targetType .changeReturnType (filterType .returnType ());
5885
- if (filterType .parameterList (). size () > 1 ) {
5886
- for (int i = 0 ; i < filterType .parameterList (). size () - 1 ; i ++) {
5885
+ if (filterType .parameterCount () > 1 ) {
5886
+ for (int i = 0 ; i < filterType .parameterCount () - 1 ; i ++) {
5887
5887
newType = newType .appendParameterTypes (filterType .parameterType (i ));
5888
5888
}
5889
5889
}
@@ -6735,7 +6735,7 @@ private static List<Class<?>> longestParameterList(Stream<MethodHandle> mhs, int
6735
6735
filter (t -> t .parameterCount () > skipSize ).
6736
6736
map (MethodType ::parameterList ).
6737
6737
reduce ((p , q ) -> p .size () >= q .size () ? p : q ).orElse (empty );
6738
- return longest .size () == 0 ? empty : longest .subList (skipSize , longest .size ());
6738
+ return longest .isEmpty () ? empty : longest .subList (skipSize , longest .size ());
6739
6739
}
6740
6740
6741
6741
private static List <Class <?>> longestParameterList (List <List <Class <?>>> lists ) {
@@ -7019,7 +7019,7 @@ private static void whileLoopChecks(MethodHandle init, MethodHandle pred, Method
7019
7019
List <Class <?>> outerList = innerList ;
7020
7020
if (returnType == void .class ) {
7021
7021
// OK
7022
- } else if (innerList .size () == 0 || innerList .get (0 ) != returnType ) {
7022
+ } else if (innerList .isEmpty () || innerList .get (0 ) != returnType ) {
7023
7023
// leading V argument missing => error
7024
7024
MethodType expected = bodyType .insertParameterTypes (0 , returnType );
7025
7025
throw misMatchedTypes ("body function" , bodyType , expected );
@@ -7349,7 +7349,7 @@ private static void countedLoopChecks(MethodHandle start, MethodHandle end, Meth
7349
7349
List <Class <?>> innerList = bodyType .parameterList ();
7350
7350
// strip leading V value if present
7351
7351
int vsize = (returnType == void .class ? 0 : 1 );
7352
- if (vsize != 0 && (innerList .size () == 0 || innerList .get (0 ) != returnType )) {
7352
+ if (vsize != 0 && (innerList .isEmpty () || innerList .get (0 ) != returnType )) {
7353
7353
// argument list has no "V" => error
7354
7354
MethodType expected = bodyType .insertParameterTypes (0 , returnType );
7355
7355
throw misMatchedTypes ("body function" , bodyType , expected );
@@ -7573,7 +7573,7 @@ private static Class<?> iteratedLoopChecks(MethodHandle iterator, MethodHandle i
7573
7573
List <Class <?>> internalParamList = bodyType .parameterList ();
7574
7574
// strip leading V value if present
7575
7575
int vsize = (returnType == void .class ? 0 : 1 );
7576
- if (vsize != 0 && (internalParamList .size () == 0 || internalParamList .get (0 ) != returnType )) {
7576
+ if (vsize != 0 && (internalParamList .isEmpty () || internalParamList .get (0 ) != returnType )) {
7577
7577
// argument list has no "V" => error
7578
7578
MethodType expected = bodyType .insertParameterTypes (0 , returnType );
7579
7579
throw misMatchedTypes ("body function" , bodyType , expected );
1 commit comments
openjdk-notifier[bot] commentedon Sep 15, 2021
Review
Issues