private void validateQuery ( String query ) throws URISyntaxException { if ( query . length ( ) == 0 ) return ; Iterator < String > iter = SS . splitToIterator ( query ) ; while ( iter . hasNext ( ) ) { String s = iter . next ( ) ; if ( s . length ( ) > 0 ) { int idx = s . indexOf ( ' ' ) ; if ( idx == - 1 ) throw new URISyntaxException ( query , "missing equal sign in " + s ) ; if ( s . lastIndexOf ( ' ' ) != idx ) throw new URISyntaxException ( query , "extra equal sign in " + s ) ; } } }
Internal method in charge of validating the query provided . Exception when query is not valid .