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 23596 Details for
Bug 94759
[1.5][compiler] @Override doesn't report an error inside interface when specified for clone() method
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for MethodDeclaration
94759.txt (text/plain), 1.80 KB, created by
Philipe Mulet
on 2005-06-21 04:27:24 EDT
(
hide
)
Description:
Patch for MethodDeclaration
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2005-06-21 04:27:24 EDT
Size:
1.80 KB
patch
obsolete
>Index: MethodDeclaration.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java,v >retrieving revision 1.48 >diff -u -r1.48 MethodDeclaration.java >--- MethodDeclaration.java 30 May 2005 15:53:25 -0000 1.48 >+++ MethodDeclaration.java 21 Jun 2005 08:26:42 -0000 >@@ -135,16 +135,17 @@ > } > > // check @Override annotation >- if (this.binding != null) { >+ checkOverride: { >+ if (this.binding == null) break checkOverride; >+ if (scope.compilerOptions().sourceLevel < JDK1_5) break checkOverride; > int bindingModifiers = this.binding.modifiers; >- if ((this.binding.tagBits & TagBits.AnnotationOverride) != 0 >- && (bindingModifiers & AccOverriding) == 0) { >- // claims to override, and doesn't actually do so >- scope.problemReporter().methodMustOverride(this); >- } else if ((this.binding.tagBits & TagBits.AnnotationOverride) == 0 >- && (this.binding.declaringClass.modifiers & AccInterface) == 0 >- && (bindingModifiers & (AccStatic|AccOverriding)) == AccOverriding >- && scope.compilerOptions().sourceLevel >= JDK1_5) { >+ boolean hasOverrideAnnotation = (this.binding.tagBits & TagBits.AnnotationOverride) != 0; >+ boolean isInterfaceMethod = this.binding.declaringClass.isInterface(); >+ if (hasOverrideAnnotation) { >+ if ((bindingModifiers & AccOverriding) == 0 || isInterfaceMethod) >+ // claims to override, and doesn't actually do so >+ scope.problemReporter().methodMustOverride(this); >+ } else if (!isInterfaceMethod && (bindingModifiers & (AccStatic|AccOverriding)) == AccOverriding) { > // actually overrides, but did not claim to do so > scope.problemReporter().missingOverrideAnnotation(this); > }
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 94759
: 23596 |
23597