Author: chris.laprun(a)jboss.com
Date: 2011-05-26 09:15:55 -0400 (Thu, 26 May 2011)
New Revision: 6568
Modified:
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/mapping/RegistrationRequirementsMapping.java
Log:
- JBEPP-961: do not attempt to work with the RegistrationPolicy if none has been set.
Modified:
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/mapping/RegistrationRequirementsMapping.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/mapping/RegistrationRequirementsMapping.java 2011-05-26
13:15:07 UTC (rev 6567)
+++
epp/portal/branches/EPP_5_1_Branch/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/mapping/RegistrationRequirementsMapping.java 2011-05-26
13:15:55 UTC (rev 6568)
@@ -80,15 +80,20 @@
setRegistrationRequired(registrationRequirements.isRegistrationRequired());
setRegistrationRequiredForFullDescription(registrationRequirements.isRegistrationRequiredForFullDescription());
RegistrationPolicy policy = registrationRequirements.getPolicy();
- setPolicyClassName(policy.getClassName());
- RegistrationPolicy unwrap = RegistrationPolicyWrapper.unwrap(policy);
- if (unwrap instanceof DefaultRegistrationPolicy)
+ if(policy != null)
{
- DefaultRegistrationPolicy drp = (DefaultRegistrationPolicy)unwrap;
- setValidatorClassName(drp.getValidator().getClass().getName());
+ setPolicyClassName(policy.getClassName());
+
+ RegistrationPolicy unwrap = RegistrationPolicyWrapper.unwrap(policy);
+ if (unwrap instanceof DefaultRegistrationPolicy)
+ {
+ DefaultRegistrationPolicy drp = (DefaultRegistrationPolicy)unwrap;
+ setValidatorClassName(drp.getValidator().getClass().getName());
+ }
}
+
// first clear persisted properties
List<RegistrationPropertyDescriptionMapping> rpdms =
getRegistrationPropertyDescriptions();
rpdms.clear();
Show replies by date