question: private boolean validateProperties ( ) throws PolicyException { if ( ( properties == null ) || ( properties . keySet ( ) == null ) ) { throw new PolicyException ( ResBundleUtils . rbName , "properties_can_not_be_null_or_empty" , null , null ) ; } Set keySet = properties . keySet ( ) ; if ( ! keySet . contains ( AUTHENTICATE_TO_REALM ) ) { String args [ ] = { AUTHENTICATE_TO_REALM } ; throw new PolicyException ( ResBundleUtils . rbName , "property_value_not_defined" , args , null ) ; } Iterator keys = keySet . iterator ( ) ; while ( keys . hasNext ( ) ) { String key = ( String ) keys . next ( ) ; if ( ! AUTHENTICATE_TO_REALM . equals ( key ) ) { String args [ ] = { key } ; throw new PolicyException ( ResBundleUtils . rbName , "attempt_to_set_invalid_property " , args , null ) ; } } Set authnToRealmSet = null ; try { authnToRealmSet = ( Set ) properties . get ( AUTHENTICATE_TO_REALM ) ; } catch ( ClassCastException e ) { String args [ ] = { REQUEST_AUTHENTICATED_TO_REALMS } ; throw new PolicyException ( ResBundleUtils . rbName , "property_is_not_a_Set" , args , e ) ; } if ( authnToRealmSet != null ) { validateAuthnToRealms ( authnToRealmSet ) ; } return true ; }
target:  Checks the properties set using setProperties() method for validity like, not null, presence of AUTHENTICATE_TO_REALM property, and no other invalid property.