You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/01/25 19:58:15 UTC

svn commit: r499908 - in /webservices/muse/trunk/modules: muse-osgi-core/src/org/apache/muse/core/platform/osgi/ muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/ muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/

Author: danj
Date: Thu Jan 25 10:58:14 2007
New Revision: 499908

URL: http://svn.apache.org/viewvc?view=rev&rev=499908
Log:
Few small formatting changes caused by the back-and-forth on RuntimeException vs. DetailedRuntimeException. 
The exceptions ended up staying the same but I fixed some of the messages.

Modified:
    webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/OSGiEnvironmentImpl.java
    webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiCapabilityDescriptor.java
    webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiDeploymentDescriptor.java
    webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiResourceDescriptor.java
    webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/OSGiMiniEnvironment.java

Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/OSGiEnvironmentImpl.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/OSGiEnvironmentImpl.java?view=diff&rev=499908&r1=499907&r2=499908
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/OSGiEnvironmentImpl.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/OSGiEnvironmentImpl.java Thu Jan 25 10:58:14 2007
@@ -22,10 +22,11 @@
 import java.io.InputStream;
 import java.net.URL;
 
+import org.osgi.framework.Bundle;
+
 import org.apache.muse.core.AbstractEnvironment;
-import org.apache.muse.ws.addressing.EndpointReference;
 import org.apache.muse.core.platform.osgi.util.OSGiReflectUtilHelper;
-import org.osgi.framework.Bundle;
+import org.apache.muse.ws.addressing.EndpointReference;
 
 /**
  *
@@ -94,7 +95,7 @@
 	 */
 	public InputStream getDataResourceStream(String path) {
 		if (path == null)
-			throw new NullPointerException("NullResourcePath");
+			throw new NullPointerException("Resource path is null.");
 
 		InputStream input = null;
 		Bundle bundle = getThreadLocalBundle();

Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiCapabilityDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiCapabilityDescriptor.java?view=diff&rev=499908&r1=499907&r2=499908
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiCapabilityDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiCapabilityDescriptor.java Thu Jan 25 10:58:14 2007
@@ -17,6 +17,10 @@
 
 package org.apache.muse.core.platform.osgi.descriptor;
 
+import org.w3c.dom.Element;
+
+import org.osgi.framework.Bundle;
+
 import org.apache.muse.core.Capability;
 import org.apache.muse.core.Environment;
 import org.apache.muse.core.descriptor.DescriptorConstants;
@@ -26,9 +30,6 @@
 import org.apache.muse.util.messages.Messages;
 import org.apache.muse.util.messages.MessagesFactory;
 import org.apache.muse.util.xml.XmlUtils;
-import org.w3c.dom.Element;
-
-import org.osgi.framework.Bundle;
 
 /**
  *
@@ -41,8 +42,7 @@
 
 public class OSGiCapabilityDescriptor extends SimpleCapabilityDescriptor {
 
-	private static Messages _MESSAGES = MessagesFactory
-			.get(SimpleRouterDescriptor.class);
+	private static Messages _MESSAGES = MessagesFactory.get(SimpleRouterDescriptor.class);
 
 	private Bundle bundle;
 

Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiDeploymentDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiDeploymentDescriptor.java?view=diff&rev=499908&r1=499907&r2=499908
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiDeploymentDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiDeploymentDescriptor.java Thu Jan 25 10:58:14 2007
@@ -22,6 +22,11 @@
 
 import javax.xml.namespace.QName;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import org.osgi.framework.Bundle;
+
 import org.apache.muse.core.Environment;
 import org.apache.muse.core.descriptor.DeploymentDescriptor;
 import org.apache.muse.core.descriptor.DescriptorConstants;
@@ -38,10 +43,6 @@
 import org.apache.muse.util.messages.Messages;
 import org.apache.muse.util.messages.MessagesFactory;
 import org.apache.muse.util.xml.XmlUtils;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
 
 /**
  *
@@ -101,8 +102,7 @@
 	public Collection loadContextPaths(Document xml, Environment env)
 			throws SoapFault {
 		if (xml == null)
-			throw new NullPointerException(_MESSAGES
-					.get("NullDescriptorDocument"));
+			throw new NullPointerException(_MESSAGES.get("NullDescriptorDocument"));
 
 		Element root = XmlUtils.getElement(xml, DescriptorConstants.MUSE_QNAME);
 
@@ -126,8 +126,7 @@
 	
 	public String getWsdlPathForContext(Document xml, String context) throws SoapFault {
 		if (xml == null)
-			throw new NullPointerException(_MESSAGES
-					.get("NullDescriptorDocument"));
+			throw new NullPointerException(_MESSAGES.get("NullDescriptorDocument"));
 
 		if (context == null) return null;
 
@@ -155,8 +154,7 @@
 	 */
 	public void load(Document xml, Environment environment) throws SoapFault {
 		if (xml == null)
-			throw new NullPointerException(_MESSAGES
-					.get("NullDescriptorDocument"));
+			throw new NullPointerException(_MESSAGES.get("NullDescriptorDocument"));
 
 		Element root = XmlUtils.getElement(xml, DescriptorConstants.MUSE_QNAME);
 

Modified: webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiResourceDescriptor.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiResourceDescriptor.java?view=diff&rev=499908&r1=499907&r2=499908
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiResourceDescriptor.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-core/src/org/apache/muse/core/platform/osgi/descriptor/OSGiResourceDescriptor.java Thu Jan 25 10:58:14 2007
@@ -17,13 +17,14 @@
 
 package org.apache.muse.core.platform.osgi.descriptor;
 
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.io.File;
-import java.io.InputStream;
 
 import javax.wsdl.Definition;
 import javax.wsdl.Operation;
@@ -32,8 +33,14 @@
 import javax.wsdl.PortType;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
 import javax.wsdl.xml.WSDLLocator;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+import org.osgi.framework.Bundle;
 
 import org.apache.muse.core.Environment;
 import org.apache.muse.core.Resource;
@@ -42,20 +49,13 @@
 import org.apache.muse.core.descriptor.ResourceDefinition;
 import org.apache.muse.core.descriptor.SimpleResourceDescriptor;
 import org.apache.muse.core.descriptor.WsdlConfig;
+import org.apache.muse.core.platform.osgi.util.OSGiReflectUtilHelper;
 import org.apache.muse.util.ReflectUtils;
 import org.apache.muse.util.messages.Messages;
 import org.apache.muse.util.messages.MessagesFactory;
 import org.apache.muse.util.xml.XmlUtils;
 import org.apache.muse.util.xml.XsdUtils;
 import org.apache.muse.ws.wsdl.WsdlUtils;
-import org.osgi.framework.Bundle;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-
-import org.apache.muse.core.platform.osgi.util.OSGiReflectUtilHelper;
-
-import java.net.URL;
 
 /**
  *
@@ -139,7 +139,7 @@
 		}
         
         public void close(){
-            throw new UnsupportedOperationException(); // to satisfy WSDL4J 1.6.x  
+            // to satisfy WSDL4J 1.6.x  
         }
 
 	};
@@ -233,7 +233,7 @@
 		}
 
 		catch (Exception error) {
-			throw new RuntimeException(error);
+			throw new RuntimeException(error.getMessage(), error);
 		}
 
 //		find the port type named in the descriptor and process

Modified: webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/OSGiMiniEnvironment.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/OSGiMiniEnvironment.java?view=diff&rev=499908&r1=499907&r2=499908
==============================================================================
--- webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/OSGiMiniEnvironment.java (original)
+++ webservices/muse/trunk/modules/muse-osgi-soa-mini/src/org/apache/muse/core/platform/osgi/mini/internal/OSGiMiniEnvironment.java Thu Jan 25 10:58:14 2007
@@ -22,11 +22,6 @@
 	private static BundleContext bundleContext;
 
 	private InheritableThreadLocal localEnvironmentContext = new InheritableThreadLocal();
-
-	
-    protected void setRealDirectory(ServletContext servletContext){
-    	//TODO see why we need this...
-    }
     
 	/**
 	 * @return A <File> object corresponding to the executing thread's Bundle's 
@@ -72,7 +67,7 @@
 	 */
 	public InputStream getDataResourceStream(String path) {
 		if (path == null)
-			throw new NullPointerException("NullResourcePath");
+			throw new NullPointerException("Resource path is null.");
 
 		InputStream input = null;
 		Bundle bundle = getThreadLocalBundle();



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