Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.1 M2
-
Fix Version/s: 1.1 M3
-
Component/s: XML code generator
-
Labels:None
-
Number of attachments :
Description
Summary says it all.
I much prefer
if (jType.isPrimitive()) {
over
if (jType instanceof JPrimitiveType) {
because the former communicates intent and the second communicates only membership. That is, with the second, we cannot transparently have another type return isPrimitive() true. Thus, changes to the concept of isPrimitive are no longer encapsulated.
I don't like the idea of making this sort of change just to make a checkstyle warning go away.