Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.3, 5.4
-
None
Description
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.