You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Sriram Gopalan (JIRA)" <ji...@apache.org> on 2013/06/07 01:26:20 UTC
[jira] [Updated] (JENA-468) NullPointerException when calling
getRDFType()
[ 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