[ https://issues.apache.org/jira/browse/JENA-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13679924#comment-13679924 ]
Andy Seaborne commented on JENA-468: ------------------------------------ I can't reproduce this. Could you provide a complete, minimal example? e.g. what sort of OntModel is 'model'? > 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 > {noformat} > Resource bob = model.getResource("http://example.org/bob"); > OntResource ontBob = bob.as(OntResource.class); > ontBob.getRDFType() > {noformat} > 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