From: Ian R. <ian...@gm...> - 2009-08-15 15:50:45
|
Currently, pojomatic allows static fields and methods to be annotated with @Property. While there is nothing technically wrong with this, it seems highly likely to be a programmer error. Indeed, it makes no sense to include a static in equals, and can only serve to break hashCode by allowing instances to have their hashCode change after insertion into a (key)set. At best, it could possibly make sense in a toString implementation, though I can think of no reasonable use case for that. I think we should throw an IllegalArgumentException at PojomatorImpl construction time if a static is so annotated. Thoughts? - Ian |