Fixing build for JDK6
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/030c22d8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/030c22d8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/030c22d8 Branch: refs/heads/3.0.x-fixes Commit: 030c22d80f0824109eabcdab03d4145a6187246f Parents: d88d03c Author: Colm O hEigeartaigh <[email protected]> Authored: Thu Feb 19 16:00:28 2015 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Thu Feb 19 16:00:28 2015 +0000 ---------------------------------------------------------------------- .../cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java | 2 +- .../ws/security/wss4j/AbstractWSS4JStaxInterceptor.java | 2 +- .../org/apache/cxf/ws/security/wss4j/WSS4JUtils.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/030c22d8/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java index e50f6ee..b7b05a6 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor.java @@ -206,7 +206,7 @@ public abstract class AbstractWSS4JInterceptor extends WSHandler implements Soap return WSS4JUtils.loadCryptoFromPropertiesFile( message, propFilename, this.getClass(), classLoader, passwordEncryptor - ); + ); } } http://git-wip-us.apache.org/repos/asf/cxf/blob/030c22d8/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java index 07954f5..583de26 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/AbstractWSS4JStaxInterceptor.java @@ -388,7 +388,7 @@ public abstract class AbstractWSS4JStaxInterceptor implements SoapInterceptor, return WSS4JUtils.loadCryptoFromPropertiesFile( soapMessage, propFilename, this.getClass(), getClassLoader(), passwordEncryptor - ); + ); } protected PasswordEncryptor getPasswordEncryptor( http://git-wip-us.apache.org/repos/asf/cxf/blob/030c22d8/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java index 0e891e6..d872a47 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java @@ -282,9 +282,9 @@ public final class WSS4JUtils { } else if (propsURL != null) { try { properties = new Properties(); - try (InputStream ins = propsURL.openStream()) { - properties.load(ins); - } + InputStream ins = propsURL.openStream(); + properties.load(ins); + ins.close(); } catch (IOException e) { properties = null; } @@ -339,9 +339,9 @@ public final class WSS4JUtils { URL url = getPropertiesFileURL(propFilename, manager, callingClass); if (url != null) { Properties props = new Properties(); - try (InputStream in = url.openStream()) { - props.load(in); - } + InputStream in = url.openStream(); + props.load(in); + in.close(); return CryptoFactory.getInstance(props, classLoader, passwordEncryptor); } } catch (Exception e) {
