< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/FunctionCall.java
Print this page
*** 1,8 ****
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
--- 1,8 ----
/*
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*** 441,451 ****
final MethodType ptype =
lookupPrimop(stable, _fname.getLocalPart(), args);
if (ptype != null) {
for (int i = 0; i < n; i++) {
! final Type argType = (Type) ptype.argsType().get(i);
final Expression exp = _arguments.get(i);
if (!argType.identicalTo(exp.getType())) {
try {
_arguments.set(i, new CastExpr(exp, argType));
}
--- 441,451 ----
final MethodType ptype =
lookupPrimop(stable, _fname.getLocalPart(), args);
if (ptype != null) {
for (int i = 0; i < n; i++) {
! final Type argType = ptype.argsType().get(i);
final Expression exp = _arguments.get(i);
if (!argType.identicalTo(exp.getType())) {
try {
_arguments.set(i, new CastExpr(exp, argType));
}
*** 555,565 ****
if (_namespace_format == NAMESPACE_FORMAT_JAVA
|| _namespace_format == NAMESPACE_FORMAT_PACKAGE)
hasThisArgument = true;
Expression firstArg = _arguments.get(0);
! Type firstArgType = (Type)firstArg.typeCheck(stable);
if (_namespace_format == NAMESPACE_FORMAT_CLASS
&& firstArgType instanceof ObjectType
&& _clazz != null
&& _clazz.isAssignableFrom(((ObjectType)firstArgType).getJavaClass()))
--- 555,565 ----
if (_namespace_format == NAMESPACE_FORMAT_JAVA
|| _namespace_format == NAMESPACE_FORMAT_PACKAGE)
hasThisArgument = true;
Expression firstArg = _arguments.get(0);
! Type firstArgType = firstArg.typeCheck(stable);
if (_namespace_format == NAMESPACE_FORMAT_CLASS
&& firstArgType instanceof ObjectType
&& _clazz != null
&& _clazz.isAssignableFrom(((ObjectType)firstArgType).getJavaClass()))
*** 606,616 ****
// Try all methods to identify the best fit
int bestMethodDistance = Integer.MAX_VALUE;
_type = null; // reset internal type
for (int j, i = 0; i < nMethods; i++) {
// Check if all paramteters to this method can be converted
! final Method method = (Method)methods.get(i);
final Class<?>[] paramTypes = method.getParameterTypes();
int currMethodDistance = 0;
for (j = 0; j < nArgs; j++) {
// Convert from internal (translet) type to external (Java) type
--- 606,616 ----
// Try all methods to identify the best fit
int bestMethodDistance = Integer.MAX_VALUE;
_type = null; // reset internal type
for (int j, i = 0; i < nMethods; i++) {
// Check if all paramteters to this method can be converted
! final Method method = methods.get(i);
final Class<?>[] paramTypes = method.getParameterTypes();
int currMethodDistance = 0;
for (j = 0; j < nArgs; j++) {
// Convert from internal (translet) type to external (Java) type
< prev index next >