Uploaded image for project: 'neutron'
  1. neutron
  2. NEUTRON-54

Null Pointer Exception while converting from Boolean to boolean

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Do
    • master
    • None
    • neutron-spi
    • None
    • Operating System: All
      Platform: All

    • 3968

    Description

      in neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronNetwork.java, Null Pointer Exception while converting from Boolean to Boolean as:

      example:

      public boolean isAdminStateUp()

      { return adminStateUp; }

      //Null Pointer Exception when adminStateUp is null.

      Test Case:

      vagrant@node1:~/neutron$ cat TestA.java; javac TestA.java ; java TestA
      public class TestA {
      Boolean adminStateUp;

      public boolean isAdminStateUp()

      { return adminStateUp; }

      public static void main(String[] args) {
      TestA a = new TestA();
      if (a.isAdminStateUp())

      { System.out.println("here"); }

      }
      }
      Exception in thread "main" java.lang.NullPointerException
      at TestA.isAdminStateUp(TestA.java:5)
      at TestA.main(TestA.java:10)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ruijing.guo@intel.com Ruijing Guo
            ruijing.guo@intel.com Ruijing Guo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: