opennetworkinglab / flowvisor

FlowVisor - A network hypervisor
Other
164 stars 67 forks source link

Fixed Double to Long cast bug for nw_dst when reading config #269

Open tobias-theobald opened 10 years ago

tobias-theobald commented 10 years ago

On startup, when parsing the JSON config file where the field nw_dst is present for a flowspace rule, an exception occurs that Double can't be cast to Long. This is due to GSON parsing every number as Double and FlowSpaceImpl expecting a Long (which it could be if GSON wouldn't parse it as Double...) after taking the argument out of the HashMap. The casts of all the other values are already Double casts, so I guess someone simply forgot to change it.