Issue 1:
Benoit Heurter opened SPR-3640 and commented

Method buildTypedStringValueForMap of class BeanDefinitionParserDelegate is private. Because of that, i cannot create a sub-class of BeanDefinitionParserDelegate with my slightly modified version of parseMapElement method.

It's not blocker as i duplicated whole te code but it seems easier if i could re-use original methods

Could you please change methods below to protected ?

buildTypedStringValueForMap

buildTypedStringValue

Thank you in advance

Affects: 2.0.6

Issue 2:
Bruce Lowe opened SPR-6833 and commented

I have a controller with a methods defined as such

@RequestMapping(value = "/services/{serviceName}/scenes/", method = RequestMethod.POST)

public void addScene(@PathVariable("serviceName") String serviceName,

@RequestBody SceneTO receivedSceneTO, HttpServletRequest request, HttpServletResponse response)

{

...

}

It is designed to be able to POST "SceneTO"s to. I have made a smart custom message converters so people can submit VideoScenes, AudioScenes, TextScenes etc. The convertor will create the appropriate SceneTO inheriting object.

However, i get this exception:

java.lang.IllegalArgumentException: argument type mismatch

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)

at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)

at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)

at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:71)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

If I change my convertor to ONLY create SceneTO objects (instead of an inheriting one), it works fine. The method clearly does not support inheritance

We can currently work around the problem by doing this

@RequestMapping(value = "/services/{serviceName}/scenes/video", method = RequestMethod.POST)

public void addScene(@PathVariable("serviceName") String serviceName,

@RequestBody VideoTO receivedSceneTO, HttpServletRequest request, HttpServletResponse response)

and

@RequestMapping(value = "/services/{serviceName}/scenes/audio", method = RequestMethod.POST)

public void addScene(@PathVariable("serviceName") String serviceName,

@RequestBody AudioTO receivedSceneTO, HttpServletRequest request, HttpServletResponse response)

But it does seem less clean and results in much duplicated code. Allowing inheritance would seem much more elegant. (I imagine some other people may want interfaces as well)

No further details from SPR-6833