Mercurial > hg > release > icedtea-web-1.5
changeset 718:64d08fb70c0f
Remove incorrect undummied code in MethodOverloadResolver
author | Adam Domurad <adomurad@redhat.com> |
---|---|
date | Thu, 02 May 2013 10:41:20 -0400 |
parents | 882d1bc0ff8f |
children | f3c918a41d10 |
files | ChangeLog plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java |
diffstat | 2 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu May 02 16:05:57 2013 +0200 +++ b/ChangeLog Thu May 02 10:41:20 2013 -0400 @@ -1,3 +1,9 @@ +2013-05-02 Adam Domurad <adomurad@redhat.com> + + * plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java + (getCostAndCastedObject): Remove code that had no effect before refactoring. + (getBestOverloadMatch): Move debug-only code to debug if-block. + 2013-05-02 Jiri Vanek <jvanek@redhat.com> Added various tests related to portalbank.no fixes
--- a/plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java Thu May 02 16:05:57 2013 +0200 +++ b/plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java Thu May 02 10:41:20 2013 -0400 @@ -44,8 +44,6 @@ import java.util.Arrays; import java.util.List; -import netscape.javascript.JSObject; - /* * This class resolved overloaded methods in Java objects using a cost * based-approach described here: @@ -65,7 +63,6 @@ static final int CLASS_SUPERCLASS_COST = 6; static final int CLASS_STRING_COST = 7; - static final int JSOBJECT_TO_ARRAY_COST = CLASS_STRING_COST; static final int ARRAY_CAST_COST = 8; /* A method signature with its casted parameters @@ -198,10 +195,10 @@ castedArgs[i] = castedObj; - Class<?> castedObjClass = castedObj == null ? null : castedObj.getClass(); - boolean castedObjIsPrim = castedObj == null ? false : castedObj.getClass().isPrimitive(); + if (PluginDebug.DEBUG) { /* avoid toString if not needed */ + Class<?> castedObjClass = castedObj == null ? null : castedObj.getClass(); + boolean castedObjIsPrim = castedObj == null ? false : castedObj.getClass().isPrimitive(); - if (PluginDebug.DEBUG) { /* avoid toString if not needed */ PluginDebug.debug("Param " + i + " of method " + candidate + " has cost " + weightedCast.getCost() + " original param type " + suppliedParamClass @@ -340,12 +337,6 @@ return new WeightedCast(CLASS_STRING_COST, suppliedParam.toString()); } - // JSObject to Java array - if (suppliedParam instanceof JSObject - && paramTypeClass.isArray()) { - return new WeightedCast(JSOBJECT_TO_ARRAY_COST, suppliedParam); - } - return null; }