From: RBRi <rb...@us...> - 2018-07-25 17:40:27
|
Great finding. Hopefully this is fixed now - have to wait a bit what suprises our build server will create. If the test suite is green again, i will create a new snapshot and inform as ususal via twitter (https://twitter.com/HtmlUnit) --- ** [bugs:#1976] java.lang.ClassCastException: java.lang.Integer cannot be cast to net.sourceforge.htmlunit.corejs.javascript.Function** **Status:** open **Group:** Latest SVN **Created:** Wed Jul 25, 2018 03:06 AM UTC by Kim Myungho **Last Updated:** Wed Jul 25, 2018 03:10 AM UTC **Owner:** nobody Hello. I tested htmlunit 2.31 for upgrade from 2.26 to 2.31. During test, I encountered ClassCastException like below. ~~~ java.lang.ClassCastException: java.lang.Integer cannot be cast to net.sourceforge.htmlunit.corejs.javascript.Function at com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.getEventHandler(EventListenersContainer.java:357) at com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeEventHandler(EventListenersContainer.java:294) at com.gargoylesoftware.htmlunit.javascript.host.event.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:323) at com.gargoylesoftware.htmlunit.javascript.host.event.EventTarget.fireEvent(EventTarget.java:189) at com.gargoylesoftware.htmlunit.html.DomElement$2.run(DomElement.java:1413) at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:620) at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:532) at com.gargoylesoftware.htmlunit.html.DomElement.fireEvent(DomElement.java:1418) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1220) at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:292) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:536) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:398) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:315) at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:480) at com.nhnent.mercury.inspect.webmon.HttpPageMonitoring.urlCheck(HttpPageMonitoring.java:337) at com.nhnent.mercury.inspect.webmon.HttpPageMonitoring.check(HttpPageMonitoring.java:145) at com.nhnent.mercury.inspect.webmon.WebScenarioSimulator.lambda$simulate$1(WebScenarioSimulator.java:48) at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602) at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577) at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442) at java.lang.Thread.run(Thread.java:748) ~~~ I found that there's no type checking before cast. The problem has been fixed after adding some type checking logic. https://sourceforge.net/p/htmlunit/code/HEAD/tree/tags/HtmlUnit-2.31/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/event/EventListenersContainer.java#l357 I look forward to fixed this issue asap. Thank you for reading. HtmlUnit is awesome!!! --- Sent from sourceforge.net because htm...@li... is subscribed to https://sourceforge.net/p/htmlunit/bugs/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/htmlunit/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |