src/share/classes/com/sun/tools/javac/model/JavacTypes.java

changeset 1853
831467c4c6a7
parent 1645
97f6839673d6
child 2050
09301757bb32
equal deleted inserted replaced
1852:bf020de5a6db 1853:831467c4c6a7
137 if (t.getKind() != TypeKind.DECLARED) 137 if (t.getKind() != TypeKind.DECLARED)
138 throw new IllegalArgumentException(t.toString()); 138 throw new IllegalArgumentException(t.toString());
139 Type unboxed = types.unboxedType((Type) t); 139 Type unboxed = types.unboxedType((Type) t);
140 if (! unboxed.isPrimitive()) // only true primitives, not void 140 if (! unboxed.isPrimitive()) // only true primitives, not void
141 throw new IllegalArgumentException(t.toString()); 141 throw new IllegalArgumentException(t.toString());
142 return unboxed; 142 return (PrimitiveType)unboxed;
143 } 143 }
144 144
145 public TypeMirror capture(TypeMirror t) { 145 public TypeMirror capture(TypeMirror t) {
146 validateTypeNotIn(t, EXEC_OR_PKG); 146 validateTypeNotIn(t, EXEC_OR_PKG);
147 return types.capture((Type) t); 147 return types.capture((Type) t);

mercurial