cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1355503 - in /cxf/trunk: api/src/main/java/org/apache/cxf/common/util/ api/src/main/java/org/apache/cxf/interceptor/ rt/core/src/test/java/org/apache/cxf/interceptor/security/ rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynam...
Date Fri, 29 Jun 2012 18:43:06 GMT
Author: dkulp
Date: Fri Jun 29 18:43:04 2012
New Revision: 1355503

URL: http://svn.apache.org/viewvc?rev=1355503&view=rev
Log:
Fix juno warnings (may introduce indigo warnings)

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ParamReader.java
    cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/StaxOutInterceptor.java
    cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptorTest.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarServiceContractResolver.java
    cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/AnnotationUtil.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/JarResource.java Fri Jun 29 18:43:04
2012
@@ -56,6 +56,7 @@ public final class JarResource {
                 }
                 jarContents.add(ze.getName());
             }
+            zf.close();
         } catch (NullPointerException e) {
             System.out.println("done.");
         } catch (ZipException ze) {

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ParamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ParamReader.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ParamReader.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ParamReader.java Fri Jun 29 18:43:04
2012
@@ -132,8 +132,13 @@ public class ParamReader extends ClassRe
         try {
             // get a parameter reader
             ParamReader pr = new ParamReader(c);
+            
             // get the parameter names
-            return pr.getParameterNames(method);
+            try {
+                return pr.getParameterNames(method);
+            } finally {
+                pr.close();
+            }
         } catch (IOException e) {
             // log it and leave
             // log.info(Messages.getMessage("error00") + ":" + e);

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/StaxOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/StaxOutInterceptor.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/StaxOutInterceptor.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/StaxOutInterceptor.java Fri Jun
29 18:43:04 2012
@@ -59,6 +59,7 @@ public class StaxOutInterceptor extends 
         addAfter(AttachmentOutInterceptor.class.getName());
     }
 
+    @SuppressWarnings("resource")
     public void handleMessage(Message message) {
         OutputStream os = message.getContent(OutputStream.class);
         XMLStreamWriter xwriter = message.getContent(XMLStreamWriter.class);

Modified: cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptorTest.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptorTest.java
(original)
+++ cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptorTest.java
Fri Jun 29 18:43:04 2012
@@ -95,14 +95,12 @@ public class SecureAnnotationsIntercepto
     }
     
     private static class TestService {
-        @SuppressWarnings("unused")
         @SecureRolesAllowed("testRole")
         public void echo() {
         }
     }
     
     private static class TestService2 {
-        @SuppressWarnings("unused")
         @SecureRolesAllowed("baz")
         public void echo() {
         }

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
Fri Jun 29 18:43:04 2012
@@ -629,7 +629,8 @@ public class DynamicClientFactory {
                     classPath.append(File.pathSeparator);
                 }
             }
-        }         
+        }
+        jar.close();
     }
 
     static void setupClasspath(StringBuilder classPath, ClassLoader classLoader)

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestPreprocessorTest.java
Fri Jun 29 18:43:04 2012
@@ -146,7 +146,6 @@ public class RequestPreprocessorTest ext
         //suppress the unused get method warning in eclipse.   The class is private
         //so nothing really calls the "get" method, but this is needed for the
         //test case
-        @SuppressWarnings("unused") 
         @GET
         public String get() {
             return "test";

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ChunkedUtil.java
Fri Jun 29 18:43:04 2012
@@ -83,6 +83,7 @@ final class ChunkedUtil {
     ) {
         InputStream in = null;
         try {
+            @SuppressWarnings("resource")
             PushbackInputStream pin = 
                 new PushbackInputStream(connection.getInputStream());
             int c = pin.read();

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarServiceContractResolver.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarServiceContractResolver.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarServiceContractResolver.java
(original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/resolver/JarServiceContractResolver.java
Fri Jun 29 18:43:04 2012
@@ -59,6 +59,7 @@ public class JarServiceContractResolver 
             JarFile jar = new JarFile(new File(jarURL.toURI()));
             JarEntry jarEntry = jar.getJarEntry(path.toString());
             uri = new URI("jar:" + jarURL + "!/" + jarEntry.toString());
+            jar.close();
             return uri;
         } catch (IOException e1) {
             e1.printStackTrace();

Modified: cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/ServerLauncher.java Fri
Jun 29 18:43:04 2012
@@ -412,6 +412,7 @@ public class ServerLauncher {
         }
         
         if (loader instanceof URLClassLoader) {
+            @SuppressWarnings("resource")
             URLClassLoader urlloader = (URLClassLoader)loader; 
             for (URL url : urlloader.getURLs()) {
                 classpath.append(File.pathSeparatorChar);

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/ProcessorTestBase.java
Fri Jun 29 18:43:04 2012
@@ -82,6 +82,7 @@ public class ProcessorTestBase extends A
         ClassLoader loader = getClass().getClassLoader();
         StringBuilder classPath = new StringBuilder();
         if (loader instanceof URLClassLoader) {
+            @SuppressWarnings("resource")
             URLClassLoader urlLoader = (URLClassLoader)loader;
             for (URL url : urlLoader.getURLs()) {
                 File file;
@@ -114,6 +115,7 @@ public class ProcessorTestBase extends A
                             }
                         }
                     }
+                    jar.close();
                 }
             }
         }

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/AnnotationUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/AnnotationUtil.java?rev=1355503&r1=1355502&r2=1355503&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/AnnotationUtil.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/AnnotationUtil.java Fri
Jun 29 18:43:04 2012
@@ -76,6 +76,7 @@ public final class AnnotationUtil {
     public static synchronized Class<?> loadClass(String className, ClassLoader parent)
{
         Class<?> clazz = null;
         URL[] urls = URIParserUtil.pathToURLs(getClassPath());
+        @SuppressWarnings("resource")
         URLClassLoader classLoader = new URLClassLoader(urls, parent);
         try {
             clazz = classLoader.loadClass(className);
@@ -90,6 +91,7 @@ public final class AnnotationUtil {
         ClassLoader loader = AnnotationUtil.class.getClassLoader();
         StringBuilder classpath = new StringBuilder(System.getProperty("java.class.path"));
         if (loader instanceof URLClassLoader) {
+            @SuppressWarnings("resource")
             URLClassLoader urlloader = (URLClassLoader)loader;
             for (URL url : urlloader.getURLs()) {
                 classpath.append(File.pathSeparatorChar);



Mime
View raw message