Skip to content

Commit

Permalink
Unngår at instrumentation reinitialiseres.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Jun 19, 2024
1 parent 45141d9 commit a22f5a6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ public static void agentmain(String arguments, Instrumentation instrumentation)
* @param instrumentation The instrumentation instance.
*/
@SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not interrupt agent attachment.")
private static void doMain(Instrumentation instrumentation) {
private static synchronized void doMain(Instrumentation instrumentation) {
if (Installer.instrumentation != null) {
return;
}
Installer.instrumentation = instrumentation;
try {
if (!Installer.class.getName().equals(NAME)) {
Expand Down

0 comments on commit a22f5a6

Please sign in to comment.