Hotel-Management-Project-Java icon indicating copy to clipboard operation
Hotel-Management-Project-Java copied to clipboard

SF_SWITCH_NO_DEFAULT

Open marcoym2 opened this issue 2 years ago • 0 comments

report name: DM_DEFAULT_ENCODING description:

To reproduce: Eclipse development env: SpotBugs Expected Behavior: Should have a default for the following code:

Food(int itemno,int quantity) {

  this.itemno=itemno;
    this.quantity=quantity;
    switch(itemno)v
    {
        case 1:price=quantity*50;
            break;
        case 2:price=quantity*60;
            break;
        case 3:price=quantity*70;
            break;
        case 4:price=quantity*30;
            break;
    }
}

}

enviorment: eclipse env: Possible solution: shoulde have default for the code above Impact: low Severity: low

marcoym2 avatar Aug 15 '23 16:08 marcoym2