Minor nit, can you add a space in line 221 between
"BigInteger,BlindingParameters"
[and Max replied]
I thought the formal style is no-space. At least in Map.java it's
public interface Map<K,V>.
I'm not familiar with any formal style. The original Java code
conventions doc [1] hasn't been updated since 1999 and so doesn't cover
generics. I didn't see a more recent version.
I'm not aware of one either.
The code base isn't consistent. I found about 3,000 uses of Map<...,...>
in the JDK, and about 1,800 of those had a space after the comma and
about 1,200 did not.To my eye it seems that single-letter type
parameters such as Map<K,V> tend not to have the space whereas type
parameters that name actual types, e.g. Map<String, Element> tend to
have the space in there. However, the code base isn't consistent on that
either.
I'm happy to change the code to <BigInteger, BlindingParameters> though.
[1] http://www.oracle.com/technetwork/java/codeconv-138413.html
Apparently we had the same idea to ask Alex Buckley, which you've
summarized pretty well above. I'm ok with either, probably a slight
preference for the space given the discussion above.
Not having a lot of experience yet with <>, the only ones I wasn't
sure about
were the ones in X509Factor.parseX509orPKCS7Cert. (line 415 & 425) I
assume it
just picks up the outer return type?
[and Max replied]
I read the byte codes generated, and the parameters on lines 415 and
425 are not used. Maybe they are good for code readability.
>
Recall that generics are implemented by erasure, so no type parameters
will end up in the bytecodes in any case.
Yes of course, but this being the first instance of seeing this
construct, I had to stop and think about it a bit.
I'll have to parse the rest of this discussion when we're back. I still
have some support issues to deal with before I can go home tonight.
Brad