2525public class RxSuspendableClassifier implements SuspendableClassifier {
2626 private static final Set <String > CORE_PACKAGES = new HashSet <String >(Arrays .asList (new String []{
2727 "rx" , "rx.joins" , "rx.observables" , "rx.observers" , "rx.operators" , "rx.plugins" , "rx.schedulers" ,
28- "rx.subjects" , "rx.subscriptions" , "rx.util" , "rx.util.functions"
28+ "rx.subjects" , "rx.subscriptions" , "rx.functions" , "rx. util" , "rx.util.functions"
2929 }));
3030
3131 private static final Set <String > EXCEPTIONS = new HashSet <String >(Arrays .asList (new String []{
3232 "rx/observers/SynchronizedObserver" ,
33- "rx/schedulers/AbstractSchedulerTests$ConcurrentObserverValidator" ,}));
33+ "rx/schedulers/AbstractSchedulerTests$ConcurrentObserverValidator" ,
34+ }));
3435
3536 private static final Set <String > OBSERVER_METHODS = new HashSet <String >(Arrays .asList (new String []{
3637 "onNext(Ljava/lang/Object;)V" , "onCompleted()V" , "onError(Ljava/lang/Throwable;)V"
@@ -47,6 +48,12 @@ public MethodDatabase.SuspendableType isSuspendable(MethodDatabase db, String cl
4748 else if (isUtilFunction (db , className , superClassName , interfaces , methodName , methodDesc ))
4849 s = MethodDatabase .SuspendableType .SUSPENDABLE ;
4950 }
51+ if (s == null
52+ && methodName .equals ("call" )
53+ && (className .startsWith ("rx/functions/Func" ) || className .startsWith ("rx/functions/Action" )
54+ || className .startsWith ("rx/util/functions/Func" ) || className .startsWith ("rx/util/functions/Action" ))) {
55+ s = MethodDatabase .SuspendableType .SUSPENDABLE_SUPER ;
56+ }
5057 // System.out.println("-- " + className + "." + methodName + ": " + s);
5158 return s ;
5259 }
@@ -62,9 +69,12 @@ private static boolean isObserverImplementation(MethodDatabase db, String classN
6269 }
6370
6471 private static boolean isUtilFunction (MethodDatabase db , String className , String superClassName , String [] interfaces , String methodName , String methodDesc ) {
65- return (className .startsWith ("rx/util/functions/Functions" ) || className .startsWith ("rx/util/functions/Actions" ))
72+ return (className .startsWith ("rx/functions/Functions" ) || className .startsWith ("rx/functions/Actions" )
73+ || className .startsWith ("rx/util/functions/Functions" ) || className .startsWith ("rx/util/functions/Actions" ))
6674 && methodName .equals (FUNCTION_METHOD )
67- && (SimpleSuspendableClassifier .extendsOrImplements ("rx/util/functions/Function" , db , className , superClassName , interfaces )
75+ && (SimpleSuspendableClassifier .extendsOrImplements ("rx/functions/Function" , db , className , superClassName , interfaces )
76+ || SimpleSuspendableClassifier .extendsOrImplements ("rx/functions/Action" , db , className , superClassName , interfaces )
77+ || SimpleSuspendableClassifier .extendsOrImplements ("rx/util/functions/Function" , db , className , superClassName , interfaces )
6878 || SimpleSuspendableClassifier .extendsOrImplements ("rx/util/functions/Action" , db , className , superClassName , interfaces ));
6979 }
7080
0 commit comments