Skip to content

Commit

Permalink
Rebase to eclipse/master
Browse files Browse the repository at this point in the history
Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

# Conflicts:
#	appserver/tests/testcontainers/pom.xml
#	appserver/tests/testcontainers/src/test/java/org/glassfish/main/test/tc/GlassFishContainer.java
  • Loading branch information
dmatej committed Feb 20, 2024
1 parent 73bbe70 commit 5db076f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

package org.glassfish.main.admin.test.rest;

import com.sun.enterprise.util.io.FileUtils;

import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.core.MultivaluedMap;
import jakarta.ws.rs.core.Response;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
Expand All @@ -45,7 +46,6 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.TestInfo;

import static com.sun.enterprise.util.io.FileUtils.copy;
import static com.sun.enterprise.util.io.FileUtils.ensureWritableDir;
import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN;
import static org.glassfish.main.itest.tools.GlassFishTestEnvironment.getTargetDirectory;
Expand Down Expand Up @@ -95,7 +95,7 @@ public static void captureLogAndCloseClient(final TestInfo testInfo) throws Exce
ensureWritableDir(reportDir);

File reportFile = new File(reportDir, testInfo.getTestClass().orElseThrow().getName() + "-server.log");
copy(response.readEntity(InputStream.class), new FileOutputStream(reportFile), Long.MAX_VALUE);
FileUtils.copy(response.readEntity(InputStream.class), reportFile, Long.MAX_VALUE);
}
}

Expand Down
17 changes: 0 additions & 17 deletions appserver/tests/jakartaee/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public boolean isClosed() {
public void preDestroy() {
try {
close();
} catch(IOException ioe) {
_logger.log(INFO, CULoggerInfo.getString(CULoggerInfo.exceptionIO), ioe);
} catch (IOException ioe) {
_logger.log(Level.SEVERE, "Could not close the classloader " + this, ioe);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ public static String getString(String key, Object... args) {
return MessageFormat.format(getString(key), args);
}

@LogMessageInfo(
message = "Some IOException occurred",
cause = "An unexpected exception occurred.",
action = "Check the system logs and contact Oracle support.",
level = "SEVERE")
public static final String exceptionIO = LOGMSG_PREFIX + "-00031";

@LogMessageInfo(
message = "Failed to process class {0} with bytecode preprocessor {1}",
cause = "Unknown",
Expand Down

0 comments on commit 5db076f

Please sign in to comment.