[gatein-commits] gatein SVN: r1213 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer.

do-not-reply at jboss.org do-not-reply at jboss.org
Sun Jan 10 17:27:03 EST 2010


Author: chris.laprun at jboss.com
Date: 2010-01-10 17:27:03 -0500 (Sun, 10 Jan 2010)
New Revision: 1213

Modified:
   components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
Log:
- Improved constructors, in particular to prevent creation of unattached RegistrationInfo outside of tests.

Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java	2010-01-10 21:24:39 UTC (rev 1212)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java	2010-01-10 22:27:03 UTC (rev 1213)
@@ -85,9 +85,7 @@
 
    static RegistrationInfo createUndeterminedRegistration(ProducerInfo producerInfo)
    {
-      RegistrationInfo info = new RegistrationInfo(producerInfo);
-      info.setConsumerName(UNDETERMINED_REGISTRATION);
-      return info;
+      return new RegistrationInfo(producerInfo);
    }
 
    public boolean isUndetermined()
@@ -101,9 +99,9 @@
       this.requiresRegistration = requiresRegistration;
    }
 
-   public RegistrationInfo()
+   RegistrationInfo()
    {
-      persistentConsumerName = WSRPConstants.DEFAULT_CONSUMER_NAME;
+      persistentConsumerName = UNDETERMINED_REGISTRATION;
    }
 
    public RegistrationInfo(RegistrationInfo other)



More information about the gatein-commits mailing list