[ 
https://issues.apache.org/jira/browse/JCLOUDS-1338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ignasi Barrera updated JCLOUDS-1338:
------------------------------------
    Description: 
ProvisionableToImage.is64Bit has some odd switch logic.  Should the CDROM case 
fall through to HDD?  Found via error-prone:

{code}
private boolean is64Bit(String from, org.jclouds.profitbricks.domain.Image.Type 
type) {
   switch (type) {
      case CDROM:
         if (!Strings.isNullOrEmpty(from))
            return from.matches("x86_64|amd64");
      case HDD: // HDD provided by ProfitBricks are always 64-bit
      default:
         return true;
   }
}
{code}

  was:
ProvisionableToImage.is64Bit has some odd switch logic.  Should the CDROM case 
fall through to HDD?  Found via error-prone:

{code:java}
      private boolean is64Bit(String from, 
org.jclouds.profitbricks.domain.Image.Type type) {
         switch (type) {
            case CDROM:
               if (!Strings.isNullOrEmpty(from))
                  return from.matches("x86_64|amd64");
            case HDD: // HDD provided by ProfitBricks are always 64-bit
            default:
               return true;
         }
      }
{code:java}


> Profitbricks switch fallthrough
> -------------------------------
>
>                 Key: JCLOUDS-1338
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1338
>             Project: jclouds
>          Issue Type: New Feature
>          Components: jclouds-compute
>    Affects Versions: 2.0.2
>            Reporter: Andrew Gaul
>            Assignee: Reijhanniel Jearl Campos
>            Priority: Minor
>              Labels: profitbricks
>
> ProvisionableToImage.is64Bit has some odd switch logic.  Should the CDROM 
> case fall through to HDD?  Found via error-prone:
> {code}
> private boolean is64Bit(String from, 
> org.jclouds.profitbricks.domain.Image.Type type) {
>    switch (type) {
>       case CDROM:
>          if (!Strings.isNullOrEmpty(from))
>             return from.matches("x86_64|amd64");
>       case HDD: // HDD provided by ProfitBricks are always 64-bit
>       default:
>          return true;
>    }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to