Hotel-Management-Project-Java
Hotel-Management-Project-Java copied to clipboard
SF_SWITCH_NO_DEFAULT
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