Author: chris.laprun(a)jboss.com
Date: 2007-11-28 22:25:23 -0500 (Wed, 28 Nov 2007)
New Revision: 9180
Modified:
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/registration/policies/DefaultRegistrationPolicy.java
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/test/registration/DefaultRegistrationPolicyTestCase.java
Log:
- Fixed mistake in assumptions: it should be possible to validate data for inexistent
consumers (otherwise, impossible to register).
Modified:
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/registration/policies/DefaultRegistrationPolicy.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/registration/policies/DefaultRegistrationPolicy.java 2007-11-29
03:05:54 UTC (rev 9179)
+++
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/registration/policies/DefaultRegistrationPolicy.java 2007-11-29
03:25:23 UTC (rev 9180)
@@ -143,10 +143,6 @@
}
}
}
- else
- {
- throw new RegistrationException("'" + consumerIdentity +
"' is not a valid Consumer");
- }
}
/** Simply returns the given registration id. */
Modified:
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/test/registration/DefaultRegistrationPolicyTestCase.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/test/registration/DefaultRegistrationPolicyTestCase.java 2007-11-29
03:05:54 UTC (rev 9179)
+++
branches/JBoss_Portal_Branch_2_6/registration/src/main/org/jboss/portal/test/registration/DefaultRegistrationPolicyTestCase.java 2007-11-29
03:25:23 UTC (rev 9180)
@@ -83,11 +83,10 @@
try
{
policy.validateRegistrationDataFor(Collections.EMPTY_MAP, "foo");
- fail("shouldn't validate data for inexistent consumer");
}
catch (RegistrationException e)
{
- // expected
+ fail("Should be possible to validate information for inexistent consumer
(otherwise, how would we register!)");
}
}