[BGPCEP-1003] NPEs are meaningful on JDK17+ Created: 06/Apr/22  Updated: 07/Apr/22  Resolved: 07/Apr/22

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: None
Fix Version/s: 0.17.1

Type: Task Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Java 17

 Description   

This is biting openjdk17 verify jobs in bgp-parser-impl:

[ERROR] testParseEmptyIpv4Attribute  Time elapsed: 0.005 s  <<< FAILURE!
java.lang.AssertionError: expected null, but was:<Cannot invoke "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.ipv4.next.hop._case.Ipv4NextHop.getGlobal()" because the return value of "org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv4NextHopCase.getIpv4NextHop()" is null>
        at org.junit.Assert.fail(Assert.java:89)
        at org.junit.Assert.failNotNull(Assert.java:756)
        at org.junit.Assert.assertNull(Assert.java:738)
        at org.junit.Assert.assertNull(Assert.java:748)
        at org.opendaylight.protocol.bgp.parser.impl.message.update.NextHopAttributeParserTest.testParseEmptyIpv4Attribute(NextHopAttributeParserTest.java:85)

The problem is that we have Helpful NullPointerExceptions in place, hence the message is not null.


Generated at Wed Feb 07 19:14:44 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.