[java-opensaml COMMIT] in /trunk: opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdenti...
noreply at shibboleth.net
noreply at shibboleth.net
Fri Feb 28 22:37:56 EST 2014
Author: scantor
Date: Fri Feb 28 22:37:56 2014
New Revision: 3663
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3663&view=rev
Log:
Remove defaulted ID.
Modified:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdentifierGenerator.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/profile/AbstractSAML1NameIdentifierGeneratorTest.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/AbstractSAML2NameIDGeneratorTest.java
Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdentifierGenerator.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdentifierGenerator.java?rev=3663&r1=3662&r2=3663&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdentifierGenerator.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/AbstractNameIdentifierGenerator.java Fri Feb 28 22:37:56 2014
@@ -74,8 +74,6 @@
/** Constructor. */
protected AbstractNameIdentifierGenerator() {
- super.setId(getClass().getName());
-
activationCondition = Predicates.alwaysTrue();
}
@@ -253,7 +251,8 @@
*
* @return the effective NameQualifier to set, or null
*/
- @Nullable protected String getEffectiveIdPNameQualifier(@Nonnull final ProfileRequestContext profileRequestContext) {
+ @Nullable protected String getEffectiveIdPNameQualifier(
+ @Nonnull final ProfileRequestContext profileRequestContext) {
if (idpNameQualifier != null) {
if (omitQualifiers) {
if (!Objects.equal(idpNameQualifier, getDefaultIdPNameQualifier(profileRequestContext))) {
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/profile/AbstractSAML1NameIdentifierGeneratorTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/profile/AbstractSAML1NameIdentifierGeneratorTest.java?rev=3663&r1=3662&r2=3663&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/profile/AbstractSAML1NameIdentifierGeneratorTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/profile/AbstractSAML1NameIdentifierGeneratorTest.java Fri Feb 28 22:37:56 2014
@@ -31,15 +31,10 @@
private static final String NAME_QUALIFIER = "https://idp.example.org";
- @Test
- public void testNoFormat() {
+ @Test(expectedExceptions = ComponentInitializationException.class)
+ public void testNoFormat() throws ComponentInitializationException {
final MockSAML1NameIdentifierGenerator mock = new MockSAML1NameIdentifierGenerator();
- try {
- mock.initialize();
- Assert.fail();
- } catch (ComponentInitializationException e) {
-
- }
+ mock.initialize();
}
@Test
@@ -96,6 +91,10 @@
private class MockSAML1NameIdentifierGenerator extends AbstractSAML1NameIdentifierGenerator {
+ public MockSAML1NameIdentifierGenerator() {
+ setId("test");
+ }
+
/** {@inheritDoc} */
@Override
protected String getIdentifier(ProfileRequestContext profileRequestContext) throws ProfileException {
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/AbstractSAML2NameIDGeneratorTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/AbstractSAML2NameIDGeneratorTest.java?rev=3663&r1=3662&r2=3663&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/AbstractSAML2NameIDGeneratorTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/profile/AbstractSAML2NameIDGeneratorTest.java Fri Feb 28 22:37:56 2014
@@ -33,15 +33,10 @@
private static final String SP_NAME_QUALIFIER = "https://sp.example.org";
- @Test
- public void testNoFormat() {
+ @Test(expectedExceptions = ComponentInitializationException.class)
+ public void testNoFormat() throws ComponentInitializationException {
final MockSAML2NameIDGenerator mock = new MockSAML2NameIDGenerator();
- try {
- mock.initialize();
- Assert.fail();
- } catch (ComponentInitializationException e) {
-
- }
+ mock.initialize();
}
@Test
@@ -106,6 +101,10 @@
private class MockSAML2NameIDGenerator extends AbstractSAML2NameIDGenerator {
+ public MockSAML2NameIDGenerator() {
+ setId("test");
+ }
+
/** {@inheritDoc} */
@Override
[... 2 lines stripped ...]
More information about the commits
mailing list