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 64450 Details for
Bug 183395
Fup of bug 144858, internal error is thrown for wrong exception type in catch clause
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_try.txt (text/plain), 2.04 KB, created by
Olivier Thomann
on 2007-04-20 11:01:35 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-04-20 11:01:35 EDT
Size:
2.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java,v >retrieving revision 1.57 >diff -u -r1.57 Argument.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java 31 Mar 2007 18:41:36 -0000 1.57 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java 20 Apr 2007 14:56:07 -0000 >@@ -100,20 +100,25 @@ > > TypeBinding exceptionType = this.type.resolveType(scope, true /* check bounds*/); > if (exceptionType == null) return null; >+ boolean hasError = false; > if (exceptionType.isBoundParameterizedType()) { > scope.problemReporter().invalidParameterizedExceptionType(exceptionType, this); >- return null; >+ hasError = true; >+ // fall thru to create the variable - avoids additional errors because the variable is missing > } > if (exceptionType.isTypeVariable()) { > scope.problemReporter().invalidTypeVariableAsException(exceptionType, this); >- return null; >+ hasError = true; >+ // fall thru to create the variable - avoids additional errors because the variable is missing > } > if (exceptionType.isArrayType() && ((ArrayBinding) exceptionType).leafComponentType == TypeBinding.VOID) { > scope.problemReporter().variableTypeCannotBeVoidArray(this); >- return null; >+ hasError = true; >+ // fall thru to create the variable - avoids additional errors because the variable is missing > } > if (exceptionType.findSuperTypeErasingTo(TypeIds.T_JavaLangThrowable, true) == null) { > scope.problemReporter().cannotThrowType(this.type, exceptionType); >+ hasError = true; > // fall thru to create the variable - avoids additional errors because the variable is missing > } > >@@ -131,6 +136,7 @@ > > scope.addLocalVariable(binding); > binding.setConstant(Constant.NotAConstant); >+ if (hasError) return null; > return exceptionType; > } >
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 183395
: 64450 |
64451