[
https://issues.apache.org/jira/browse/JENA-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sriram Gopalan updated JENA-468:
--------------------------------
Attachment: data.ttl
> NullPointerException when calling getRDFType()
> ----------------------------------------------
>
> Key: JENA-468
> URL: https://issues.apache.org/jira/browse/JENA-468
> Project: Apache Jena
> Issue Type: Bug
> Components: Onotology API
> Affects Versions: Jena 2.10.1
> Reporter: Sriram Gopalan
> Attachments: data.ttl
>
>
> 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
> <code>
> Resource bob = model.getResource("http://example.org/bob");
> OntResource ontBob = bob.as(OntResource.class);
> ontBob.getRDFType()
> </code>
> Upon inspection, it appears as though the code is not checking to see if the
> iterator is null, before calling the close() method
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira