Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 14630 Details for
Bug 74244
[1.5] boolean.class == Boolean.TYPE should be true
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply on HEAD on the class ClassLiteralAccess
patch_74244_2.txt (text/plain), 2.25 KB, created by
Olivier Thomann
on 2004-09-19 20:17:31 EDT
(
hide
)
Description:
Apply on HEAD on the class ClassLiteralAccess
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2004-09-19 20:17:31 EDT
Size:
2.25 KB
patch
obsolete
>Index: ClassLiteralAccess.java >=================================================================== >RCS file: /data/cvs/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java,v >retrieving revision 1.26 >diff -u -r1.26 ClassLiteralAccess.java >--- ClassLiteralAccess.java 26 Jul 2004 09:06:16 -0000 1.26 >+++ ClassLiteralAccess.java 20 Sep 2004 00:10:04 -0000 >@@ -85,8 +85,42 @@ > } > ReferenceBinding classType = scope.getJavaLangClass(); > if (classType.isGenericType()) { >- // Integer.class is of type Class<Integer> >- this.resolvedType = scope.createParameterizedType(classType, new TypeBinding[]{ targetType }, null); >+ if (targetType.isBaseType()) { >+ TypeBinding[] arguments = new TypeBinding[1]; >+ switch(targetType.id) { >+ case T_byte : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_BYTE); >+ break; >+ case T_short : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_SHORT); >+ break; >+ case T_char : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_CHARACTER); >+ break; >+ case T_int : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_INTEGER); >+ break; >+ case T_long : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_LONG); >+ break; >+ case T_float : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_FLOAT); >+ break; >+ case T_double : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_DOUBLE); >+ break; >+ case T_boolean : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_BOOLEAN); >+ break; >+ case T_void : >+ arguments[0] = (TypeBinding) scope.getTypeOrPackage(TypeConstants.JAVA_LANG_VOID); >+ break; >+ } >+ this.resolvedType = scope.createParameterizedType(classType, arguments, null); >+ } else { >+ // Integer.class is of type Class<Integer> >+ this.resolvedType = scope.createParameterizedType(classType, new TypeBinding[]{ targetType }, null); >+ } > } else { > this.resolvedType = classType; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 74244
: 14630