cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf-fediz git commit: Removing FileInputStream
Date Mon, 24 Apr 2017 11:23:31 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 1e7a29358 -> 5af780362


Removing FileInputStream


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

Branch: refs/heads/master
Commit: 5af78036284a5615d6fb6580af6841eb72130c41
Parents: 1e7a293
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Apr 24 12:23:23 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Apr 24 12:23:23 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/fediz/core/config/FedizConfigurator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/5af78036/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizConfigurator.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizConfigurator.java
b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizConfigurator.java
index 00f8129..e4a61c1 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizConfigurator.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/config/FedizConfigurator.java
@@ -20,11 +20,11 @@
 package org.apache.cxf.fediz.core.config;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
 import java.io.Writer;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -43,7 +43,7 @@ public class FedizConfigurator {
     private List<FedizContext> fedizContextList;
 
     public FedizConfig loadConfig(File f) throws JAXBException, IOException {
-        try (InputStream input = new FileInputStream(f)) {
+        try (InputStream input = Files.newInputStream(f.toPath())) {
             rootConfig = (FedizConfig) getJaxbContext().createUnmarshaller().unmarshal(input);
         }
         parseFedizContextList();


Mime
View raw message