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

NullPointerException when calling getRDFType()

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Jena 2.10.1
    • Fix Version/s: Jena 2.11.0
    • Component/s: Ontology API
    • Labels:
      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

            • Assignee:
              andy Andy Seaborne
              Reporter:
              sgopalan Sriram Gopalan

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment