Project: mule
Issue MULE-9066: set-property throws runtime exception if the propertyName is empty
When using set-property, if the propertyName is empty, the schema consider it as a valid value, but every attept to use it throws a java.lang.StringIndexOutOfBoundsException. As a side effect, this also makes the request fail if the set-property is in a flow which contains an http:listener element. The solution IMHO would be changing the mule.xsd schema and adding a minLength value to the set-property element. How to reproduce: - Use the following mule-config. The deployment of the app will be successful. {code} {code} When making a request, the config produces the following exception, and the response *never comes back*. {code} ERROR 2015-11-16 14:42:01,527 [[set-property-error].HTTP_Listener_Configuration.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: Caught exception in Exception Strategy: String index out of range: 0 java.lang.StringIndexOutOfBoundsException: String index out of range: 0 java.lang.String.charAt(String.java:658) ~[?:1.7.0_71] org.glassfish.grizzly.http.HttpHeader$Builder.handleSpecialHeaderAdd(HttpHeader.java:1240) ~[grizzly-http-2.3.21.jar:2.3.21] org.glassfish.grizzly.http.HttpHeader$Builder.header(HttpHeader.java:1134) ~[grizzly-http-2.3.21.jar:2.3.21] org.mule.module.http.internal.listener.grizzly.BaseResponseCompletionHandler.buildHttpResponsePacket(BaseResponseCompletionHandler.java:34) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.grizzly.ResponseCompletionHandler.(ResponseCompletionHandler.java:52) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter$1.responseReady(GrizzlyRequestDispatcherFilter.java:96) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.HttpMessageProcessorTemplate.sendResponseToClient(HttpMessageProcessorTemplate.java:99) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:83) ~[mule-core-3.7.0.jar:3.7.0] org.mule.execution.AsyncResponseFlowProcessingPhase.runPhase(AsyncResponseFlowProcessingPhase.java:38) ~[mule-core-3.7.0.jar:3.7.0] org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccessfully(PhaseExecutionEngine.java:65) ~[mule-core-3.7.0.jar:3.7.0] org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.phaseSuccessfully(PhaseExecutionEngine.java:69) ~[mule-core-3.7.0.jar:3.7.0] com.mulesoft.mule.throttling.ThrottlingPhase.runPhase(ThrottlingPhase.java:185) ~[mule-module-throttling-ee-3.7.0.jar:3.7.0] com.mulesoft.mule.throttling.ThrottlingPhase.runPhase(ThrottlingPhase.java:1) ~[mule-module-throttling-ee-3.7.0.jar:3.7.0] org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine.process(PhaseExecutionEngine.java:114) ~[mule-core-3.7.0.jar:3.7.0] org.mule.execution.PhaseExecutionEngine.process(PhaseExecutionEngine.java:41) ~[mule-core-3.7.0.jar:3.7.0] org.mule.execution.MuleMessageProcessingManager.processMessage(MuleMessageProcessingManager.java:32) ~[mule-core-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.DefaultHttpListener$1.handleRequest(DefaultHttpListener.java:126) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.grizzly.GrizzlyRequestDispatcherFilter.handleRead(GrizzlyRequestDispatcherFilter.java:83) ~[mule-module-http-3.7.0.jar:3.7.0] org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536) ~[grizzly-framework-2.3.21.jar:2.3.21] org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) ~[grizzly-framework-2.3.21.jar:2.3.21] org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.run0(ExecutorPerServerAddressIOStrategy.java:102) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy.access$100(ExecutorPerServerAddressIOStrategy.java:30) ~[mule-module-http-3.7.0.jar:3.7.0] org.mule.module.http.internal.listener.grizzly.ExecutorPerServerAddressIOStrategy$WorkerThreadRunnable.run(ExecutorPerServerAddressIOStrategy.java:125) ~[mule-module-http-3.7.0.jar:3.7.0] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_71] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_71] java.lang.Thread.run(Thread.java:745) [?:1.7.0_71] {code}
Story points: 1