Skip to main content

Please review fix for 6822008 - context manager creation

1 reply [Last post]
bkurotsu
Offline
Joined: 2004-12-13
Points: 0

Please review fix for:
6822008 ContextManager should not be created twice during ExecTool. execution

https://jtharness.dev.java.net/source/browse/jtharness?view=rev&rev=1573

Added special case so that the default context manager is not confused with a
custom one. The custom one will be not be recreated, yet a custom one should
override a default one when the exec tool is being reinitialized (reused).

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fda
Offline
Joined: 2005-05-27
Points: 0

Fix is ok, but I would put the new code into a method to avoid duplication.

void unsetDefaultContextManager() {
if (context != null &&
"com.sun.javatest.exec.ContextManager".equals(context.getClass().getCanonicalName())) {
context = null;
}
}