cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r499118 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/ common/common/src/main/java/org/apache/cxf/helpers/ common/common/src/test/java/org/apache/cxf/common/classloader/ common/common/src/test/java/org/ap...
Date Tue, 23 Jan 2007 20:13:13 GMT
Author: dkulp
Date: Tue Jan 23 12:13:11 2007
New Revision: 499118

URL: http://svn.apache.org/viewvc?view=rev&rev=499118
Log:
Updates to make entire tree compile warning free with JDK 1.6 (tests still don't pass)


Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/WSDLHelper.java
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java
    incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/resource/ClassLoaderResolverTest.java
    incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
    incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/WebServiceClassFinder.java
    incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdown.java
    incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactory.java
    incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
    incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolRunner.java
    incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
    incubator/cxf/trunk/tools/java2wsdl/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ClassProcessor.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
    incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaExSoapHeaderTest.java
    incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/StringUtils.java
Tue Jan 23 12:13:11 2007
@@ -64,7 +64,7 @@
         try {
             return new URL(spec);
         } catch (MalformedURLException e) {
-            return new File(spec).toURL();
+            return new File(spec).toURI().toURL();
         }
     }
 

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/WSDLHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/WSDLHelper.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/WSDLHelper.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/WSDLHelper.java
Tue Jan 23 12:13:11 2007
@@ -182,6 +182,6 @@
         WSDLFactory wsdlFactory = WSDLFactory.newInstance();
         WSDLReader reader = wsdlFactory.newWSDLReader();
         reader.setFeature("javax.wsdl.verbose", false);
-        return reader.readWSDL(wsdlFile.toURL().toString());
+        return reader.readWSDL(wsdlFile.toURI().toURL().toString());
     }
 }

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java
(original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/common/classloader/FireWallClassLoaderTest.java
Tue Jan 23 12:13:11 2007
@@ -67,11 +67,11 @@
         os.write("This is a test".getBytes());
         os.close();
         tmpFile.deleteOnExit();
-        String urlString = tmpFile.toURL().toString();
+        String urlString = tmpFile.toURI().toURL().toString();
 
         ClassLoader c = new FireWallClassLoader(getClass().getClassLoader(), new String[]
{"java."});
-        Class urlClass = c.loadClass("java.net.URL");
-        Constructor urlConstr = urlClass.getConstructor(new Class[] {String.class});
+        Class<?> urlClass = c.loadClass("java.net.URL");
+        Constructor<?> urlConstr = urlClass.getConstructor(new Class[] {String.class});
         Object url = urlConstr.newInstance(new Object[] {urlString});
         Method meth = url.getClass().getMethod("openConnection", new Class[] {});
         Object urlConn = meth.invoke(url, new Object[] {});

Modified: incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/resource/ClassLoaderResolverTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/resource/ClassLoaderResolverTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/resource/ClassLoaderResolverTest.java
(original)
+++ incubator/cxf/trunk/common/common/src/test/java/org/apache/cxf/resource/ClassLoaderResolverTest.java
Tue Jan 23 12:13:11 2007
@@ -49,7 +49,7 @@
         writer.write("\n");
         writer.close();
 
-        URL[] urls = {resource.getParentFile().toURL()};
+        URL[] urls = {resource.getParentFile().toURI().toURL()};
         ClassLoader loader = new URLClassLoader(urls); 
         assertNotNull(loader.getResourceAsStream(resourceName));
         assertNull(ClassLoader.getSystemResourceAsStream(resourceName));

Modified: incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
(original)
+++ incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java
Tue Jan 23 12:13:11 2007
@@ -75,7 +75,7 @@
         
         URL url = null; 
         try { 
-            url = new File(path + File.separator).toURL();
+            url = new File(path + File.separator).toURI().toURL();
             
         } catch (MalformedURLException ex) {
             LOG.log(Level.SEVERE, new Message("SU.FAILED.INIT", LOG).toString(), ex);
@@ -251,7 +251,7 @@
             DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             factory.setNamespaceAware(true);
             DocumentBuilder builder = factory.newDocumentBuilder();
-            Document doc = builder.parse(jbiXml.toURL().toString());
+            Document doc = builder.parse(jbiXml.toURI().toURL().toString());
             
             Element providesEl = (Element)findNode(doc.getDocumentElement(), "provides");
             Element consumersEl = (Element)findNode(doc.getDocumentElement(), "consumes");

Modified: incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/WebServiceClassFinder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/WebServiceClassFinder.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/WebServiceClassFinder.java
(original)
+++ incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/WebServiceClassFinder.java
Tue Jan 23 12:13:11 2007
@@ -84,7 +84,7 @@
         List<Class<?>> classes = new ArrayList<Class<?>>();
 
         File root = new File(rootPath);
-        URL[] urls = {root.toURL()};
+        URL[] urls = {root.toURI().toURL()};
         URLClassLoader loader = new URLClassLoader(urls, parent);
 
         find(root, loader, classes, matcher);

Modified: incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdown.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdown.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdown.java
(original)
+++ incubator/cxf/trunk/integration/jbi/src/main/java/org/apache/cxf/jbi/se/state/ServiceEngineShutdown.java
Tue Jan 23 12:13:11 2007
@@ -75,7 +75,8 @@
             File cxfConfig = new File(metaInfDir, CXF_CONFIG_FILE); 
             
             if (cxfConfig.exists()) { 
-                System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME, cxfConfig.toURL().toString());
+                System.setProperty(Configurer.USER_CFG_FILE_PROPERTY_NAME,
+                                   cxfConfig.toURI().toURL().toString());
                 LOG.info(new Message("SE.SET.CONFIGURATION", LOG) + Configurer.USER_CFG_FILE_PROPERTY_NAME);
             } else { 
                 LOG.severe(new Message("SE.NOT.FOUND.CONFIGURATION", LOG).toString() + metaInfDir);
@@ -128,7 +129,7 @@
                 urls = new URL[jars.length];
                 int i = 0;
                 for (File jar : jars) { 
-                    urls[i] = jar.toURL();
+                    urls[i] = jar.toURI().toURL();
                     i++;
                 }
             }

Modified: incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactory.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactory.java
(original)
+++ incubator/cxf/trunk/integration/jca/src/main/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactory.java
Tue Jan 23 12:13:11 2007
@@ -35,7 +35,7 @@
 
     private static final Logger LOG = Logger.getLogger(InvocationHandlerFactory.class.getName());
 
-    final Class[] handlerChainTypes;
+    final Class<?>[] handlerChainTypes;
 
     private final Bus bus;
     private final CXFManagedConnection managedConnection;
@@ -96,7 +96,7 @@
         return first;
     }
 
