diff options
author | Mykola Nikishov | 2017-09-02 19:17:54 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-26 21:41:17 +0000 |
commit | e29cedc7d70ffeae4801a9de0a29fb90b5de8a74 (patch) | |
tree | de6866e1a7f34b8408dfabef2a75e00f17d54fa8 | |
parent | 8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2 (diff) | |
download | rt.equinox.p2-e29cedc7d70ffeae4801a9de0a29fb90b5de8a74.tar.gz rt.equinox.p2-e29cedc7d70ffeae4801a9de0a29fb90b5de8a74.tar.xz rt.equinox.p2-e29cedc7d70ffeae4801a9de0a29fb90b5de8a74.zip |
Reuse existing ctorI20180128-2000I20180127-1500I20180127-0150I20180126-2040
Signed-off-by: Mykola Nikishov <mn@mn.com.ua>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java index bc632fc1f..ac07b1158 100644 --- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java +++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java @@ -197,7 +197,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor { private boolean includeLaunchers = true; private String licenseURL; private String licenseText = null; - private String currentOS; + private final String currentOS; private final List<IRepositoryReference> repositories = new ArrayList<>(); private static String normalize(String text) { @@ -222,7 +222,6 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor { } public ProductFile(String location, String os) throws CoreException { - super(); this.currentOS = os; this.location = new File(location); try { @@ -253,18 +252,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor { * Constructs a product file parser. */ public ProductFile(String location) throws Exception { - super(); - this.location = new File(location); - - parserFactory.setNamespaceAware(true); - parser = parserFactory.newSAXParser(); - InputStream in = new BufferedInputStream(new FileInputStream(location)); - try { - parser.parse(new InputSource(in), this); - } finally { - in.close(); - } - parser = null; + this(location, null); } /** |