ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hi...@apache.org
Subject svn commit: r1368711 - /ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java
Date Thu, 02 Aug 2012 21:28:49 GMT
Author: hibou
Date: Thu Aug  2 21:28:48 2012
New Revision: 1368711

URL: http://svn.apache.org/viewvc?rev=1368711&view=rev
Log:
Do not use useful Ant class, juste bare metal java

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java?rev=1368711&r1=1368710&r2=1368711&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/core/ManifestParser.java Thu Aug  2 21:28:48
2012
@@ -17,11 +17,11 @@
  */
 package org.apache.ivy.osgi.core;
 
+import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.StringReader;
 import java.text.ParseException;
 import java.util.Iterator;
 import java.util.List;
@@ -31,7 +31,6 @@ import java.util.jar.Manifest;
 
 import org.apache.ivy.osgi.util.Version;
 import org.apache.ivy.osgi.util.VersionRange;
-import org.apache.tools.ant.util.ReaderInputStream;
 
 /**
  * Provides an OSGi manifest parser.
@@ -87,9 +86,9 @@ public class ManifestParser {
     }
 
     public static BundleInfo parseManifest(String manifest) throws IOException, ParseException
{
-        final ReaderInputStream ris = new ReaderInputStream(new StringReader(manifest));
-        final BundleInfo parseManifest = parseManifest(ris);
-        ris.close();
+        final ByteArrayInputStream bais = new ByteArrayInputStream(manifest.getBytes("UTF-8"));
+        final BundleInfo parseManifest = parseManifest(bais);
+        bais.close();
         return parseManifest;
     }
 



Mime
View raw message