Excellent! On Wed, Nov 5, 2008 at 4:29 PM, Rickard Öberg <[EMAIL PROTECTED]> wrote: > Hey, > > I have now implemented @Optional. This means that by default all method > parameters are mandatory, and any that can be null have to be marked > with @Optional. This is in contrast to before, where no assumptions were > made, and it was possible to use a @NotNull constraint to mark a > parameter as being mandatory. Since @NotNull should be the normal case > that led to a whole lot of @NotNulls, but even worse, in many cases > where it *should* be it wasn't. > > With the default being that a parameter is mandatory, this immediately > made all our API's a whole lot more strict, and a bunch of tests started > failing (fixing this was actually the bulk of the work). This was GREAT! > A lot of things were API bugs were found through this change, which is a > Good Thing! > > I also implemented this for Property, which was even more revealing. All > of a sudden ALL Properties became mandatory, with the consequence that a > whole lot of cases where Entities had been created with newEntity and > then immediately populated stopped working. This is GOOD! This avoids > the situation that the Entity is maybe not properly initiated by > accident. In a ton of places I fixed so that EntityBuilders were used, > and the state was populated to the builder rather than the entity. Much > better! > > All in all, I think this change will drastically improve the quality of > code that uses Qi4j. > > /Rickard > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev >
-- Alin Dreghiciu http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org - New Energy for Java - Domain Driven Development. http://malaysia.jayway.net - New Energy for Projects - Great People working on Great Projects at Great Places _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

