From a0531faf6ec1dc1f468fd220b009e9dc6db1d7aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Tue, 25 Feb 2014 08:54:32 +0100 Subject: [PATCH] In java we should use unix separator always. Fixes issue #271 --- .../com/google/gwt/query/rebind/JsniBundleGenerator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java index 66ed45a4..4231fd2e 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java @@ -15,7 +15,6 @@ */ package com.google.gwt.query.rebind; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; @@ -94,7 +93,7 @@ public class JsniBundleGenerator extends Generator { } try { // Read the javascript content - String content = getContent(logger, packageName.replace(".", File.separator) , value); + String content = getContent(logger, packageName.replace(".", "/") , value); // Adjust javascript so as we can introduce it in a JSNI comment block without // breaking java syntax. @@ -129,8 +128,9 @@ public class JsniBundleGenerator extends Generator { InputStream in = null; try { if (!src.matches("(?i)https?://.*")) { - String file = path + File.separator + src; + String file = path + "/" + src; logger.log(TreeLogger.INFO, getClass().getSimpleName() + " - importing external javascript: " + file); + in = this.getClass().getClassLoader().getResourceAsStream(file); if (in == null) { logger.log(TreeLogger.ERROR, "Unable to read javascript file: " + file); -- 2.39.5