juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r826737 - /webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
Date Mon, 19 Oct 2009 18:00:58 GMT
Author: kstam
Date: Mon Oct 19 18:00:58 2009
New Revision: 826737

URL: http://svn.apache.org/viewvc?rev=826737&view=rev
Log:
JUDDI-240 fixing null pointers

Modified:
    webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java

Modified: webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
URL: http://svn.apache.org/viewvc/webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java?rev=826737&r1=826736&r2=826737&view=diff
==============================================================================
--- webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
(original)
+++ webservices/juddi/trunk/juddi-console/uddi-portlets/src/main/java/org/apache/juddi/portlets/server/service/SubscriptionServiceImpl.java
Mon Oct 19 18:00:58 2009
@@ -124,11 +124,11 @@
 				if (subscription.getExpiresAfter()!=null) expiresAfter = subscription.getExpiresAfter().toString();
 				String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(subscription.getSubscriptionFilter()),
"org.uddi.sub_v3");
 				Subscription modelSubscription = new Subscription(
-						subscription.getBindingKey(),
+						(subscription.getBindingKey()==null)?"":subscription.getBindingKey(),
 						subscription.isBrief(),
 						expiresAfter,
 						subscription.getMaxEntities(),
-						subscription.getNotificationInterval().toString(),
+						(subscription.getNotificationInterval()==null)?"":subscription.getNotificationInterval().toString(),
 						rawFilter,
 						subscription.getSubscriptionKey());
 				modelSubscription.setNode(modelNode);
@@ -187,7 +187,10 @@
 			UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
 			List<org.uddi.sub_v3.Subscription> subscriptionList = new ArrayList<org.uddi.sub_v3.Subscription>();
 			org.uddi.sub_v3.Subscription subscription = new org.uddi.sub_v3.Subscription();
-			subscription.setBindingKey(modelSubscription.getBindingKey());
+			if (!"".equals(modelSubscription.getBindingKey())) {
+				subscription.setBindingKey(modelSubscription.getBindingKey());
+			}
+			
 			subscription.setBrief(modelSubscription.getBrief());
 			if (!"".equals(modelSubscription.getExpiresAfter())) {
 				XMLGregorianCalendar calendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(modelSubscription.getExpiresAfter());
@@ -213,11 +216,11 @@
 			if (subscription.getExpiresAfter()!=null) expiresAfter = subscription.getExpiresAfter().toString();
 			String rawFilter = JAXBMarshaller.marshallToString(new ObjectFactory().createSubscriptionFilter(subscription.getSubscriptionFilter()),
"org.uddi.sub_v3");
 			Subscription savedModelSubscription = new Subscription(
-					subscription.getBindingKey(),
+					(subscription.getBindingKey()==null)?"":subscription.getBindingKey(),
 					subscription.isBrief(),
 					expiresAfter,
 					subscription.getMaxEntities(),
-					subscription.getNotificationInterval().toString(),
+					(subscription.getNotificationInterval()==null)?"":subscription.getNotificationInterval().toString(),
 					rawFilter,
 					subscription.getSubscriptionKey());
 			savedModelSubscription.setNode(modelSubscription.getNode());



---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


Mime
View raw message