question: public @ CheckForNull Block createNewBlock ( @ Nonnull String systemName , @ CheckForNull String userName ) throws IllegalArgumentException { Block r ; if ( userName != null && ! userName . equals ( "" ) ) { r = getByUserName ( userName ) ; if ( r != null ) { return null ; } } r = getBySystemName ( systemName ) ; if ( r != null ) { return null ; } String sName = systemName . toUpperCase ( ) ; r = new Block ( sName , userName ) ; register ( r ) ; if ( systemName . startsWith ( "IB:AUTO:" ) ) { try { int autoNumber = Integer . parseInt ( systemName . substring ( 8 ) ) ; if ( autoNumber > lastAutoBlockRef ) { lastAutoBlockRef = autoNumber ; } } catch ( NumberFormatException e ) { log . warn ( "Auto generated SystemName " + systemName + " is not in the correct format" ) ; } } try { r . setBlockSpeed ( "Global" ) ; } catch ( jmri . JmriException ex ) { log . error ( ex . toString ( ) ) ; } return r ; }
target:  Method to create a new Block only if it does not exist 