mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
7090700: fix for 7080267 breaks two tests
Reviewed-by: ksrini
This commit is contained in:
parent
2bbf651156
commit
afaeb37bb5
1 changed files with 15 additions and 15 deletions
|
@ -538,21 +538,6 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
|||
super.setPos(pos);
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Convert a statement tree to a pretty-printed string. */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringWriter s = new StringWriter();
|
||||
try {
|
||||
new Pretty(s, false).printStat(this);
|
||||
}
|
||||
catch (IOException e) {
|
||||
// should never happen, because StringWriter is defined
|
||||
// never to throw any IOExceptions
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
return s.toString();
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class JCExpression extends JCTree implements ExpressionTree {
|
||||
|
@ -1191,6 +1176,21 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
|
|||
public int getTag() {
|
||||
return EXEC;
|
||||
}
|
||||
|
||||
/** Convert a expression-statement tree to a pretty-printed string. */
|
||||
@Override
|
||||
public String toString() {
|
||||
StringWriter s = new StringWriter();
|
||||
try {
|
||||
new Pretty(s, false).printStat(this);
|
||||
}
|
||||
catch (IOException e) {
|
||||
// should never happen, because StringWriter is defined
|
||||
// never to throw any IOExceptions
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
return s.toString();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue