lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <>
Subject Whitespace inside Generics parameters
Date Sat, 17 Oct 2009 10:55:32 GMT
Just because I came along a lot of new Generics declarations:
How should we handle generics parameters in the source code? There are more

1. Map<ClassA, ClassB>
2. Map <ClassA, ClassB>
3. Map<ClassA,ClassB>

Sun's Java code in src.jar of their JDK always uses (3)[only in some special
cases, when it gets complicated, like when ? and generics inside generics
are used), which I also prefer and I used it that way during my last
patches. But e.g. Kay Kay used (1) in his original patches (I also
transformed it to 3).

I prefer (3) because the generics are not like function parameters and are
itself only identifiers never expressions (they are more annotations to the
class name) and in my opinion are part of the class name used. Because of
that, there is also no space between base class and "<". As it is part of
the declaration and the type itsself, it should be compact.

Other opinions?

+1 for (3) from my side

Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message