Using StrategyBuilder service on an interface with a non-conforming method (one that does not include the selector as the initial parameter) throws an inscrutable ArrayIndexOutOfBounds exception --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: TAP5-1813 URL: https://issues.apache.org/jira/browse/TAP5-1813 Project: Tapestry 5 Issue Type: Bug Components: tapestry-ioc Affects Versions: 5.3 Reporter: Howard M. Lewis Ship Priority: Minor Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at org.apache.tapestry5.internal.plastic.InstructionBuilderImpl.loadArgument(InstructionBuilderImpl.java:171) ~[plastic-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.StrategyBuilderImpl$1$1.doBuild(StrategyBuilderImpl.java:76) ~[tapestry-ioc-5.3.1.jar:na] at org.apache.tapestry5.internal.plastic.InstructionBuilderImpl.doCallback(InstructionBuilderImpl.java:832) ~[plastic-5.3.1.jar:na] at org.apache.tapestry5.internal.plastic.PlasticMethodImpl.changeImplementation(PlasticMethodImpl.java:130) ~[plastic-5.3.1.jar:na] at org.apache.tapestry5.internal.plastic.PlasticClassImpl.introduceMethod(PlasticClassImpl.java:647) ~[plastic-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.StrategyBuilderImpl$1.transform(StrategyBuilderImpl.java:65) ~[tapestry-ioc-5.3.1.jar:na] at org.apache.tapestry5.plastic.PlasticManager.createProxy(PlasticManager.java:235) ~[plastic-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl.createProxy(PlasticProxyFactoryImpl.java:60) ~[tapestry-ioc-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.StrategyBuilderImpl.createProxy(StrategyBuilderImpl.java:56) ~[tapestry-ioc-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.StrategyBuilderImpl.build(StrategyBuilderImpl.java:44) ~[tapestry-ioc-5.3.1.jar:na] at org.apache.tapestry5.ioc.internal.services.StrategyBuilderImpl.build(StrategyBuilderImpl.java:51) ~[tapestry-ioc-5.3.1.jar:na] at $StrategyBuilder_1265847ad7894079.build(Unknown Source) ~[na:na] This traces into code that attempts to load the first argument (argument 0, as Plastic numbers them) which fails because the method contains no parameters. A better case would be to check that each method takes at least one parameter, and preferably, find a way to ensure that the first parameter is the correct selector type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira