aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-02-25 08:54:32 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2014-02-25 08:54:32 +0100
commita0531faf6ec1dc1f468fd220b009e9dc6db1d7aa (patch)
treecf0b866014b904885f53abec9fecc59dbdb155f3
parent74ae8557f7fc6dcf403da59696f6c00481c4005e (diff)
downloadgwtquery-a0531faf6ec1dc1f468fd220b009e9dc6db1d7aa.tar.gz
gwtquery-a0531faf6ec1dc1f468fd220b009e9dc6db1d7aa.zip
In java we should use unix separator always. Fixes issue #271
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsniBundleGenerator.java6
1 files 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);