Applied patch (FELIX-221) to improve handling of paths with spaces in
their name.
git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@515115 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java b/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
index c277195..0b7c4bc 100644
--- a/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
+++ b/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
@@ -84,7 +84,6 @@
InputStream is1 = url.openStream();
-
// First check if the class is already manipulated :
ClassReader ckReader = new ClassReader(is1);
ClassChecker ck = new ClassChecker();
@@ -109,18 +108,14 @@
cr0.accept(preprocess, false);
is2.close();
- File file = null;
try {
- file = new File(url.getFile());
-
- //file.createNewFile();
- FileOutputStream fos = new FileOutputStream(file);
+ FileOutputStream fos = new FileOutputStream(clazz);
fos.write(cw0.toByteArray());
fos.close();
- IPojoPluginConfiguration.getLogger().log(Level.INFO, "Put the file " + file.getAbsolutePath() + " in the jar file");
- } catch (Exception e) { System.err.println("Problem to write the adapted class on the file system " + " [ "+ file.getAbsolutePath() +" ] " + e.getMessage()); }
+ IPojoPluginConfiguration.getLogger().log(Level.INFO, "Put the file " + clazz.getAbsolutePath() + " in the jar file");
+ } catch (Exception e) { System.err.println("Problem to write the adapted class on the file system " + " [ "+ clazz.getAbsolutePath() +" ] " + e.getMessage()); }
}
// The file is in the bundle
return true;