Bug 575268

Summary: Unlikely argument type - false positive with bounded type parameters
Product: [Eclipse Project] JDT Reporter: Jakub Holotík <holotikj>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 4.20   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Jakub Holotík CLA 2021-08-05 22:58:17 EDT
When using bounded type parameters, the unlikely argument check gives false positives:

Code with warning:
public <T extends Comparable<String> & Serializable> void method(T param) {
    Serializable test = null;
    if (param.equals(test)) {
      
    }
  }

Code without warning:
public <T extends Serializable & Comparable<String>> void method(T param) {
    Serializable test = null;
    if (param.equals(test)) {
      
    }
  }
Comment 1 Eclipse Genie CLA 2023-07-27 06:52:54 EDT
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.