src/jdk.jcmd/share/classes/sun/tools/jstat/Token.java

Print this page
rev 10521 : 8055723[core]: Replace concat String to append in StringBuilder parameters
Contributed-by: Otavio Santana <otaviojava@java.net>

*** 87,108 **** break; case StreamTokenizer.TT_EOF: sb.append("ttype=TT_EOF"); break; case StreamTokenizer.TT_NUMBER: ! sb.append("ttype=TT_NUM,").append("nval="+nval); break; case StreamTokenizer.TT_WORD: if (sval == null) { sb.append("ttype=TT_WORD:IDENTIFIER"); } else { ! sb.append("ttype=TT_WORD:").append("sval="+sval); } break; default: if (ttype == (int)'"') { ! sb.append("ttype=TT_STRING:").append("sval="+sval); } else { sb.append("ttype=TT_CHAR:").append((char)ttype); } break; } --- 87,108 ---- break; case StreamTokenizer.TT_EOF: sb.append("ttype=TT_EOF"); break; case StreamTokenizer.TT_NUMBER: ! sb.append("ttype=TT_NUM,").append("nval=").append(nval); break; case StreamTokenizer.TT_WORD: if (sval == null) { sb.append("ttype=TT_WORD:IDENTIFIER"); } else { ! sb.append("ttype=TT_WORD:").append("sval=").append(sval); } break; default: if (ttype == (int)'"') { ! sb.append("ttype=TT_STRING:").append("sval=").append(sval); } else { sb.append("ttype=TT_CHAR:").append((char)ttype); } break; }