public static Version toVersion(String version,final Version defaultValue){
  final int rIndex=version.lastIndexOf(".lco");
  if (rIndex != -1)   version=version.substring(0,rIndex);
  try {
    return Version.parseVersion(version);
  }
 catch (  final IllegalArgumentException iae) {
    return defaultValue;
  }
}

public static Version toVersion ( String version , final Version defaultValue ) { final int rIndex = version . lastIndexOf ( ".lco" ) ; if ( rIndex != - 1 ) version = version . substring ( 0 , rIndex ) ; try { return Version . parseVersion ( version ) ; } catch ( final IllegalArgumentException iae ) { return defaultValue ; } }
cast a lucee string version to a int version
