Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-468

NullPointerException when calling getRDFType()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Jena 2.10.1
    • Jena 2.11.0
    • Ontology API
    • None

    Description

      When I run the following code snippet after having loaded the attached ttl file, I get a NullPointerException @ com.hp.hpl.jena.ontology.impl.OntResourceImpl#getRDFType(boolean direct) - Line 833

      Resource bob = model.getResource("http://example.org/bob");
      OntResource ontBob = bob.as(OntResource.class);
      ontBob.getRDFType()
      

      Upon inspection, it appears as though the code is not checking to see if the iterator is null, before calling the close() method

      Attachments

        1. data.ttl
          0.4 kB
          Sriram Gopalan

        Activity

          People

            andy Andy Seaborne
            sgopalan Sriram Gopalan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: