Skip to content

Commit

Permalink
Fix issue #1547
Browse files Browse the repository at this point in the history
Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin authored and lukasj committed May 26, 2021
1 parent 6a529f4 commit e2f282c
Showing 1 changed file with 5 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0, which is available at
Expand Down Expand Up @@ -28,6 +28,9 @@ private StackHelper() {} // no instanciation
*/
static String getCallerClassName() {
StackTraceElement[] trace = new Exception().getStackTrace();
return trace[2].getClassName();
if (2 < trace.length) {
return trace[2].getClassName();
}
return "org.glassfish.jaxb.core"; // use the default
}
}

0 comments on commit e2f282c

Please sign in to comment.