-    private Class[] getHandlerChainDefinition() throws IOException, ClassNotFoundException
{
+    private Class<?>[] getHandlerChainDefinition() throws IOException, ClassNotFoundException
{
 
         String[] classNames = {"org.apache.cxf.jca.cxf.handlers.ProxyInvocationHandler",
                                "org.apache.cxf.jca.cxf.handlers.ObjectMethodInvocationHandler",

Modified: incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java
(original)
+++ incubator/cxf/trunk/integration/jca/src/test/java/org/apache/cxf/jca/cxf/JCABusFactoryTest.java
Tue Jan 23 12:13:11 2007
@@ -287,7 +287,7 @@
         ManagedConnectionFactoryImpl mcf = new ManagedConnectionFactoryImpl();
         JCABusFactory jcaBusFactory = new JCABusFactory(mcf);
         try {
-            jcaBusFactory.loadProperties(new File("/rubbish_name.properties").toURL());
+            jcaBusFactory.loadProperties(new File("/rubbish_name.properties").toURI().toURL());
             fail("expect an exception .");
         } catch (ResourceException re) {
             assertTrue("Cause is FileNotFoundException, cause: " + re.getCause(),

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/ClientFaultConverter.java
Tue Jan 23 12:13:11 2007
@@ -95,8 +95,8 @@
         DataReader<Node> reader = dataBinding.getDataReaderFactory().createReader(Node.class);
         Object e = reader.read(part, exDetail);
         if (!(e instanceof Exception)) {
-            Class exClass = faultWanted.getProperty(Class.class.getName(), Class.class);
-            Class beanClass = e.getClass();
+            Class<?> exClass = faultWanted.getProperty(Class.class.getName(), Class.class);
+            Class<?> beanClass = e.getClass();
             try {
                 Constructor constructor = exClass.getConstructor(new Class[]{String.class,
beanClass});
                 e = constructor.newInstance(new Object[]{fault.getMessage(), e});

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/service/invoker/AbstractInvoker.java
Tue Jan 23 12:13:11 2007
@@ -160,7 +160,7 @@
      * @return the more specific method, or the original method if the
      *         targetClass doesn't specialize it or implement it or is null
      */
-    public static Method getMostSpecificMethod(Method method, Class targetClass) {
+    public static Method getMostSpecificMethod(Method method, Class<?> targetClass)
{
         if (method != null && targetClass != null) {
             try {
                 method = targetClass.getMethod(method.getName(), method.getParameterTypes());

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceConfiguration.java
Tue Jan 23 12:13:11 2007
@@ -163,7 +163,7 @@
     }
 
     Method getDeclaredMethod(Method method) {
-        Class endpointClass = implInfo.getEndpointClass();
+        Class<?> endpointClass = implInfo.getEndpointClass();
 
         if (!method.getDeclaringClass().equals(endpointClass)) {
             try {

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
Tue Jan 23 12:13:11 2007
@@ -154,7 +154,7 @@
     
     
     @Override
-    protected Class getBeanClass(Class exClass) {
+    protected Class<?> getBeanClass(Class<?> exClass) {
         try {
             Method getFaultInfo = exClass.getMethod("getFaultInfo", new Class[0]);
             

Modified: incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
(original)
+++ incubator/cxf/trunk/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java
Tue Jan 23 12:13:11 2007
@@ -645,7 +645,7 @@
         return fi;
     }
 
-    protected Class getBeanClass(Class exClass) {
+    protected Class<?> getBeanClass(Class<?> exClass) {
         return exClass;
     }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/basicDOCBare/DOCBareClientServerTest.java
Tue Jan 23 12:13:11 2007
@@ -82,7 +82,7 @@
     }
 
     public void testAnnotation() throws Exception {
-        Class claz = PutLastTradedPricePortType.class;
+        Class<PutLastTradedPricePortType> claz = PutLastTradedPricePortType.class;
         TradePriceData priceData = new TradePriceData();
         Holder<TradePriceData> holder = new Holder<TradePriceData>(priceData);
         Method method = claz.getMethod("sayHi", holder.getClass());

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolRunner.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolRunner.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolRunner.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolRunner.java
Tue Jan 23 12:13:11 2007
@@ -34,17 +34,17 @@
         // utility class - never constructed
     }
 
-    public static void runTool(Class clz, InputStream toolspecStream,
+    public static void runTool(Class<? extends ToolContainer> clz, InputStream toolspecStream,
                                boolean validate, String[] args) throws Exception {
         runTool(clz, toolspecStream, validate, args, true);
     }
 
-    public static void runTool(Class clz, InputStream toolspecStream,
+    public static void runTool(Class<? extends ToolContainer> clz, InputStream toolspecStream,
                                boolean validate, String[] args, ToolContext context) throws
Exception {
         runTool(clz, toolspecStream, validate, args, true, context);
     }
 
-    public static void runTool(Class clz,
+    public static void runTool(Class<? extends ToolContainer> clz,
                                InputStream toolspecStream,
                                boolean validate,
                                String[] args,
@@ -52,7 +52,7 @@
         runTool(clz, toolspecStream, validate, args, true, null);
     }
     
-    public static void runTool(Class clz,
+    public static void runTool(Class<? extends ToolContainer> clz,
                                InputStream toolspecStream,
                                boolean validate,
                                String[] args,
@@ -64,14 +64,14 @@
             ToolContainer container = null;
 
             try {
-                Constructor cons = clz.getConstructor(
+                Constructor<? extends ToolContainer> cons = clz.getConstructor(
                                                       new Class[] {
                                                           ToolSpec.class
                                                       });
-                container = (ToolContainer)cons.newInstance(
-                                                            new Object[] {
-                                                                new ToolSpec(toolspecStream,
validate)
-                                                            });
+                container = cons.newInstance(
+                                             new Object[] {
+                                                 new ToolSpec(toolspecStream, validate)
+                                             });
             } catch (Exception ex) {
                 Message message = new Message("CLZ_CANNOT_BE_CONSTRUCTED", LOG, clz.getName());
                 LOG.log(Level.SEVERE, message.toString());

Modified: incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
(original)
+++ incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/ProcessorUtil.java
Tue Jan 23 12:13:11 2007
@@ -186,7 +186,7 @@
         if (location.startsWith("http://")) {
             return new URL(location);
         } else {
-            return new File(getAbsolutePath(location)).toURL();
+            return new File(getAbsolutePath(location)).toURI().toURL();
         }
     }
 
@@ -202,7 +202,7 @@
             File file = new File(st.nextToken());
             URL url = null;
             try {
-                url = file.toURL();
+                url = file.toURI().toURL();
             } catch (MalformedURLException e) {
                 e.printStackTrace();
             }
@@ -302,7 +302,7 @@
             try {
                 return escapeSpace(new URL(fileOrURL).toExternalForm());
             } catch (MalformedURLException e) {
-                return new File(fileOrURL).getCanonicalFile().toURL().toExternalForm();
+                return new File(fileOrURL).getCanonicalFile().toURI().toURL().toExternalForm();
             }
         } catch (Exception e) {
             return fileOrURL;
@@ -325,7 +325,7 @@
         // absolutize all the system IDs in the input,
         // so that we can map system IDs to DOM trees.
         try {
-            URL baseURL = new File(".").getCanonicalFile().toURL();
+            URL baseURL = new File(".").getCanonicalFile().toURI().toURL();
             return new URL(baseURL, name.replaceAll(" ", "%20")).toExternalForm();
         } catch (IOException e) {
             // ignore

Modified: incubator/cxf/trunk/tools/java2wsdl/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ClassProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/java2wsdl/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ClassProcessor.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/java2wsdl/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ClassProcessor.java
(original)
+++ incubator/cxf/trunk/tools/java2wsdl/src/main/java/org/apache/cxf/tools/java2wsdl/processor/internal/ClassProcessor.java
Tue Jan 23 12:13:11 2007
@@ -47,7 +47,7 @@
 public class ClassProcessor {
     private static final Logger LOG = LogUtils.getL7dLogger(JavaToWSDLProcessor.class);
 
-    Class seiClass;
+    Class<?> seiClass;
 
     WSDLModel model;
 
@@ -55,7 +55,7 @@
 
     private final ToolContext env;
 
-    public ClassProcessor(Class clz, ToolContext penv) {
+    public ClassProcessor(Class<?> clz, ToolContext penv) {
         seiClass = clz;
         env = penv;
     }

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
Tue Jan 23 12:13:11 2007
@@ -289,7 +289,7 @@
             List<String> xsdUrls = new ArrayList<String>(files.length);
             for (File file : files) {
                 try {
-                    String s = file.toURL().toString();
+                    String s = file.toURI().toURL().toString();
                     xsdUrls.add(s);
                     if (s.indexOf("http-conf") > 0) {
                         xsdUrls.add(0, s);
@@ -306,7 +306,7 @@
     private String getWsdlUrl(String path) throws IOException {
         File file = new File(path);
         if (file != null && file.exists()) {
-            return file.toURL().toString();
+            return file.toURI().toURL().toString();
         }
 
         return null;

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ValidatorUtil.java
Tue Jan 23 12:13:11 2007
@@ -177,13 +177,13 @@
     private static String getImportedUrl(String theImportPath, String baseURI) throws IOException
{
         File file = new File(theImportPath);
         if (file != null && file.exists()) {
-            return file.toURL().toString();
+            return file.toURI().toURL().toString();
         }
         // Import may have a relative path
         File baseFile = new File(baseURI);
         file = new File(baseFile.getParent(), theImportPath);
         if (file != null && file.exists()) {
-            return file.toURL().toString();
+            return file.toURI().toURL().toString();
         }
         return null;
     }

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
Tue Jan 23 12:13:11 2007
@@ -155,8 +155,8 @@
                     }
                 });
                 for (int i = 0; i < files.length; i++) {
-                    InputSource is = new InputSource(files[i].toURL().openStream());
-                    is.setSystemId(files[i].toURL().toString());
+                    InputSource is = new InputSource(files[i].toURI().toURL().openStream());
+                    is.setSystemId(files[i].toURI().toURL().toString());
                     xsdList.add(is);
                 }
             }

Modified: incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaExSoapHeaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaExSoapHeaderTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaExSoapHeaderTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaExSoapHeaderTest.java
Tue Jan 23 12:13:11 2007
@@ -52,7 +52,7 @@
                                       getLocation("/wsdl2java_wsdl/soapheader_test.wsdl")};
         WSDLToJava.main(args);
 
-        Class clz = classLoader.loadClass("org.apache.header_test.TestHeader");        
+        Class<?> clz = classLoader.loadClass("org.apache.header_test.TestHeader");
       
         Method method = clz.getMethod("testHeader4", new Class[] {java.lang.String.class,
                                                                   Holder.class});
         if (method == null) {
@@ -72,8 +72,8 @@
                                       getLocation("/wsdl2java_wsdl/soapheader_test.wsdl")};
         WSDLToJava.main(args);
 
-        Class clz = classLoader.loadClass("org.apache.header_test.TestHeader");
-        Class paramClz = classLoader.loadClass("org.apache.header_test.types.TestHeader5");
+        Class<?> clz = classLoader.loadClass("org.apache.header_test.TestHeader");
+        Class<?> paramClz = classLoader.loadClass("org.apache.header_test.types.TestHeader5");
         assertEquals(5, clz.getMethods().length);
         
         Method method = clz.getMethod("testHeader5", new Class[] {paramClz});

Modified: incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java?view=diff&rev=499118&r1=499117&r2=499118
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
(original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
Tue Jan 23 12:13:11 2007
@@ -85,7 +85,7 @@
         files = types.listFiles();
         assertEquals(files.length, 3);
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_rpclit.GreeterRPCLit");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_rpclit.GreeterRPCLit");
 
         javax.jws.WebService ws = AnnotationUtil.getPrivClassAnnotation(clz, javax.jws.WebService.class);
         assertTrue("Webservice annotation wsdlLocation should begin with file", ws.wsdlLocation()
@@ -97,7 +97,7 @@
 
         assertEquals("Generate operation error", 3, clz.getMethods().length);
 
-        Class paraClass = classLoader.loadClass("org.apache.hello_world_rpclit.types.MyComplexStruct");
+        Class<?> paraClass = classLoader.loadClass("org.apache.hello_world_rpclit.types.MyComplexStruct");
         Method method = clz.getMethod("sendReceiveData", new Class[] {paraClass});
         assertEquals("MyComplexStruct", method.getReturnType().getSimpleName());
         
@@ -128,7 +128,7 @@
         File[] files = async.listFiles();
         assertEquals(4, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_async_soap_http.GreeterAsync");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_async_soap_http.GreeterAsync");
 
         Method method1 = clz.getMethod("greetMeSometimeAsync", new Class[] {java.lang.String.class,
                                                                             javax.xml.ws.AsyncHandler.class});
@@ -165,7 +165,7 @@
         files = types.listFiles();
         assertEquals(7, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_soap12_http.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_soap12_http.Greeter");
         assertTrue("class " + clz.getName() + " modifier is not public", Modifier
                    .isPublic(clz.getModifiers()));
         assertTrue("class " + clz.getName() + " modifier is interface",
@@ -223,7 +223,7 @@
         files = types.listFiles();
         assertEquals(17, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_soap_http.Greeter");
         assertTrue("class " + clz.getName() + " modifier is not public", Modifier
             .isPublic(clz.getModifiers()));
         assertTrue("class " + clz.getName() + " modifier is interface", Modifier.isInterface(clz
@@ -293,7 +293,7 @@
         File[] files = mapping.listFiles();
         assertEquals(7, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.mapping.SomethingServer");
+        Class<?> clz = classLoader.loadClass("org.apache.mapping.SomethingServer");
         Method method = clz.getMethod("doSomething", new Class[] {int.class, javax.xml.ws.Holder.class,
                                                                   javax.xml.ws.Holder.class});
         assertEquals("boolean", method.getReturnType().getSimpleName());
@@ -330,7 +330,7 @@
         files = schemaImport.listFiles();
         assertEquals(4, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.schema_import.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.schema_import.Greeter");
         assertEquals(4, clz.getMethods().length);
 
         Method method = clz.getMethod("pingMe", new Class[] {});
@@ -383,7 +383,7 @@
         files = invoice.listFiles();
         assertEquals(files.length, 9);
 
-        Class clz = classLoader.loadClass("org.apache.invoiceserver.InvoiceServer");
+        Class<?> clz = classLoader.loadClass("org.apache.invoiceserver.InvoiceServer");
         assertEquals(3, clz.getMethods().length);
 
         Method method = clz.getMethod("getInvoicesForCustomer", new Class[] {String.class,
String.class});
@@ -414,7 +414,7 @@
         File serviceCollision = new File(apache, "Greeter_Service.java");
         assertTrue(serviceCollision.exists());
 
-        Class clz = classLoader.loadClass("org.apache.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.Greeter");
         assertTrue("SEI class Greeter modifier should be interface", clz.isInterface());
 
         clz = classLoader.loadClass("org.apache.Greeter_Exception");
@@ -441,7 +441,7 @@
         File serviceCollision = new File(apache, "HelloWorldServiceImpl_Service.java");
         assertTrue(serviceCollision.exists());
 
-        Class clz = classLoader.loadClass("org.apache.HelloWorldServiceImpl");
+        Class<?> clz = classLoader.loadClass("org.apache.HelloWorldServiceImpl");
         assertTrue("SEI class HelloWorldServiceImpl modifier should be interface", clz.isInterface());
 
         clz = classLoader.loadClass("org.apache.HelloWorldServiceImpl_Service");
@@ -463,7 +463,7 @@
         // File[] files = apache.listFiles();
         // assertEquals(6, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_async_soap_http.GreeterAsync");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_async_soap_http.GreeterAsync");
         assertEquals(3, clz.getMethods().length);
 
     }
@@ -484,7 +484,7 @@
         File[] files = apache.listFiles();
         assertEquals(12, files.length);
 
-        Class clz = classLoader.loadClass("org.apache.HeaderTester");
+        Class<?> clz = classLoader.loadClass("org.apache.HeaderTester");
         assertEquals(3, clz.getMethods().length);
 
         SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
@@ -510,7 +510,7 @@
         processor.setEnvironment(env);
         processor.process();
 
-        Class clz = classLoader.loadClass("org.apache.hello_world_holder.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world_holder.Greeter");
         assertEquals(1, clz.getMethods().length);
 
         SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
@@ -551,7 +551,7 @@
         files = types.listFiles();
         assertEquals(17, files.length);
 
-        Class clz = classLoader.loadClass("org.cxf.Greeter");
+        Class<?> clz = classLoader.loadClass("org.cxf.Greeter");
         assertTrue("Generate " + clz.getName() + "error", clz.isInterface());
         clz = classLoader.loadClass("org.apache.types.GreetMe");
     }
@@ -577,7 +577,7 @@
         files = cxf.listFiles();
         assertEquals(17, files.length);
 
-        Class clz = classLoader.loadClass("org.cxf.GreetMe");
+        Class<?> clz = classLoader.loadClass("org.cxf.GreetMe");
         assertTrue("Generate " + clz.getName() + "error", Modifier.isPublic(clz.getModifiers()));
         clz = classLoader.loadClass("org.apache.Greeter");
     }
@@ -605,7 +605,7 @@
         files = cxf.listFiles();
         assertEquals(6, files.length);
 
-        Class clz = classLoader.loadClass("org.cxf.Greeter");
+        Class<?> clz = classLoader.loadClass("org.cxf.Greeter");
         assertTrue("Generate " + clz.getName() + "error", clz.isInterface());
     }
 
@@ -628,7 +628,7 @@
         File handlerConfig = new File(address, "Greeter_handler.xml");
         assertTrue(handlerConfig.exists());
 
-        Class clz = classLoader.loadClass("ws.address.Greeter");
+        Class<?> clz = classLoader.loadClass("ws.address.Greeter");
         HandlerChain handlerChainAnno = AnnotationUtil.getPrivClassAnnotation(clz, HandlerChain.class);
         assertEquals("Greeter_handler.xml", handlerChainAnno.file());
         assertNotNull("Handler chain xml generate fail!", classLoader
@@ -696,7 +696,7 @@
                                       getLocation("/wsdl2java_wsdl/hello_world.wsdl")};
         WSDLToJava.main(args);
 
-        Class clz = classLoader.loadClass("org.cxf.Greeter");
+        Class<?> clz = classLoader.loadClass("org.cxf.Greeter");
         assertTrue("Generate " + clz.getName() + "error", clz.isInterface());
         clz = classLoader.loadClass("org.apache.types.GreetMe");
     }
@@ -749,7 +749,8 @@
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/helloworld-noservice.wsdl"));
         processor.setEnvironment(env);
         processor.process();
-        Class clz = classLoader.loadClass("org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl");
+        Class<?> clz = classLoader
+            .loadClass("org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl");
         Method method = clz.getMethod("getGreetings", new Class[] {java.lang.String.class});
         WebResult webResultAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);
         assertEquals("http://helloworldaxis.samples.tuscany.apache.org", webResultAnno.targetNamespace());
@@ -767,7 +768,8 @@
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/helloworld-nobinding.wsdl"));
         processor.setEnvironment(env);
         processor.process();
-        Class clz = classLoader.loadClass("org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl");
+        Class<?> clz = classLoader
+            .loadClass("org.apache.tuscany.samples.helloworldaxis.HelloWorldServiceImpl");
 
         SOAPBinding soapBindingAnno = AnnotationUtil.getPrivClassAnnotation(clz, SOAPBinding.class);
         assertNull("SOAPBinding Annotation should be null", soapBindingAnno);
@@ -803,7 +805,7 @@
         files = xsd.listFiles();
         assertEquals(4, files.length);
 
-        Class clz = classLoader
+        Class<?> clz = classLoader
             .loadClass("org.soapinterop.wsdlinteroptestdoclit.WSDLInteropTestDocLitPortType");
 
         Method method = clz.getMethod("echoVoid", new Class[] {});
@@ -828,7 +830,7 @@
         File helloWorld = new File(apache, "hello_world");
         assertTrue(helloWorld.exists());
 
-        Class clz = classLoader.loadClass("org.apache.hello_world.Greeter");
+        Class<?> clz = classLoader.loadClass("org.apache.hello_world.Greeter");
         assertEquals(3, clz.getMethods().length);
 
         Method method = clz.getMethod("pingMe", new Class[] {});
@@ -854,7 +856,7 @@
         File invoice = new File(apache, "invoice");
         assertTrue(invoice.exists());
 
-        Class clz = classLoader.loadClass("org.apache.invoiceserver.NoSuchCustomerFault");
+        Class<?> clz = classLoader.loadClass("org.apache.invoiceserver.NoSuchCustomerFault");
         WebFault webFault = AnnotationUtil.getPrivClassAnnotation(clz, WebFault.class);
         assertEquals("WebFault annotaion name attribute error", "NoSuchCustomer", webFault.name());
 
@@ -971,7 +973,7 @@
             env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/bug305773/hello_world.wsdl"));
             processor.setEnvironment(env);
             processor.process();
-            Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.GreeterImpl");
+            Class<?> clz = classLoader.loadClass("org.apache.hello_world_soap_http.GreeterImpl");
 
             WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
             assertEquals("Greeter", webServiceAnn.name());
@@ -1043,7 +1045,7 @@
         }
 
         try {
-            Class clz = classLoader
+            Class<?> clz = classLoader
                 .loadClass("org.apache.hello_world_soap_http.types.CreateProcess$MyProcess");
             assertNotNull("Customization binding code should be generated", clz);
         } catch (ClassNotFoundException e) {
@@ -1064,7 +1066,7 @@
         }
 
         try {
-            Class clz = classLoader
+            Class<?> clz = classLoader
                 .loadClass("org.apache.hello_world_soap_http.types.CreateProcess$MyProcess");
             assertNotNull("Customization binding code should be generated", clz);
         } catch (ClassNotFoundException e) {
@@ -1106,7 +1108,7 @@
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/bug161/header2.wsdl"));
         processor.setEnvironment(env);
         processor.process();
-        Class clz = classLoader.loadClass("org.apache.header2.Header2Test");
+        Class<?> clz = classLoader.loadClass("org.apache.header2.Header2Test");
         Class header = classLoader.loadClass("org.apache.header2.Header");
         Method method = clz.getMethod("headerMethod", new Class[] {Holder.class, header});
      
         assertNotNull("method should be generated", method);



Mime
View raw message