Merge pull request #1101 from DataDog/resource-leak

Fixing resource leak
This commit is contained in:
Douglas Q Hawkins 2019-11-18 14:25:06 -05:00 committed by GitHub
commit 28776d9d1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -350,7 +350,6 @@ public class Agent {
// nothing to do with JDK but this should be safe because only thing this does is to delay
// tracer install
final String jfrClassResourceName = "jdk.jfr.Recording".replace('.', '/') + ".class";
return Thread.currentThread().getContextClassLoader().getResourceAsStream(jfrClassResourceName)
!= null;
return Thread.currentThread().getContextClassLoader().getResource(jfrClassResourceName) != null;
}
}