nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/api/scripting/ScriptUtils.java
equal
deleted
inserted
replaced
169 throw new IllegalArgumentException("type expected"); |
169 throw new IllegalArgumentException("type expected"); |
170 } |
170 } |
171 |
171 |
172 final LinkerServices linker = Bootstrap.getLinkerServices(); |
172 final LinkerServices linker = Bootstrap.getLinkerServices(); |
173 final Object objToConvert = unwrap(obj); |
173 final Object objToConvert = unwrap(obj); |
174 final MethodHandle converter = linker.getTypeConverter(objToConvert.getClass(), clazz); |
174 final MethodHandle converter = linker.getTypeConverter(objToConvert.getClass(), clazz); |
175 if (converter == null) { |
175 if (converter == null) { |
176 // no supported conversion! |
176 // no supported conversion! |
177 throw new UnsupportedOperationException("conversion not supported"); |
177 throw new UnsupportedOperationException("conversion not supported"); |
178 } |
178 } |
179 |
179 |