Details
-
Improvement
-
Status: Open
-
Trivial
-
Resolution: Unresolved
-
None
-
None
Description
MessageTypeParser.java
private StringBuffer currentLine = new StringBuffer(); .... public String nextToken() { while (st.hasMoreTokens()) { String t = st.nextToken(); if (t.equals("\n")) { ++ line; currentLine.setLength(0); } else { currentLine.append(t); } if (!isWhitespace(t)) { return t; } } throw new IllegalArgumentException("unexpected end of schema"); }
Use StringBuilder instead of StringBuffer as StringBuffer is synchronized (which is not required here).