Mercurial > hg > truffle
changeset 22311:3f2737e9e4e1
The method documentation says one should throw ClassCastException when the value cannot be converted
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Fri, 16 Oct 2015 08:47:52 +0200 |
parents | 1d60440b03a8 |
children | 8322a904a472 |
files | truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java Thu Oct 15 10:01:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java Fri Oct 16 08:47:52 2015 +0200 @@ -742,7 +742,7 @@ if (JAVA_INTEROP_ENABLED) { return JavaInterop.asJavaObject(representation, (TruffleObject) obj); } - throw new IllegalArgumentException("Value cannot be represented as " + representation.getName()); + throw new ClassCastException("Value cannot be represented as " + representation.getName()); } /**