[OPNFLWPLUG-580] IllegalArgumentException in statistics manager getGeneratedUUIDForNode() call Created: 08/Dec/15 Updated: 27/Sep/21 Resolved: 19/Jun/17 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Srini Seetharaman | Assignee: | Shivani Pathak |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 4738 |
| Description |
|
The current code meant to avoid NPE for the getGeneratedUUIDForNode() call leads to IllegalArgumentException because the UUID class is unhappy with string "invalid-uuid". So, might as well return null instead of doing bad workaround. Following exception was thrown on my screen. Exception in thread "pool-30-thread-1" java.lang.RuntimeException: java.lang.IllegalArgumentException: Invalid UUID string: invalid-uuid |
| Comments |
| Comment by Shivani Pathak [ 17/Dec/15 ] |
|
String passed in the fromString() method of java.util.UUID should be in a particular format to avoid the exception. ex. Hexadecimal representation of the plain string should be formatted into a UUID formatted string (standardized to 8-4-4-4-12 hex digits) and then passed to fromString() method. Instead of invalid-uuid, UUID formatted string should be passed. |
| Comment by Srini Seetharaman [ 17/Dec/15 ] |
|
When the UUID is indeed unavailable, there is no way to use a valid UUID. So, might as well return null. Here is a simple patch: https://git.opendaylight.org/gerrit/#/c/30975/ |
| Comment by Shivani Pathak [ 18/Dec/15 ] |
|
(In reply to Srini Seetharaman from comment #2) UUID (java.util.UUID) is a class name so how can it be unavailable ? |
| Comment by Shivani Pathak [ 11/Jan/16 ] |
|
Submitted a patch https://git.opendaylight.org/gerrit/32333 |
| Comment by Jozef Bacigal [ 19/Jun/17 ] |
|
He-desing won't be updated anymore. Closing |