private AbstractBuild getBuildForDeprecatedMethods ( ) { Executor e = Executor . currentExecutor ( ) ; if ( e != null ) { Executable exe = e . getCurrentExecutable ( ) ; if ( exe instanceof AbstractBuild ) { AbstractBuild b = ( AbstractBuild ) exe ; if ( b . getProject ( ) == this ) return b ; } } R lb = getLastBuild ( ) ; if ( lb != null ) return lb ; return null ; }
Various deprecated methods in this class all need the current build . This method returns the build suitable for that purpose .