Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 383968 - [1.8][compiler] update checking of method modifiers re default methods
Summary: [1.8][compiler] update checking of method modifiers re default methods
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: BETA J8   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 382353 382354
Blocks: 380501
  Show dependency tree
 
Reported: 2012-06-30 14:14 EDT by Stephan Herrmann CLA
Modified: 2012-09-05 19:09 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2012-06-30 14:14:33 EDT
BETA_JAVA8

The introduction of default methods changes and adds some rules regarding
permissible modifiers on methods.

- admit strictfp and synchronized for default methods (bug 382353)
  (rules about static, native and final for interfaces methods are unchanged)

- report illegal combination of abstract and default (bug 382354)
Comment 1 Stephan Herrmann CLA 2012-06-30 19:01:58 EDT
AFAICS the two sub tasks bug 382353 and bug 382354 resolved all that is needed here.

Deeper analysis will happen in the context of bug 383966.
Comment 2 Stephan Herrmann CLA 2012-09-04 07:53:45 EDT
I've pushed an update via commit ad2b9e82c9aafa1082bb24fe4ac142c2def6633b to connect some loose ends:
- a clarification from bug 380194 comment 41
- one more test in AnnotationTests
- explicit link from the implementation (MethodScope.checkAndSetModifiersForMethod(..)) to the spec.
Comment 3 Stephan Herrmann CLA 2012-09-05 19:09:52 EDT
From sub-task bug 382353 comment 1:
> All tests have to be written as negative tests at this point to prevent class file verification while we don't yet have a JVM that accepts non-abstract interface methods.

In commit a99930ec8dcb92cbb9eb0aaf5469155cb8340d01 I've converted a first test into a positive test actually executing a default method. This passes on a lambda-8-b50 JRE.

Another test that still cannot run as a positive test is now tracked via bug 383608 comment 5.