private void runFindBugs ( final FindBugs2 findBugs ) { if ( DEBUG ) { FindbugsPlugin . log ( "Running findbugs in thread " + Thread . currentThread ( ) . getName ( ) ) ; } System . setProperty ( "findbugs.progress" , "true" ) ; try { // Perform the analysis! (note: This is not thread-safe) findBugs . execute ( ) ; } catch ( InterruptedException e ) { if ( DEBUG ) { FindbugsPlugin . getDefault ( ) . logException ( e , "Worker interrupted" ) ; } Thread . currentThread ( ) . interrupt ( ) ; } catch ( IOException e ) { FindbugsPlugin . getDefault ( ) . logException ( e , "Error performing SpotBugs analysis" ) ; } finally { findBugs . dispose ( ) ; } }
this method will block current thread until the findbugs is running