dragome / dragome-sdk

Dragome is a tool for creating client side web applications in pure Java (JVM) language.
http://www.dragome.com
Other
80 stars 20 forks source link

Strange compare in code of DragomeJavaScriptGenerator #185

Open nicolaichuk opened 7 years ago

nicolaichuk commented 7 years ago
    private boolean isW3C(MethodInvocation invocation)
    {
        MethodBinding methodBinding= invocation.getMethodBinding();

// ...
        if (methodBinding.equals("org.w3c.dom5.NamedNodeMap"))
        {
            if (name.equals("setNamedItemNS") || name.equals("setNamedItem"))
                return false;
        }
        if (methodBinding.equals("org.w3c.dom5.Element"))
        {
            if (name.equals("setAttributeNode") || name.equals("setAttributeNodeNS"))
                return false;
        }
// ...

}

https://github.com/dragome/dragome-sdk/blob/e3fd2f1b40854267e4f756776f1110c44e21f7ba/dragome-bytecode-js-compiler/src/main/java/com/dragome/compiler/generators/DragomeJavaScriptGenerator.java#L848

and

https://github.com/dragome/dragome-sdk/blob/e3fd2f1b40854267e4f756776f1110c44e21f7ba/dragome-bytecode-js-compiler/src/main/java/com/dragome/compiler/generators/DragomeJavaScriptGenerator.java#L853

methodBinding is MethodBinding and dont have override equals function. and you try compare with text string @_@

RP-fernandopetrola commented 3 years ago

Hi, this method is not in use, I'll remove it in next release. thanks for the feedback