Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SF_SWITCH_NO_DEFAULT #41

Open
marcoym2 opened this issue Aug 15, 2023 · 0 comments
Open

SF_SWITCH_NO_DEFAULT #41

marcoym2 opened this issue Aug 15, 2023 · 0 comments

Comments

@marcoym2
Copy link

marcoym2 commented Aug 15, 2023

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 marcoym2 changed the title DM_DEFAULT_ENCODING SF_SWITCH_NO_DEFAULT Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant