https://bz.apache.org/bugzilla/show_bug.cgi?id=57625
Bug ID: 57625
Summary: tomcat.util.modeler.Registry.getMBeanServer() always
gets the current system time
Product: Tomcat 9
Version: unspecified
Hardware: PC
OS: Mac OS X 10.1
Status: NEW
Severity: enhancement
Priority: P2
Component: Catalina
Assignee: [email protected]
Reporter: [email protected]
This appears to be in the codebase since the beginning of time.
getMBeanServer() takes the start time, even when its never used (the local
variable has been inited).
public synchronized MBeanServer getMBeanServer() {
long t1=System.currentTimeMillis();
if (server == null) {
// ... t1 is used for debug logging.
}
return (server);
}
Even when this method is not really hot, I guess it would make sense to move
this timing call down inside the if statement.
This issue applies to all (supported) tomcat versions. Shall I open a ticket
for each?
Because the patch is trivial, I assume it is easier for you to do it yourself,
rather than me attaching diff-patches.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]