< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/NashornBottomLinker.java
Print this page
*** 139,150 ****
final GuardedInvocation gi = convertToTypeNoCast(sourceType, targetType);
return gi == null ? null : gi.asType(MH.type(targetType, sourceType));
}
/**
! * Main part of the implementation of {@link GuardingTypeConverterFactory#convertToType(Class, Class)} that doesn't
! * care about adapting the method signature; that's done by the invoking method. Returns conversion from Object to String/number/boolean (JS primitive types).
* @param sourceType the source type
* @param targetType the target type
* @return a guarded invocation that converts from the source type to the target type.
* @throws Exception if something goes wrong
*/
--- 139,151 ----
final GuardedInvocation gi = convertToTypeNoCast(sourceType, targetType);
return gi == null ? null : gi.asType(MH.type(targetType, sourceType));
}
/**
! * Main part of the implementation of {@link GuardingTypeConverterFactory#convertToType} that doesn't
! * care about adapting the method signature; that's done by the invoking method. Returns conversion
! * from Object to String/number/boolean (JS primitive types).
* @param sourceType the source type
* @param targetType the target type
* @return a guarded invocation that converts from the source type to the target type.
* @throws Exception if something goes wrong
*/
< prev index next >