[ASTERIXDB-1564][CONF] Consistently Use Log4j2
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Replace java.util.logging by Log4j2.
- Excluded classes due to their tests:
- IoUtil
- Tracer
Change-Id: Ic137571292f45de1f1994c61d328b97185012197
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2226
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
index d894d9b..7472aa8 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/pom.xml
@@ -179,5 +179,9 @@
<artifactId>hyracks-util</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/comm/SerializationDeserializationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/comm/SerializationDeserializationTest.java
index 8696f8b..7a675bc 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/comm/SerializationDeserializationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/comm/SerializationDeserializationTest.java
@@ -24,8 +24,6 @@
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.hyracks.api.comm.IFrame;
import org.apache.hyracks.api.comm.IFrameReader;
@@ -44,10 +42,12 @@
import org.apache.hyracks.dataflow.common.data.marshalling.IntegerSerializerDeserializer;
import org.apache.hyracks.dataflow.common.data.marshalling.UTF8StringSerializerDeserializer;
import org.apache.hyracks.test.support.TestUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.Test;
public class SerializationDeserializationTest {
- private static final Logger LOGGER = Logger.getLogger(SerializationDeserializationTest.class.getName());
+ private static final Logger LOGGER = LogManager.getLogger();
private static final String DBLP_FILE = "data" + File.separator + "device1" + File.separator + "data"
+ File.separator + "dblp.txt";
@@ -139,7 +139,7 @@
reader.open();
Object[] arr;
while ((arr = reader.readData()) != null) {
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info(arr[0] + " " + arr[1]);
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
index 82fd737..ae27ac9 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractIntegrationTest.java
@@ -30,8 +30,6 @@
import java.util.EnumSet;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.apache.hyracks.api.client.HyracksConnection;
@@ -55,12 +53,14 @@
import org.apache.hyracks.control.nc.resources.memory.FrameManager;
import org.apache.hyracks.dataflow.common.comm.io.ResultFrameTupleAccessor;
import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
public abstract class AbstractIntegrationTest {
- private static final Logger LOGGER = Logger.getLogger(AbstractIntegrationTest.class.getName());
+ private static final Logger LOGGER = LogManager.getLogger();
public static final String NC1_ID = "nc1";
public static final String NC2_ID = "nc2";
@@ -121,7 +121,7 @@
nc2.start();
hcc = new HyracksConnection(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort());
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info("Starting CC in " + ccRoot.getAbsolutePath());
}
}
@@ -134,11 +134,11 @@
}
protected JobId executeTest(JobSpecification spec) throws Exception {
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info(spec.toJSON().asText());
}
JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info(jobId.toString());
}
return jobId;
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
index cc46a7d..a455cc9 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/AbstractMultiNCIntegrationTest.java
@@ -23,8 +23,6 @@
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.apache.hyracks.api.client.HyracksConnection;
@@ -50,6 +48,8 @@
import org.apache.hyracks.control.nc.resources.memory.FrameManager;
import org.apache.hyracks.dataflow.common.comm.io.ResultFrameTupleAccessor;
import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -58,7 +58,7 @@
public abstract class AbstractMultiNCIntegrationTest {
- private static final Logger LOGGER = Logger.getLogger(AbstractMultiNCIntegrationTest.class.getName());
+ private static final Logger LOGGER = LogManager.getLogger();
private static final TestJobLifecycleListener jobLifecycleListener = new TestJobLifecycleListener();
public static final String[] ASTERIX_IDS =
@@ -113,7 +113,7 @@
}
hcc = new HyracksConnection(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort());
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info("Starting CC in " + ccRoot.getAbsolutePath());
}
}
@@ -144,11 +144,11 @@
}
protected void runTest(JobSpecification spec, String expectedErrorMessage) throws Exception {
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info(spec.toJSON().asText());
}
JobId jobId = hcc.startJob(spec, EnumSet.of(JobFlag.PROFILE_RUNTIME));
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info(jobId.toString());
}
@@ -218,7 +218,7 @@
}
private void dumpOutputFiles() {
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
for (File f : outputFiles) {
if (f.exists() && f.isFile()) {
try {
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/DeployedJobSpecsTest.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/DeployedJobSpecsTest.java
index dd4fdd1..553c5b5 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/DeployedJobSpecsTest.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/DeployedJobSpecsTest.java
@@ -25,8 +25,6 @@
import java.io.File;
import java.lang.reflect.Field;
import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.apache.hyracks.api.client.HyracksConnection;
@@ -40,6 +38,8 @@
import org.apache.hyracks.control.common.controllers.CCConfig;
import org.apache.hyracks.control.common.controllers.NCConfig;
import org.apache.hyracks.control.nc.NodeControllerService;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
@@ -47,7 +47,7 @@
import org.mockito.Mockito;
public class DeployedJobSpecsTest {
- private static final Logger LOGGER = Logger.getLogger(DeployedJobSpecsTest.class.getName());
+ private static final Logger LOGGER = LogManager.getLogger();
private static final String NC1_ID = "nc1";
private static final String NC2_ID = "nc2";
@@ -111,7 +111,7 @@
nc2.start();
hcc = new HyracksConnection(ccConfig.getClientListenAddress(), ccConfig.getClientListenPort());
- if (LOGGER.isLoggable(Level.INFO)) {
+ if (LOGGER.isInfoEnabled()) {
LOGGER.info("Starting CC in " + ccRoot.getAbsolutePath());
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestJobLifecycleListener.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestJobLifecycleListener.java
index c8d0b9c..008be29 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestJobLifecycleListener.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/TestJobLifecycleListener.java
@@ -24,18 +24,19 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.hyracks.api.exceptions.HyracksException;
import org.apache.hyracks.api.job.IJobLifecycleListener;
import org.apache.hyracks.api.job.JobId;
import org.apache.hyracks.api.job.JobSpecification;
import org.apache.hyracks.api.job.JobStatus;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class TestJobLifecycleListener implements IJobLifecycleListener {
- private static final Logger LOGGER = Logger.getLogger(TestJobLifecycleListener.class.getName());
+ private static final Logger LOGGER = LogManager.getLogger();
private final Map<JobId, JobSpecification> created = new HashMap<>();
private final Set<JobId> started = new HashSet<>();
private final Set<JobId> finished = new HashSet<>();
@@ -48,7 +49,7 @@
@Override
public void notifyJobCreation(JobId jobId, JobSpecification spec) throws HyracksException {
if (created.containsKey(jobId)) {
- LOGGER.log(Level.WARNING, "Job " + jobId + "has been created before");
+ LOGGER.log(Level.WARN, "Job " + jobId + "has been created before");
increment(doubleCreated, jobId);
}
created.put(jobId, spec);
@@ -63,11 +64,11 @@
@Override
public void notifyJobStart(JobId jobId) throws HyracksException {
if (!created.containsKey(jobId)) {
- LOGGER.log(Level.WARNING, "Job " + jobId + "has not been created");
+ LOGGER.log(Level.WARN, "Job " + jobId + "has not been created");
startWithoutCreate.add(jobId);
}
if (started.contains(jobId)) {
- LOGGER.log(Level.WARNING, "Job " + jobId + "has been started before");
+ LOGGER.log(Level.WARN, "Job " + jobId + "has been started before");
increment(doubleStarted, jobId);
}
started.add(jobId);
@@ -76,43 +77,43 @@
@Override
public void notifyJobFinish(JobId jobId, JobStatus jobStatus, List<Exception> exceptions) throws HyracksException {
if (!started.contains(jobId)) {
- LOGGER.log(Level.WARNING, "Job " + jobId + "has not been started");
+ LOGGER.log(Level.WARN, "Job " + jobId + "has not been started");
finishWithoutStart.add(jobId);
}
if (finished.contains(jobId)) {
// TODO: job finish should be called once only when it has really completed
// throw new HyracksDataException("Job " + jobId + "has been finished before");
- LOGGER.log(Level.WARNING, "Dangerous: Duplicate Job: " + jobId + " has finished with status: " + jobStatus);
+ LOGGER.log(Level.WARN, "Dangerous: Duplicate Job: " + jobId + " has finished with status: " + jobStatus);
increment(doubleFinished, jobId);
}
finished.add(jobId);
}
public void check() throws Exception {
- LOGGER.log(Level.WARNING, "Checking all created jobs have started");
+ LOGGER.log(Level.WARN, "Checking all created jobs have started");
for (JobId jobId : created.keySet()) {
if (!started.contains(jobId)) {
- LOGGER.log(Level.WARNING, "JobId " + jobId + " has been created but never started");
+ LOGGER.log(Level.WARN, "JobId " + jobId + " has been created but never started");
}
}
- LOGGER.log(Level.WARNING, "Checking all started jobs have terminated");
+ LOGGER.log(Level.WARN, "Checking all started jobs have terminated");
for (JobId jobId : started) {
if (!finished.contains(jobId)) {
- LOGGER.log(Level.WARNING, "JobId " + jobId + " has started but not finished");
+ LOGGER.log(Level.WARN, "JobId " + jobId + " has started but not finished");
}
}
- LOGGER.log(Level.WARNING, "Checking multiple creates");
+ LOGGER.log(Level.WARN, "Checking multiple creates");
for (Entry<JobId, Integer> entry : doubleCreated.entrySet()) {
- LOGGER.log(Level.WARNING, "job " + entry.getKey() + " has been created " + entry.getValue() + " times");
+ LOGGER.log(Level.WARN, "job " + entry.getKey() + " has been created " + entry.getValue() + " times");
}
- LOGGER.log(Level.WARNING, "Checking multiple starts");
+ LOGGER.log(Level.WARN, "Checking multiple starts");
for (Entry<JobId, Integer> entry : doubleStarted.entrySet()) {
- LOGGER.log(Level.WARNING, "job " + entry.getKey() + " has been started " + entry.getValue() + " times");
+ LOGGER.log(Level.WARN, "job " + entry.getKey() + " has been started " + entry.getValue() + " times");
}
- LOGGER.log(Level.WARNING, "Checking multiple finishes");
+ LOGGER.log(Level.WARN, "Checking multiple finishes");
for (Entry<JobId, Integer> entry : doubleFinished.entrySet()) {
- LOGGER.log(Level.WARNING, "job " + entry.getKey() + " has been finished " + entry.getValue() + " times");
+ LOGGER.log(Level.WARN, "job " + entry.getKey() + " has been finished " + entry.getValue() + " times");
}
- LOGGER.log(Level.WARNING, "Done checking!");
+ LOGGER.log(Level.WARN, "Done checking!");
}
}
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/WaitingOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/WaitingOperatorDescriptor.java
index 6503b7b..799520c 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/WaitingOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/integration/WaitingOperatorDescriptor.java
@@ -18,8 +18,6 @@
*/
package org.apache.hyracks.tests.integration;
-import java.util.logging.Logger;
-
import org.apache.commons.lang3.mutable.MutableBoolean;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -35,7 +33,6 @@
public static final MutableBoolean CONTINUE_RUNNING = new MutableBoolean(false);
private static final long serialVersionUID = 1L;
- private static Logger LOGGER = Logger.getLogger(WaitingOperatorDescriptor.class.getName());
public WaitingOperatorDescriptor(IOperatorDescriptorRegistry spec, int inputArity, int outputArity) {
super(spec, inputArity, outputArity);
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/ExceptionOnCreatePushRuntimeOperatorDescriptor.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/ExceptionOnCreatePushRuntimeOperatorDescriptor.java
index d704671..10d6947 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/ExceptionOnCreatePushRuntimeOperatorDescriptor.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-integration-tests/src/test/java/org/apache/hyracks/tests/util/ExceptionOnCreatePushRuntimeOperatorDescriptor.java
@@ -20,8 +20,6 @@
import java.nio.ByteBuffer;
import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.context.IHyracksTaskContext;
@@ -31,10 +29,13 @@
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.job.IOperatorDescriptorRegistry;
import org.apache.hyracks.dataflow.std.base.AbstractSingleActivityOperatorDescriptor;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class ExceptionOnCreatePushRuntimeOperatorDescriptor extends AbstractSingleActivityOperatorDescriptor {
private static final long serialVersionUID = 1L;
- private static Logger LOGGER = Logger.getLogger(ExceptionOnCreatePushRuntimeOperatorDescriptor.class.getName());
+ private static Logger LOGGER = LogManager.getLogger();
private static AtomicInteger createPushRuntime = new AtomicInteger();
private static AtomicInteger initializeCounter = new AtomicInteger();
private static AtomicInteger openCloseCounter = new AtomicInteger();
@@ -130,10 +131,10 @@
public static boolean succeed() {
boolean success = openCloseCounter.get() == 0 && createPushRuntime.get() == 0 && initializeCounter.get() == 0;
if (!success) {
- LOGGER.log(Level.SEVERE, "Failure:");
- LOGGER.log(Level.SEVERE, "CreatePushRuntime:" + createPushRuntime.get());
- LOGGER.log(Level.SEVERE, "InitializeCounter:" + initializeCounter.get());
- LOGGER.log(Level.SEVERE, "OpenCloseCounter:" + openCloseCounter.get());
+ LOGGER.log(Level.ERROR, "Failure:");
+ LOGGER.log(Level.ERROR, "CreatePushRuntime:" + createPushRuntime.get());
+ LOGGER.log(Level.ERROR, "InitializeCounter:" + initializeCounter.get());
+ LOGGER.log(Level.ERROR, "OpenCloseCounter:" + openCloseCounter.get());
}
return success;
}
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/pom.xml b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/pom.xml
index 478650f..1514c8e 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/pom.xml
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/pom.xml
@@ -209,5 +209,9 @@
<artifactId>hyracks-control-cc</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/src/test/java/org/apache/hyracks/examples/shutdown/test/ClusterShutdownIT.java b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/src/test/java/org/apache/hyracks/examples/shutdown/test/ClusterShutdownIT.java
index c1083c9f..6f4d8b1 100644
--- a/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/src/test/java/org/apache/hyracks/examples/shutdown/test/ClusterShutdownIT.java
+++ b/hyracks-fullstack/hyracks/hyracks-examples/hyracks-shutdown-test/src/test/java/org/apache/hyracks/examples/shutdown/test/ClusterShutdownIT.java
@@ -19,8 +19,9 @@
package org.apache.hyracks.examples.shutdown.test;
import java.net.ServerSocket;
-import java.util.logging.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -30,7 +31,7 @@
import org.apache.hyracks.ipc.exceptions.IPCException;
public class ClusterShutdownIT {
- private static Logger LOGGER = Logger.getLogger(ClusterShutdownIT.class.getName());
+ private static Logger LOGGER = LogManager.getLogger();
@Rule
public ExpectedException closeTwice = ExpectedException.none();
@Test
@@ -49,7 +50,7 @@
s = new ServerSocket(1099);
//and we should be able to bind to this too
} catch (Exception e) {
- LOGGER.severe(e.getMessage());
+ LOGGER.error(e.getMessage());
throw e;
} finally {
s.close();