@ Trivial static String removeBrackets ( String expression , boolean mask ) { final String methodName = "removeBrackets" ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , methodName , new Object [ ] { ( expression == null ) ? null : mask ? OBFUSCATED_STRING : expression , mask } ) ; } expression = expression . trim ( ) ; if ( ( expression . startsWith ( "${" ) || expression . startsWith ( "#{" ) ) && expression . endsWith ( "}" ) ) { expression = expression . substring ( 2 , expression . length ( ) - 1 ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , methodName , ( expression == null ) ? null : mask ? OBFUSCATED_STRING : expression ) ; } return expression ; }
Remove the brackets from an EL expression .