Issue 1:
Janning Vygen opened SPR-3449 and commented

the binding of a list does not work in spring 2.0.4. The error is reproducable with the code below (including pom maven descriptor).

The same code DOES work with spring 2.0.3 (you just need to change the pom if you use maven)

// imports removed

public class SimpleControllerTest extends TestCase {

private SimpleController	controller;

public void testCorrectModel ( ) throws Exception {
controller = new SimpleController();
controller.setCommandClass(ListForm.class);
MockHttpServletRequest req = new MockHttpServletRequest("POST", "/myurl");
MockHttpServletResponse res = new MockHttpServletResponse();
req.addParameter("oks[0].ok", "true");
ModelAndView mav = controller.handleRequest(req, res);
ListForm form = (ListForm) mav.getModelMap().get("command");
Boolean ok = form.getOks().get(0).getOk();
assertNotNull(ok);
}

}

// imports removed

public class SimpleController extends AbstractFormController

{

protected ModelAndView processFormSubmission ( HttpServletRequest req, HttpServletResponse resp, Object command, BindException err ) throws Exception {

ModelAndView mav = new ModelAndView();

mav.addObject("command", command);

return mav;

}

@Override
protected ModelAndView showForm ( HttpServletRequest arg0, HttpServletResponse arg1, BindException arg2 ) throws Exception {
return null;
}

}

// imports removed

public class Ok

{

Boolean ok;

public Boolean getOk () {

return ok;

}

public void setOk ( Boolean ok ) {
this.ok = ok;
}

}

// imports removed

public class ListForm

{

private List<Ok> oks = new ArrayList<Ok>();

public ListForm () {
for( int index = 0; index < 5; index++)	{
Ok ok = new Ok();
oks.add( ok );
}
}

public List<Ok> getOks ( ) {
return oks;
}

public void setOks ( List<Ok> oks ) {
this.oks = oks;
}

}

<?xml version="1.0" encoding="UTF-8"?>

<project>

<modelVersion>4.0.0</modelVersion>

<groupId>test</groupId>

<artifactId>test</artifactId>

<packaging>jar</packaging>

<version>1.0-SNAPSHOT</version>

<build>

<plugins>

<plugin>

<artifactId>maven-compiler-plugin</artifactId>

<configuration>

<source>1.5</source>

<target>1.5</target>

</configuration>

</plugin>

</plugins>

</build>

<dependencies>

<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring</artifactId>

<version>2.0.4</version>

<!--

<version>2.0.3</version>

-->

</dependency>

<dependency>

<groupId>junit</groupId>

<artifactId>junit</artifactId>

<version>3.8.1</version>

<scope>test</scope>

</dependency>	<dependency>

<groupId>org.springframework</groupId>

<artifactId>spring-mock</artifactId>

<version>2.0.4</version>

<!--

<version>2.0.3</version>

-->

<scope>test</scope>

</dependency>

</dependencies>

</project>

Affects: 2.0.4

Issue Links:

#8043 Error in BeanWrapperImpl.setPropertyValue for nested paths for primitive wrapper types such as integer ("duplicates")

Issue 2:
Peter Dettman opened SPR-6041 and commented

The Caucho hessian lib has now stabilised its v2.0 protocol and rounded up several regressions, with the release of v4.0.1 (http://caucho.com/download/hessian-4.0.1.jar).

In 4.0.1, the HessianSkeleton class provides a ready-made invoke method that Spring's HessianExporter can call (instead of duplicating its code). I am attaching a patch that modifies HessianExporter.java to do so. The debugging output part of the code is still duplicated of necessity until some suitable refactoring of HessianSkeleton is done.

As far as backward compatibility is concerned, I believe users should avoid using Hessian 2.0 protocol from previous versions (that may be an overly strict interpretation). Hessian 1.0 protocol should work fine with a v4.0.1 server. I understand that there could be problems if people are using HessianOutput/Hessian2Output or streaming versions directly.

I recommend Caucho's Hessian 4.0.1 be used for Spring 3.0, a fresh start of sorts.

See also:

http://maillist.caucho.com/pipermail/hessian-interest/2009-June/000750.html (and surrounding discussion on that list)

http://jira.springframework.org/browse/SPR-5469

http://bugs.caucho.com/view.php?id=3646

Affects: 3.0 M4

Attachments:

HessianExporter_401.patch (2.88 kB)

Issue Links:

#10142 Support Hessian 3.2.1

2 votes, 4 watchers