You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/25 10:28:00 UTC

[jira] [Commented] (JENA-1405) Possible NPE in AdaptorFileManager

    [ https://issues.apache.org/jira/browse/JENA-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16218371#comment-16218371 ] 

ASF GitHub Bot commented on JENA-1405:
--------------------------------------

GitHub user rvesse opened a pull request:

    https://github.com/apache/jena/pull/294

    Fix and tests for possible NPE (JENA-1405)

    Fixes a possible NPE in AdaptorFileManager by aligning its behaviour
    with FileManager to throw NotFoundException
    
    Adds specific tests for these cases

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rvesse/jena JENA-1405

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/jena/pull/294.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #294
    
----
commit 643bd7a944e23554d21d1f01c207fe7e1a3d3098
Author: Rob Vesse <rv...@apache.org>
Date:   2017-10-25T10:26:37Z

    Fix and tests for possible NPE (JENA-1405)
    
    Fixes a possible NPE in AdaptorFileManager by aligning its behaviour
    with FileManager to throw NotFoundException
    
    Adds specific tests for these cases

----


> Possible NPE in AdaptorFileManager
> ----------------------------------
>
>                 Key: JENA-1405
>                 URL: https://issues.apache.org/jira/browse/JENA-1405
>             Project: Apache Jena
>          Issue Type: Bug
>    Affects Versions: Jena 3.4.0
>            Reporter: Rob Vesse
>            Assignee: Rob Vesse
>            Priority: Minor
>
> Encountered this after updating an old test harness to the latest libraries:
> {noformat}
> Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:288)
> 	at org.apache.jena.util.FileManager.loadModelWorker(FileManager.java:305)
> 	at org.apache.jena.util.FileManager.loadModel(FileManager.java:258)
> 	at org.apache.jena.util.junit.Manifest.<init>(Manifest.java:55)
> 	at org.apache.jena.util.junit.TestFactoryManifest.oneManifest(TestFactoryManifest.java:46)
> 	at org.apache.jena.util.junit.TestFactoryManifest.oneManifest(TestFactoryManifest.java:62)
> 	at org.apache.jena.util.junit.TestFactoryManifest.process(TestFactoryManifest.java:38)
> 	at com.cray.km.arq.suites.CqeTestFactory.make(CqeTestFactory.java:62)
> 	at com.cray.km.arq.suites.ReducedDAWGSuite.<init>(ReducedDAWGSuite.java:62)
> 	at com.cray.km.arq.suites.ReducedDAWGSuite.suite(ReducedDAWGSuite.java:42)
> 	at com.cray.km.arq.TestDAWG.suite(TestDAWG.java:55)
> 	at com.cray.km.arq.TestDAWG.main(TestDAWG.java:46)
> {noformat}
> The NPE occurs because the Code fails to check that the input stream isn't {{null}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)