private boolean canBeConvertedToJUnit4 ( VisitorState state , List < Type > argumentTypes ) { // Delta argument is used. if ( argumentTypes . size ( ) > 2 ) { return true ; } Type firstType = argumentTypes . get ( 0 ) ; Type secondType = argumentTypes . get ( 1 ) ; // Neither argument is floating-point. if ( ! isFloatingPoint ( state , firstType ) && ! isFloatingPoint ( state , secondType ) ) { return true ; } // One argument is not numeric. if ( ! isNumeric ( state , firstType ) || ! isNumeric ( state , secondType ) ) { return true ; } // Neither argument is primitive. if ( ! firstType . isPrimitive ( ) && ! secondType . isPrimitive ( ) ) { return true ; } return false ; }
Determines if the invocation can be safely converted to JUnit 4 based on its argument types .