@Override public boolean hasRole ( final String role ) { try { if ( this.sessionPrivileges ) { return this.connectionService.getConnection ().getPrivileges ().contains ( role ); } else { final Map<String, String> properties = this.connectionService.getConnection ().getSessionProperties (); final String value = properties.get ( "session.privilege." + role ); if ( value == null ) { return false; } return Boolean.parseBoolean ( value ); } } catch ( final NullPointerException e ) { return false; } } }