Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2015-06-03 23:56:10 -0400
committerFlorian Waibel2015-06-03 23:56:10 -0400
commit3faf4f42c9b6a568cf7ace2ce5b2565c8f0473fb (patch)
tree3e7bcd7e4469fac0b2216c71682d7b4a50852b8f
parent31b08a89ee1ef82f2cacc093af51873a765f2638 (diff)
downloadorg.eclipse.virgo.kernel-3faf4f42c9b6a568cf7ace2ce5b2565c8f0473fb.tar.gz
org.eclipse.virgo.kernel-3faf4f42c9b6a568cf7ace2ce5b2565c8f0473fb.tar.xz
org.eclipse.virgo.kernel-3faf4f42c9b6a568cf7ace2ce5b2565c8f0473fb.zip
Replaces code using default encoding with code using explicitly UTF-8
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
index d9d4b14d..f021d39f 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
@@ -12,6 +12,8 @@
package org.eclipse.virgo.kernel.install.artifact.internal.bundle;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -25,9 +27,6 @@ import java.util.List;
import java.util.Set;
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
-import org.eclipse.virgo.nano.core.AbortableSignal;
-import org.eclipse.virgo.nano.deployer.api.core.DeployerLogEvents;
-import org.eclipse.virgo.nano.deployer.api.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.internal.BlockingAbortableSignal;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentity;
import org.eclipse.virgo.kernel.install.artifact.ArtifactIdentityDeterminer;
@@ -40,8 +39,11 @@ import org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor;
import org.eclipse.virgo.kernel.install.artifact.internal.InstallArtifactRefreshHandler;
import org.eclipse.virgo.kernel.install.artifact.internal.scoping.ArtifactIdentityScoper;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiBundle;
-import org.eclipse.virgo.nano.serviceability.NonNull;
import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.eclipse.virgo.nano.core.AbortableSignal;
+import org.eclipse.virgo.nano.deployer.api.core.DeployerLogEvents;
+import org.eclipse.virgo.nano.deployer.api.core.DeploymentException;
+import org.eclipse.virgo.nano.serviceability.NonNull;
import org.eclipse.virgo.util.common.GraphNode;
import org.eclipse.virgo.util.io.FileCopyUtils;
import org.eclipse.virgo.util.io.IOUtils;
@@ -149,11 +151,8 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
private BundleManifest getManifestFromArtifactFS() throws IOException {
ArtifactFSEntry manifestEntry = this.artifactStorage.getArtifactFS().getEntry(MANIFEST_ENTRY_NAME);
if (manifestEntry != null && manifestEntry.exists()) {
- Reader manifestReader = new InputStreamReader(manifestEntry.getInputStream());
- try {
+ try (Reader manifestReader = new InputStreamReader(manifestEntry.getInputStream(), UTF_8)) {
return BundleManifestFactory.createBundleManifest(manifestReader);
- } finally {
- manifestReader.close();
}
} else {
return BundleManifestFactory.createBundleManifest();

Back to the top