mirror of https://github.com/apache/openjpa.git
OPENJPA-1125 committing patch from Rick Curtis. Preventing misleading enhancement message.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@783376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b961b8baa2
commit
d7a6e1a08b
|
@ -96,16 +96,17 @@ public class PCEnhancerAgent {
|
||||||
InstrumentationFactory.getInstrumentation(log);
|
InstrumentationFactory.getInstrumentation(log);
|
||||||
if (inst != null) {
|
if (inst != null) {
|
||||||
premain("", inst);
|
premain("", inst);
|
||||||
} else {
|
return true;
|
||||||
// This needs to be set in this method AND in premain because
|
}
|
||||||
// there are two different paths that we can attempt to load the
|
// If we successfully get the Instrumentation, we will call premain
|
||||||
// agent. One is when the user specifies a javaagent and the
|
// where loadAttempted will be set to true. This case is the path
|
||||||
// other is when we try to dynamically enhance.
|
// where we were unable to get Instrumentation so we need to set the
|
||||||
loadAttempted = true;
|
// loadAttempted flag to true. We do this so we will only run
|
||||||
}
|
// through this code one time.
|
||||||
|
loadAttempted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getLoadSuccessful();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void premain(String args, Instrumentation inst) {
|
public static void premain(String args, Instrumentation inst) {
|
||||||
|
|
Loading…
Reference in New Issue