|
From: Bram S. <br...@in...> - 2005-11-23 23:00:12
|
Hi All, This week, at a customer, I encountered some annoying behavior with the ResourceBundleViewResolver. When the view class, specified in the properties file, contains a trailing whitespace in the class name, you get a ClassNotFoundException with the message: java.lang.ClassNotFoundException: org.springframework.web.servlet.view.InternalResourceView This proved to be very confusing to developers (as I reckon it is, as the whitespace is not visible in the error message). The problem lies in the fact that the PropertiesBeanDefinitionReader does not trim the values obtained from the resource bundle. Is it possible to add trimming of the values in the resource bundles, or do I miss some implications this might have? It is fairly simple to test, I just added another test to the ResourceBundleViewResolverTests that checks for an additional view (with a trailing whitespace in the class name). Greetings, Bram Smeets -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.5/178 - Release Date: 22-11-2005 |