private static void checkName ( String zoneId ) { int n = zoneId . length ( ) ; if ( n < 2 ) { throw new DateTimeException ( "Invalid ID for region-based ZoneId, invalid format: " + zoneId ) ; } for ( int i = 0 ; i < n ; i ++ ) { char c = zoneId . charAt ( i ) ; if ( c >= ' ' && c <= ' ' ) continue ; if ( c >= ' ' && c <= ' ' ) continue ; if ( c == ' ' && i != 0 ) continue ; if ( c >= ' ' && c <= ' ' && i != 0 ) continue ; if ( c == ' ' && i != 0 ) continue ; if ( c == ' ' && i != 0 ) continue ; if ( c == ' ' && i != 0 ) continue ; if ( c == ' ' && i != 0 ) continue ; if ( c == ' ' && i != 0 ) continue ; throw new DateTimeException ( "Invalid ID for region-based ZoneId, invalid format: " + zoneId ) ; } }
Checks that the given string is a legal ZondId name .