Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2012-08-29 18:25:20 +0000
committerIan Bull2012-08-29 18:25:20 +0000
commitdf9a9a4cf68dc044a42ce298beefe32c151525e1 (patch)
tree62303698553b43b12c5e5d84d237fdc5d91b7ef1 /bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository
parent959c4dab9762c898467cac808cd5fe35362cb07c (diff)
downloadrt.equinox.p2-df9a9a4cf68dc044a42ce298beefe32c151525e1.tar.gz
rt.equinox.p2-df9a9a4cf68dc044a42ce298beefe32c151525e1.tar.xz
rt.equinox.p2-df9a9a4cf68dc044a42ce298beefe32c151525e1.zip
Bug 381673: Fixes a few compile warningsv20120829-182520
This fixes 2 types of compile warnings. 1. Stream not closed warnings. 2. Unused object warnings
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index 87cf474b5..c1cddeeeb 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -456,9 +456,8 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
jarFile.getParentFile().mkdirs();
jarFile.createNewFile();
}
- JarOutputStream jOs = new JarOutputStream(new FileOutputStream(jarFile));
- jOs.putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
- os = jOs;
+ os = new JarOutputStream(new FileOutputStream(jarFile));
+ ((JarOutputStream) os).putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
}
super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()));
new CompositeRepositoryIO().write(toState(), os, PI_REPOSITORY_TYPE);
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 1f036394b..f72ae6847 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -1238,9 +1238,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
mkdirs(jarFile.getParentFile());
jarFile.createNewFile();
}
- JarOutputStream jOs = new JarOutputStream(new FileOutputStream(jarFile));
- jOs.putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
- os = jOs;
+ os = new JarOutputStream(new FileOutputStream(jarFile));
+ ((JarOutputStream) os).putNextEntry(new JarEntry(new Path(artifactsFile.getAbsolutePath()).lastSegment()));
}
super.setProperty(IRepository.PROP_TIMESTAMP, Long.toString(System.currentTimeMillis()), new NullProgressMonitor());
new SimpleArtifactRepositoryIO(getProvisioningAgent()).write(this, os);

Back to the top