BUG-770: NumberFormatException for input string on switch OFPT_HELLO 89/7289/2
authorMichal Rehak <mirehak@cisco.com>
Wed, 21 May 2014 08:16:43 +0000 (10:16 +0200)
committerMichal Rehak <mirehak@cisco.com>
Wed, 21 May 2014 09:20:41 +0000 (11:20 +0200)
commitd3e6c92c1f8bf92d60c4a0ec2ee8fc734806ff5d
tree4a2fc0b682b69bf06cf8016e39fc615011721bbf
parenta31a4448ea6665317f4af41ae26d804829418c04
BUG-770: NumberFormatException for input string on switch OFPT_HELLO

DatapathId is of type uint64 and only lower 6 bytes are containign MAC address.
If the input exceeds highest positive integer (2**63-1), then parsing to long
failed.
Now it is parsed into BigInteger and only lower 8 bytes are later on used as long.

- moved unit test to test folder

Change-Id: Ie9fe78cde9fb4232209382396c2278dc029d8dca
Signed-off-by: Michal Rehak <mirehak@cisco.com>
opendaylight/md-sal/compatibility/sal-compatibility/src/main/java/org/opendaylight/controller/sal/compatibility/NodeMapping.java
opendaylight/md-sal/compatibility/sal-compatibility/src/test/java/org/opendaylight/controller/sal/compatibility/test/NodeMappingTest.java [new file with mode: 0644]