public static boolean initializeUnescapePattern ( ) { if ( paternIsInitialized == true ) { return true ; } synchronized ( unescapeInitLockObject ) { if ( paternIsInitialized == true ) { return true ; } try { unescapePattern = Pattern . compile ( unicodeUnescapeMatchExpression ) ; } catch ( PatternSyntaxException pse ) { /* * the pattern is compiled from a final string, so this * exception should never be thrown */ System . err . println ( "Imposible error: " + "static final regular expression pattern " + "failed to compile. Exception: " + pse . toString ( ) ) ; return false ; } paternIsInitialized = true ; } return true ; }
Initialize regular expressions used in unescaping . This method will be invoked automatically the first time a string is unescaped .