You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2007/03/06 14:26:59 UTC
svn commit: r515115 -
/incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
Author: rickhall
Date: Tue Mar 6 05:26:58 2007
New Revision: 515115
URL: http://svn.apache.org/viewvc?view=rev&rev=515115
Log:
Applied patch (FELIX-221) to improve handling of paths with spaces in
their name.
Modified:
incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
Modified: incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java?view=diff&rev=515115&r1=515114&r2=515115
==============================================================================
--- incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java (original)
+++ incubator/felix/trunk/ipojo.plugin/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java Tue Mar 6 05:26:58 2007
@@ -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;