Isn’t this checkstyle’s default? In general when I coded the first checkstyle.xml I tried
to follow the default as much as possible since the checkstyle’s team has usually defined
sensible defaults after comparing various projects.
Are you sure we’re checking this in checkstyle btw? I’m asking because I remember using it
without spaces recently and checkstyle not complaining
Otherwise I’m +0 to change it (where is it defined?).
Thanks
-Vincent
On 18 Jul 2014 at 18:38:41, Sergiu Dumitriu (sergiu@xwiki.org(mailto:sergiu@xwiki.org))
wrote:
Hi devs,
The current codestyle for wildcard type parameters is to use spaces
around it, as in:
List< ? >
Map< ? , ? >
Map
As opposed to specific parameters:
List
List
Map
Map
This might have a historical reason, when we defined the codestyle,
Eclipse couldn't make the difference between "?" as a wildcard type and
"?" as the ternary operator.
The standard Java, Eclipse, and IDEA style conventions don't use the
extra space.
Personally, I don't think that the wildcard needs the extra space, so +1
for this change.
--
Sergiu Dumitriu
http://purl.org/net/sergiu