You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/04/04 18:26:09 UTC

[2/2] cxf git commit: [CXF-7303] Convert URI to a File object to determine path needed by jibx

[CXF-7303] Convert URI to a File object to determine path needed by jibx


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

Branch: refs/heads/3.1.x-fixes
Commit: b6d71af8b129aae13958e99d049873c8f726620a
Parents: b7cd855
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue Apr 4 14:24:01 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue Apr 4 14:24:01 2017 -0400

----------------------------------------------------------------------
 .../apache/cxf/jibx/tools/JibxToolingDataBinding.java   | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b6d71af8/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
index 561f2d5..8966cce 100644
--- a/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
+++ b/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
@@ -140,7 +140,17 @@ public class JibxToolingDataBinding implements DataBindingProfile {
             if (bindingFiles == null || bindingFiles.length == 0) {
                 customRoot = defaultSchemasetCustom(schemaMap);
             } else {
-                customRoot = SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
+                System.out.println();
+                String path = bindingFiles[0];
+                try {
+                    File file = new File(new java.net.URI(bindingFiles[0]));
+                    if (file.exists()) {
+                        path = file.getAbsolutePath();
+                    }
+                } catch (Throwable t) {
+                    //ignore
+                }
+                customRoot = SchemasetCustom.loadCustomizations(path, handler);
             }
             // force to retrain types information in the generated binding model
             forceTypes(customRoot);