Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 384815 - [1.8] strictfp and synchronized should be allowed for interface methods
Summary: [1.8] strictfp and synchronized should be allowed for interface methods
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 380501
  Show dependency tree
 
Reported: 2012-07-11 06:13 EDT by Ayushman Jain CLA
Modified: 2012-07-11 06:42 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 Ayushman Jain CLA 2012-07-11 06:13:32 EDT
BETA_JAVA8

interface I {
	strictfp void meth();
}

According to the (new) JLS 9.5,
The effect of the strictfp modifier is to make all float or double expressions within the method body be explicitly FP-strict (15.4).

The previous sentence mimics 8.4.3.5.
A synchronized method acquires the monitor (17.1) associated with this (the object for which the method was invoked) before it executes.
Comment 1 Ayushman Jain CLA 2012-07-11 06:14:14 EDT
Once again, grammar looks ok. Should be allowed during semantic analysis. I can take a look
Comment 2 Ayushman Jain CLA 2012-07-11 06:24:38 EDT
My Bad. I forgot to add the 'default' keyword
 strictfp void meth() default {} is allowed so everything looks ok

Closing as INVALID.
Comment 3 Srikanth Sankaran CLA 2012-07-11 06:42:14 EDT
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=382353 && 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=383968

BTW, the root bug for default methods is bug 380501, this is
tracked separately since default methods have no real connection
to lambda expressions and references (other than enabling it)