# HG changeset patch # User alundblad # Date 1430833658 -7200 # Node ID 530743d1858ddc9e7185e00c47f244dc5e2c6dba # Parent 3da6595b205f9a7db30442db9e946b7eeca58e74 8079335: The field Gen.stringBufferType is no longer needed (and not always initialized properly) Summary: Removed Gen.stringBufferType field. Reviewed-by: jlahoda, mcimadamore diff -r 3da6595b205f -r 530743d1858d langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java --- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Apr 28 15:20:25 2015 +0530 +++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java Tue May 05 15:47:38 2015 +0200 @@ -69,7 +69,6 @@ private final TreeMaker make; private final Names names; private final Target target; - private final Type stringBufferType; private final Map stringBufferAppend; private Name accessDollar; private final Types types; @@ -107,7 +106,6 @@ target = Target.instance(context); types = Types.instance(context); methodType = new MethodType(null, null, null, syms.methodClass); - stringBufferType = syms.stringBuilderType; stringBufferAppend = new HashMap<>(); accessDollar = names. fromString("access" + target.syntheticNameChar()); @@ -2070,10 +2068,10 @@ /** Make a new string buffer. */ void makeStringBuffer(DiagnosticPosition pos) { - code.emitop2(new_, makeRef(pos, stringBufferType)); + code.emitop2(new_, makeRef(pos, syms.stringBuilderType)); code.emitop0(dup); callMethod( - pos, stringBufferType, names.init, List.nil(), false); + pos, syms.stringBuilderType, names.init, List.nil(), false); } /** Append value (on tos) to string buffer (on tos - 1). @@ -2091,7 +2089,7 @@ if (method == null) { method = rs.resolveInternalMethod(tree.pos(), attrEnv, - stringBufferType, + syms.stringBuilderType, names.append, List.of(t), null); @@ -2122,7 +2120,7 @@ void bufferToString(DiagnosticPosition pos) { callMethod( pos, - stringBufferType, + syms.stringBuilderType, names.toString, List.nil(), false);