-
Enhancement
-
Resolution: Won't Fix
-
P4
-
6u24
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
Include a way to desambiguate javascript calls to overloaded java methods, where the parameters which differentiate the methods are optional (null is a valid value).
JUSTIFICATION :
The "javax.xml.crypto.dsig.XMLSignatureFactory" class contains an overloaded method "newCanonicalizationMethod" which differ only in the type of the 2nd parameter, which is optional (null):
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params);
and
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params);
Using plugin2, there appears to be no way to pass null and successfully differentiate the methods.
Even using reflections tricks such as passing:
java.lang.Class.forName("javax.xml.crypto.dsig.spec.ExcC14NParameterSpec" ).cast(null)
the same error is reported.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
any way of specifying which of the two methods should be called.
ACTUAL -
Current behaviour is to throw a java.lang.IllegalArgumentException: "More than one method matching name Method and arguments [.., null] "
---------- BEGIN SOURCE ----------
<html>
<applet name="myApplet" code="..... " archive="...." />
<script/>
var Packages = document.myApplet.Packages;
var java = Packages.java;
var xmlFac = Packages.javax.xml.crypto.dsig.XMLSignatureFactory.getInstance( "DOM" );
var cm = xmlFac.newCanonicalizationMethod(
Packages.javax.xml.crypto.dsig.CanonicalizationMethod.INCLUSIVE,
null );
// -- OR --
var cm = xmlFac.newCanonicalizationMethod(
Packages.javax.xml.crypto.dsig.CanonicalizationMethod.INCLUSIVE,
java.lang.Class.forName("javax.xml.crypto.dsig.spec.ExcC14NParameterSpec" ).cast(null) );
</script >
</html>
---------- END SOURCE ----------
Include a way to desambiguate javascript calls to overloaded java methods, where the parameters which differentiate the methods are optional (null is a valid value).
JUSTIFICATION :
The "javax.xml.crypto.dsig.XMLSignatureFactory" class contains an overloaded method "newCanonicalizationMethod" which differ only in the type of the 2nd parameter, which is optional (null):
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, C14NMethodParameterSpec params);
and
public abstract CanonicalizationMethod newCanonicalizationMethod(String algorithm, XMLStructure params);
Using plugin2, there appears to be no way to pass null and successfully differentiate the methods.
Even using reflections tricks such as passing:
java.lang.Class.forName("javax.xml.crypto.dsig.spec.ExcC14NParameterSpec" ).cast(null)
the same error is reported.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
any way of specifying which of the two methods should be called.
ACTUAL -
Current behaviour is to throw a java.lang.IllegalArgumentException: "More than one method matching name Method and arguments [.., null] "
---------- BEGIN SOURCE ----------
<html>
<applet name="myApplet" code="..... " archive="...." />
<script/>
var Packages = document.myApplet.Packages;
var java = Packages.java;
var xmlFac = Packages.javax.xml.crypto.dsig.XMLSignatureFactory.getInstance( "DOM" );
var cm = xmlFac.newCanonicalizationMethod(
Packages.javax.xml.crypto.dsig.CanonicalizationMethod.INCLUSIVE,
null );
// -- OR --
var cm = xmlFac.newCanonicalizationMethod(
Packages.javax.xml.crypto.dsig.CanonicalizationMethod.INCLUSIVE,
java.lang.Class.forName("javax.xml.crypto.dsig.spec.ExcC14NParameterSpec" ).cast(null) );
</script >
</html>
---------- END SOURCE ----------