public static String getNextProductVersion ( String version ) throws PluginExecutionException { String result = null ; int versionSplittingIndex = version . lastIndexOf ( "." ) + 1 ; if ( versionSplittingIndex == 0 ) { throw new PluginExecutionException ( "Product version " + version + " is not in the expected format. It must have period separated version segments." ) ; } String quarterVersion = version . substring ( versionSplittingIndex ) ; int nextQuarterSpecifier ; try { nextQuarterSpecifier = Integer . parseInt ( quarterVersion ) + 1 ; } catch ( NumberFormatException e ) { throw new PluginExecutionException ( "Product version " + version + " is not in the expected format. Its last segment is expected to be an integer." , e ) ; } result = version . substring ( 0 , versionSplittingIndex ) + nextQuarterSpecifier ; return result ; }
Gets the next product version number .