private int adjustPriority ( int priority ) { try { Subtypes2 subtypes2 = AnalysisContext . currentAnalysisContext ( ) . getSubtypes2 ( ) ; if ( ! subtypes2 . hasSubtypes ( getClassDescriptor ( ) ) ) { priority ++ ; } else { Set < ClassDescriptor > mySubtypes = subtypes2 . getSubtypes ( getClassDescriptor ( ) ) ; String myPackagename = getThisClass ( ) . getPackageName ( ) ; for ( ClassDescriptor c : mySubtypes ) { if ( c . equals ( getClassDescriptor ( ) ) ) { continue ; } if ( ! c . getPackageName ( ) . equals ( myPackagename ) ) { priority -- ; break ; } } } } catch ( ClassNotFoundException e ) { bugReporter . reportMissingClass ( e ) ; } return priority ; }
Adjust the priority of a warning about to be reported .