Skip to content

Commit

Permalink
Test failure with java-21 on LogManagerPropertiesTest jakartaee#700
Browse files Browse the repository at this point in the history
Signed-off-by: jmehrens <[email protected]>
  • Loading branch information
jmehrens committed Jan 25, 2024
1 parent 1f24e8b commit be63572
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
7 changes: 6 additions & 1 deletion doc/release/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ Bug IDs that start with "G" can be found in the GlassFish Issue Tracker
Seven digit bug numbers are from the old Sun bug database, which is no
longer available.

CHANGES IN THE 1.6.8 RELEASE
----------------------------
The following bugs have been fixed in the 1.6.8 release.

E 700 Test failure with java-21 on LogManagerPropertiesTest


CHANGES IN THE 1.6.7 RELEASE
----------------------------
Expand All @@ -27,7 +33,6 @@ The following bugs have been fixed in the 1.6.7 release.
E 528 CompactFormatter precision and surrogate pairs
E 529 CompactFormatter support for LogRecord::getLongThreadID
E 535 The final release of 1.6.6 identifies itself as 1.6.6-SNAPSHOT.
E 700 Test failure with java-21 on LogManagerPropertiesTest


CHANGES IN THE 1.6.6 RELEASE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ public ClassLoader[] run() {
* @return the result.
* @throws NullPointerException if the given action is null.
* @throws UndeclaredThrowableException if a checked exception is thrown.
* @since JavaMail 1.6.7
* @since JavaMail 1.6.8
*/
static <T> T runOrDoPrivileged(final PrivilegedAction<T> a) {
if (a == null) {
Expand All @@ -921,7 +921,7 @@ static <T> T runOrDoPrivileged(final PrivilegedAction<T> a) {
* @return the result.
* @throws UnsupportedOperationException if not allowed.
* @throws UndeclaredThrowableException if a checked exception is thrown.
* @since JavaMail 1.6.7
* @since JavaMail 1.6.8
*/
@SuppressWarnings("unchecked")
private static <T> T invokeAccessController(final PrivilegedAction<T> a) {
Expand Down
26 changes: 0 additions & 26 deletions mail/src/test/java/com/sun/mail/util/logging/MailHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,6 @@ public static void tearDownClass() throws Exception {
anyClassPathDir = null;
}

private static void assumeNoJit() {
CompilationMXBean c = ManagementFactory.getCompilationMXBean();
if (c != null) { //-Xint
Assume.assumeNoException(new IllegalArgumentException(
c.getName() + " must be disabled."));
}
}

private static void fullFence() {
LogManager.getLogManager().getProperty("");
}
Expand Down Expand Up @@ -155,24 +147,6 @@ private static void setPending(final Throwable t) {
}
}

private static Field setAccessible(Field f) {
f.setAccessible(true);
try {
assumeNoJit();
if (Modifier.isFinal(f.getModifiers())) {
Field mod = Field.class.getDeclaredField("modifiers");
mod.setAccessible(true);
mod.setInt(f, f.getModifiers() & ~Modifier.FINAL);
return mod;
}
} catch (RuntimeException re) {
Assume.assumeNoException(re);
} catch (Exception e) {
Assume.assumeNoException(e);
}
throw new AssertionError();
}

private static void set(ClassLoader expect) {
if (expect == null) {
LOADER.remove();
Expand Down

0 comments on commit be63572

Please sign in to comment.