Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-JSR-6
-
Fix Version/s: 1.5.2
-
Component/s: command line processing
-
Labels:None
-
Environment:Win XP, JDK1.5.0_06, JSR-06
-
Number of attachments :
Description
A method declarator in an interface may include one or more default parameters.
These defaults should apply to only the parameters at the end of the parameter list.
JSR-06 permits them to appear anywhere.
Question: Do defaults in interfaces make sense? Could a class implementing the interface
offer a different default value? This leads to ambiguity.
offering a different default value is possible. But default args shouldn't be allowed in interfaces. It should generate non-abstract instance methods, which is not alllowed to do in an interface. So default args musn't be allowed for interfaces if the method is not static