Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMykola Nikishov2017-09-02 19:17:54 +0000
committerAlexander Kurtakov2018-01-26 21:41:17 +0000
commite29cedc7d70ffeae4801a9de0a29fb90b5de8a74 (patch)
treede6866e1a7f34b8408dfabef2a75e00f17d54fa8
parent8946fecc466ab4fc4827c5cec0ad9462c9d5cfd2 (diff)
downloadrt.equinox.p2-I20180128-2000.tar.gz
rt.equinox.p2-I20180128-2000.tar.xz
rt.equinox.p2-I20180128-2000.zip
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.java16
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);
}
/**

Back to the top