- 
    CSR 
- 
    Resolution: Approved
- 
     P3 P3
- 
    None
- 
        behavioral
- 
        minimal
- 
        
- 
        Java API
- 
        SE
Summary
MemoryLayout and MemorySegment contain redundant default methods.
Problem
MemoryLayout and MemorySegment declare several default methods. Since these interfaces are sealed, and cannot be implemented by user code, there is no advantage to use a default method instead of an ordinary abstract method. Moreover, default method in interface cause change in interface initialization, as per JVMS 5.5. For this reason, it would be better to avoid adding default methods where not strictly required.
Solution
The solution is to remove the default keyword from the methods in MemorySegment and MemoryLayout and move the corresponding method bodies in the implementation classes AbstractMemorySegmentImpl and AbstractLayoutImpl, respectively.
Specification
- csr of
- 
                    JDK-8318324 Drop redundant default methods from FFM API -           
- Resolved
 
-