This post originated from an RSS feed registered with Java Buzz
by News Manager.
Original Post: Sun has posted the public review draft of JSR-303 Bean Validation.
Feed Title: Cafe au Lait
Feed URL: http://www.cafeaulait.org/today.rss
Feed Description: Cafe au Lait is the preeminent independent source of Java information on the net. Unlike many other Java sites, Cafe au Lait is neither beholden to specific companies nor to advertisers. At Cafe au Lait you'll find many resources to help you develop your Java programming skills here including daily news summaries, FAQ lists, tutorials, course notes, examples, exercises, book reviews, user groups and more.
Sun has posted the public review draft of JSR-303 Bean Validation. This enables one to define constraints that can be applied to method arguments via annotations. However it's limited, and requires JavaBeans method-naming conventions to be followed. This would be better addressed by language-level support for preconditions and class invariants. Liek generics and the various closure proposals, it's a half-measure that's too crippled by backwards compatibility to really achieve its goals. Sometimes, when you can't do something the right way, it's better not to do it at all. Whether Bean Validation is one of those times, I'm not yet sure; but I'm beginning to suspect it is.