Repository: cxf Updated Branches: refs/heads/3.1.x-fixes cbe9047c6 -> 4aabd534a
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/0f3ed098 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0f3ed098 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0f3ed098 Branch: refs/heads/3.1.x-fixes Commit: 0f3ed09830186184d9cc4d32fffbc9e5cfe052a8 Parents: cbe9047 Author: Colm O hEigeartaigh <[email protected]> Authored: Tue Dec 6 11:50:21 2016 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Tue Dec 6 14:11:29 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/0f3ed098/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/0f3ed098/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/0f3ed098/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/0f3ed098/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/0f3ed098/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; + } } }
