Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084104 | emb-9 | Claes Redestad | P4 | Resolved | Fixed | team |
sun.jvmstat.perfdata.monitor.AliasFileParser calls an internal debug logging method that always discards the input string since logging is disabled. Unfortunately the input strings are still constructed which causes a lot of allocation due to string concatenation.
The logging method is:
private void logln(String s) {
if (DEBUG) {
System.err.println(s);
}
}
It is permantently disabled since:
private static final boolean DEBUG = false;
An example of a call to the logging method:
logln("matched type: " + ttype + ", token = " + currentToken.sval);
This could quite easily be fixed by either removing the logging completely or by guarding the logln calls in "if (DEBUG)" blocks.
The logging method is:
private void logln(String s) {
if (DEBUG) {
System.err.println(s);
}
}
It is permantently disabled since:
private static final boolean DEBUG = false;
An example of a call to the logging method:
logln("matched type: " + ttype + ", token = " + currentToken.sval);
This could quite easily be fixed by either removing the logging completely or by guarding the logln calls in "if (DEBUG)" blocks.
- backported by
-
JDK-8084104 Unnecessary allocation in AliasFileParser
-
- Resolved
-