cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf git commit: Finished FindBugs sweep
Date Tue, 06 Dec 2016 13:25:32 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6918eba1a -> 057b2a6d5


Finished FindBugs sweep


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/758855ef
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/758855ef
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/758855ef

Branch: refs/heads/master
Commit: 758855efa8dcd3558a084f8ac08acd92be089a52
Parents: 6918eba
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Dec 6 11:50:21 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Dec 6 11:50:21 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/jca/servant/EJBEndpoint.java |  4 ++--
 .../cxf/maven_plugin/AbstractCodegenMoho.java   |  8 ++++---
 .../javatowadl/ResourceMapJavaDocProvider.java  |  6 ++----
 .../wadlto/AbstractCodeGeneratorMojo.java       |  8 ++++---
 .../token/provider/TokenProviderResponse.java   | 22 ++++++++++++++++----
 5 files changed, 32 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/758855ef/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
----------------------------------------------------------------------
diff --git a/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java b/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
index cd17900..4a653ed 100644
--- a/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
+++ b/integration/jca/src/main/java/org/apache/cxf/jca/servant/EJBEndpoint.java
@@ -141,9 +141,9 @@ public class EJBEndpoint {
             return DEFAULT_HTTP_PORT;
         }
         if (end < index) {
-            return Integer.valueOf(address.substring(index + 1)).intValue();
+            return Integer.parseInt(address.substring(index + 1));
         } 
-        return Integer.valueOf(address.substring(index + 1, end)).intValue();
+        return Integer.parseInt(address.substring(index + 1, end));
     }
     
     private static boolean isJaxWsServiceInterface(Class<?> cls) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/758855ef/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
----------------------------------------------------------------------
diff --git a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
index 8c854e2..fe589da 100644
--- a/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
+++ b/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
@@ -467,9 +467,11 @@ public abstract class AbstractCodegenMoho extends AbstractMojo {
      */
     protected boolean deleteDir(File f) {
         if (f.isDirectory()) {
-            File files[] = f.listFiles();
-            for (int idx = 0; idx < files.length; ++idx) {
-                deleteDir(files[idx]);
+            File[] files = f.listFiles();
+            if (files != null) {
+                for (int idx = 0; idx < files.length; ++idx) {
+                    deleteDir(files[idx]);
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/758855ef/maven-plugins/java2wadl-plugin/src/main/java/org/apache/cxf/maven_plugin/javatowadl/ResourceMapJavaDocProvider.java
----------------------------------------------------------------------
diff --git a/maven-plugins/java2wadl-plugin/src/main/java/org/apache/cxf/maven_plugin/javatowadl/ResourceMapJavaDocProvider.java
b/maven-plugins/java2wadl-plugin/src/main/java/org/apache/cxf/maven_plugin/javatowadl/ResourceMapJavaDocProvider.java
index fcd29b7..f5fcb12 100644
--- a/maven-plugins/java2wadl-plugin/src/main/java/org/apache/cxf/maven_plugin/javatowadl/ResourceMapJavaDocProvider.java
+++ b/maven-plugins/java2wadl-plugin/src/main/java/org/apache/cxf/maven_plugin/javatowadl/ResourceMapJavaDocProvider.java
@@ -37,11 +37,9 @@ public class ResourceMapJavaDocProvider implements DocumentationProvider
{
     private Properties dumpedDocFile;
     
     public ResourceMapJavaDocProvider(String targetFolder) {
-        try {
-            dumpedDocFile = new Properties();
-            FileInputStream fis = new FileInputStream(targetFolder + "/site/apidocs/dumpFile.properties");
+        dumpedDocFile = new Properties();
+        try (FileInputStream fis = new FileInputStream(targetFolder + "/site/apidocs/dumpFile.properties"))
{
             dumpedDocFile.load(fis);
-            fis.close();
         } catch (Exception e) {
             LOG.warning("can't load dumped Docomentation file" + e.getMessage());
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/758855ef/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/AbstractCodeGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/AbstractCodeGeneratorMojo.java
b/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/AbstractCodeGeneratorMojo.java
index 22dd57a..9f5aed5 100644
--- a/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/AbstractCodeGeneratorMojo.java
+++ b/maven-plugins/wadl2java-plugin/src/main/java/org/apache/cxf/maven_plugin/wadlto/AbstractCodeGeneratorMojo.java
@@ -591,9 +591,11 @@ public abstract class AbstractCodeGeneratorMojo extends AbstractMojo
{
      */
     protected boolean deleteDir(File f) {
         if (f.isDirectory()) {
-            File files[] = f.listFiles();
-            for (int idx = 0; idx < files.length; ++idx) {
-                deleteDir(files[idx]);
+            File[] files = f.listFiles();
+            if (files != null) {
+                for (int idx = 0; idx < files.length; ++idx) {
+                    deleteDir(files[idx]);
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/758855ef/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderResponse.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderResponse.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderResponse.java
index bf28778..b655f0f 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderResponse.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/TokenProviderResponse.java
@@ -149,7 +149,10 @@ public class TokenProviderResponse {
      * @return the Date that this Token was Created 
      */
     public Date getCreated() {
-        return created;
+        if (created != null) {
+            return new Date(created.getTime());
+        }
+        return null;
     }
 
     /**
@@ -157,7 +160,11 @@ public class TokenProviderResponse {
      * @param created the Date that this Token was Created
      */
     public void setCreated(Date created) {
-        this.created = created;
+        if (created != null) {
+            this.created = new Date(created.getTime());
+        } else {
+            this.created = null;
+        }
     }
 
     /**
@@ -165,7 +172,10 @@ public class TokenProviderResponse {
      * @return the Date that this Token expires
      */
     public Date getExpires() {
-        return expires;
+        if (expires != null) {
+            return new Date(expires.getTime());
+        }
+        return null;
     }
 
     /**
@@ -173,7 +183,11 @@ public class TokenProviderResponse {
      * @param expires the Date that this Token expires
      */
     public void setExpires(Date expires) {
-        this.expires = expires;
+        if (expires != null) {
+            this.expires = new Date(expires.getTime());
+        } else {
+            this.expires = null;
+        }
     }
 
 }


Mime
View raw message