Re:Java Annotations
by toddsiegel on Saturday October 04, 2014 @12:32PM
(#8409835)
Agreed. I am impressed by OP's energy to even create such a site and go into so much detail, but put it to better use.
The article was published 5 days before the release of Java 8 - at least if my quick googling was correct. That might explain why it doesn't mention repeating annotations as a solution.
Re:Java Annotations
by icebraining on Saturday October 04, 2014 @12:58PM
(#8409892)
But the feature was in the pipeline for Java 8 since 2011[1], and there were multiple blog posts since then, like [2] and [3].
[1] http://openjdk.java.net/jeps/120
[2] http://blog.functr.com/2012/09/java-8-features-discover-repe...
http://softwarecave.org/2014/05/20/repeating-annotations-in-...
And it's clear from reading the annotation documentation that null is not a valid value. It might be surprising to some developers, but it was a conscious decision made by the spec designers. It also shouldn't be a surprise to the author that Java is smart enough to forbid you to set a null value regardless of whether it was specified directly or they used a constant:
http://stackoverflow.com/questions/1178104/error-setting-a-d...
"I hate X" piece like this do nothing to advance the discussion on language features. They only add a bunch of noise and ramp up the flamewars on both sides.