private boolean checkForDefaultImplementation ( Class checkClass , String checkMethod , Class [ ] methodParams ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) //306998.14 logger . exiting ( CLASS_NAME , "checkForDefaultImplementation" , "Method : " + checkMethod + ", Class : " + checkClass . getName ( ) ) ; boolean defaultMethodInUse = true ; while ( defaultMethodInUse && checkClass != null && ! checkClass . getName ( ) . equals ( "javax.servlet.http.HttpServlet" ) ) { try { checkClass . getDeclaredMethod ( checkMethod , methodParams ) ; if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) //306998.14 logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , "Class implementing " + checkMethod + " is " + checkClass . getName ( ) ) ; defaultMethodInUse = false ; break ; } catch ( java . lang . NoSuchMethodException exc ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) //306998.14 logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , checkMethod + " is not implemented by class " + checkClass . getName ( ) ) ; } catch ( java . lang . SecurityException exc ) { if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) //306998.14 logger . logp ( Level . FINE , CLASS_NAME , "checkForDefaultImplementation" , "Cannot determine if " + checkMethod + " is implemented by class " + checkClass . getName ( ) ) ; } checkClass = checkClass . getSuperclass ( ) ; } if ( com . ibm . ejs . ras . TraceComponent . isAnyTracingEnabled ( ) && logger . isLoggable ( Level . FINE ) ) //306998.14 logger . exiting ( CLASS_NAME , "checkForDefaultImplementation" , "Result : " + defaultMethodInUse ) ; return defaultMethodInUse ; }
PK83258 Add method checkDefaultImplementation