Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
Useless imports and try-with-resources.
  • Loading branch information
laeubi authored and akurtakov committed May 30, 2024
1 parent 9068c47 commit 5c657a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2011 Sonatype Inc. and others.
* Copyright (c) 2008, 2024 Sonatype Inc. and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -44,12 +44,9 @@ public void testDeployableFeature() throws Exception {

XMLParser parser = new XMLParser();
Document document = null;
ZipFile contentJar = new ZipFile(content);
try {
try (ZipFile contentJar = new ZipFile(content)) {
ZipEntry contentXmlEntry = contentJar.getEntry("content.xml");
document = parser.parse(new XMLIOSource(contentJar.getInputStream(contentXmlEntry)));
} finally {
contentJar.close();
}
Element repository = document.getRootElement();
all_units: for (Element unit : repository.getChild("units").getChildren("unit")) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2011, 2021 SAP AG and others.
* Copyright (c) 2011, 2024 SAP AG and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand All @@ -22,7 +22,6 @@
import java.util.List;
import java.util.Properties;

import org.bouncycastle.jcajce.provider.drbg.DRBG.Default;
import org.eclipse.tycho.IArtifactFacade;
import org.eclipse.tycho.MavenArtifactRepositoryReference;
import org.osgi.resource.Requirement;
Expand Down

0 comments on commit 5c657a3

Please sign in to comment.