Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 498577

Summary: Unused parameters on default interface methods are flagged
Product: [Eclipse Project] JDT Reporter: Dave Brosius <dbrosius>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, gautier.desaintmartinlacaze
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Dave Brosius CLA 2016-07-27 09:19:51 EDT
create an interface as

public interface Foo {
  
    default void bar(Baz b) {
    }
}

class Baz {
}

Eclipse will complain that Baz b is unused, which is true, but it doesn't seem right that one would complain about a parameter in an interface, even if it were default.
Comment 1 Dave Brosius CLA 2016-07-27 09:27:31 EDT
as a corrolary, unused exceptions are also flagged, which also seems wrong.
Comment 2 Marvin Fröhlich CLA 2016-07-29 11:29:46 EDT
Just wanted to report the same. So, I can confirm this.
Comment 3 Eclipse Genie CLA 2019-01-06 14:27:39 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Marvin Fröhlich CLA 2019-01-22 03:44:24 EST
I can confirm, that the bug still persists in 2018-12.

Either unused parameters in default methods should never be complained about or at least there should be an optional exception to this compiler error/warning setting like "Ignore in default implementing interface methods" and the setting should be checked by default.