Fix neutron pagination 53/12653/4
authorRobert Varga <rovarga@cisco.com>
Fri, 7 Nov 2014 20:33:28 +0000 (21:33 +0100)
committerRobert Varga <rovarga@cisco.com>
Sat, 8 Nov 2014 10:47:51 +0000 (11:47 +0100)
commit1ffbefa16aa46547acea8fe644b27f1be0cf0c7d
tree343eb83adb208680fcfa37ba83feee44c5628aed
parent251c5c8415290d199d9dba4d4e3d5ed475435a6c
Fix neutron pagination

This patch fixes a logic mistake which results in dead code being
reported. startPos is guaranteed to be non-null by virtue of being
always assigned.

The problem is that the detection that the marker is not found is not
correct, as binarySearch() will report the negated insertion point.

Also improves performance by using a primitive type instead of an
encapsulated object.

Change-Id: I525c2070d2794b1e001465ea925d95d432feca29
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/PaginatedRequestFactory.java