Skip to content

Commit

Permalink
Merge pull request #455 from dmlloyd/logmgr-334
Browse files Browse the repository at this point in the history
[LOGMGR-344] Fix signature of `invokeExact` sigpoly call
  • Loading branch information
jamezp authored Dec 20, 2023
2 parents df2b5e3 + 02ddd2d commit b2a00b5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jboss/logmanager/ExtLogRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public long getLongThreadID() {
void superSetLongThreadID(final long id) {
if (superSetLongThreadID != null) {
try {
superSetLongThreadID.invokeExact(this, id);
LogRecord ignored = (LogRecord) superSetLongThreadID.invokeExact(this, id);
} catch (RuntimeException | Error e) {
throw e;
} catch (Throwable e) {
Expand Down
16 changes: 16 additions & 0 deletions src/test/java/org/jboss/logmanager/ExtLogRecordTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package org.jboss.logmanager;

import org.junit.jupiter.api.Test;

/**
*
*/
public final class ExtLogRecordTests {

@Test
public void checkForLongThreadIdRegression() {
ExtLogRecord rec = new ExtLogRecord(Level.INFO, "Hello world!", ExtLogRecordTests.class.getName());
// expect this to not blow up on 11 or 17
rec.setLongThreadID(1234);
}
}

0 comments on commit b2a00b5

Please sign in to comment.