public static URI createUri ( final String url , final boolean strict ) { try { return newUri ( url , strict ) ; } catch ( URISyntaxException e ) { throw new AssertionError ( "Error creating URI: " + e . getMessage ( ) ) ; } }
Creates a new URI based off the given string . This function differs from newUri in that it throws an AssertionError instead of a URISyntaxException - so it is suitable for use in static locations as long as you can be sure it is a valid string that is being parsed .