private static boolean checkRevisionArg( String arg ) { if ( StringUtils.isNumeric( arg ) || ( arg.startsWith( "{" ) && arg.endsWith( "}" ) ) ) { return true; } for ( int i = 0; i < REVISION_SPECIFIERS.length; i++ ) { if ( REVISION_SPECIFIERS[i].equalsIgnoreCase( arg ) ) { return true; } } return false; }
private static boolean checkRevisionArg( String arg ) { if ( StringUtils.isNumeric( arg ) || ( arg.startsWith( "{" ) && arg.endsWith( "}" ) ) ) { return true; } for ( int i = 0; i < REVISION_SPECIFIERS.length; i++ ) { if ( REVISION_SPECIFIERS[i].equalsIgnoreCase( arg ) ) { return true; } } return false; }
protected static int getControlPortFromArgs( String[] args ) { // if we need to get more involved we could use commons-cli's CommandLineParser // but for a single arg that seems overkill, what would be nice, is if we parsed // all of the args and put them in the context of the container. int controlPort = DEFAULT_CONTROL_PORT; // grunt parsing.. if ( args != null && args.length == 1 ) { String tmpPortString = args[0]; if ( StringUtils.isNotEmpty( tmpPortString ) && StringUtils.isNumeric( tmpPortString ) ) { try { controlPort = Integer.parseInt( tmpPortString ); } // this should never happen, well, maybe if you pass in a long catch ( NumberFormatException e ) { System.out.println( "Error parsing command line args: " + e.getMessage() ); System.out.println( "Using default control port: " + DEFAULT_CONTROL_PORT ); } } } return controlPort; }
if ( StringUtils.isNotEmpty( tmpPortString ) && StringUtils.isNumeric( tmpPortString ) )
if ( StringUtils.isEmpty( counterProp ) || !StringUtils.isNumeric( counterProp ) )
if ( StringUtils.isEmpty( counterProp ) || !StringUtils.isNumeric( counterProp ) )
if ( StringUtils.isEmpty( counterProp ) || !StringUtils.isNumeric( counterProp ) )
|| !StringUtils.isNumeric( counterProp ) )
@Override public VersionInfo getNextVersion() { DefaultVersionInfo version = null; if ( digits != null ) { List<String> digits = new ArrayList<>( this.digits ); String annotationRevision = this.annotationRevision; if ( StringUtils.isNumeric( annotationRevision ) ) { annotationRevision = incrementVersionString( annotationRevision ); } else { digits.set( digits.size() - 1, incrementVersionString( digits.get( digits.size() - 1 ) ) ); } version = new DefaultVersionInfo( digits, annotation, annotationRevision, buildSpecifier, annotationSeparator, annotationRevSeparator, buildSeparator ); } return version; }
public VersionInfo getNextVersion() { HotfixVersionInfo version = null; if ( digits != null ) { List<String> digits = new ArrayList<String>( this.digits ); String annotationRevision = this.annotationRevision; if ( StringUtils.isNumeric( annotationRevision ) ) { annotationRevision = incrementVersionString( annotationRevision ); } else { digits.set( digits.size() - 1, incrementVersionString( (String) digits.get( digits.size() - 1 ) ) ); } version = new HotfixVersionInfo( digits, annotation, annotationRevision, buildSpecifier, annotationSeparator, annotationRevSeparator, buildSeparator ); } return version; }
int mostSignificantSegment; if ( StringUtils.isNumeric( defaultVersionInfo.getAnnotationRevision() ) )