Mercurial > hg > truffle
changeset 9664:843dde5a83af
VerifyValueUsage: move String creation to assert
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Mon, 13 May 2013 16:37:57 +0200 |
parents | 822adbb2ee7b |
children | 8f2f4c9e2dcf |
files | graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyValueUsage.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyValueUsage.java Mon May 13 15:55:41 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/verify/VerifyValueUsage.java Mon May 13 16:37:57 2013 +0200 @@ -51,9 +51,9 @@ @Override protected boolean verify(StructuredGraph graph) { for (ObjectEqualsNode cn : graph.getNodes().filter(ObjectEqualsNode.class)) { - String desc = "VerifyValueUsage: " + cn.x() + " or " + cn.y() + " in " + graph.method() + " uses object identity. Should use equals() instead."; if (!graph.method().toString().endsWith("equals(Object)>")) { - assert !((checkType(cn.x()) && !(cn.y() instanceof ConstantNode)) || (checkType(cn.y()) && !(cn.x() instanceof ConstantNode))) : desc; + assert !((checkType(cn.x()) && !(cn.y() instanceof ConstantNode)) || (checkType(cn.y()) && !(cn.x() instanceof ConstantNode))) : "VerifyValueUsage: " + cn.x() + " or " + cn.y() + + " in " + graph.method() + " uses object identity. Should use equals() instead."; } } return true;