Mercurial > hg > graal-compiler
changeset 22430:0afa1443c44e
Check for null when constant folding HubGetClass
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 10 Aug 2015 16:23:45 -0700 |
parents | 8bdcc9c661de |
children | ec8b73f15675 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HubGetClassNode.java |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HubGetClassNode.java Mon Aug 10 16:23:29 2015 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/replacements/HubGetClassNode.java Mon Aug 10 16:23:45 2015 -0700 @@ -58,9 +58,9 @@ return null; } else { MetaAccessProvider metaAccess = tool.getMetaAccess(); - if (metaAccess != null) { - if (hub.isConstant()) { - ResolvedJavaType exactType = tool.getConstantReflection().asJavaType(hub.asJavaConstant()); + if (metaAccess != null && hub.isConstant()) { + ResolvedJavaType exactType = tool.getConstantReflection().asJavaType(hub.asJavaConstant()); + if (exactType != null) { return ConstantNode.forConstant(exactType.getJavaClass(), metaAccess); } }