You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Goldstein Lyor (JIRA)" <ji...@apache.org> on 2016/02/14 19:23:18 UTC

[jira] [Resolved] (SSHD-435) internal NPE when trying to sendStatus, sparse feedback as to root cause

     [ https://issues.apache.org/jira/browse/SSHD-435?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Goldstein Lyor resolved SSHD-435.
---------------------------------
    Resolution: Won't Fix

> internal NPE when trying to sendStatus, sparse feedback as to root cause
> ------------------------------------------------------------------------
>
>                 Key: SSHD-435
>                 URL: https://issues.apache.org/jira/browse/SSHD-435
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 0.14.0
>            Reporter: Alex Dommasch
>         Attachments: BugTest.java
>
>
> When trying to implement a virtual FileSystemView with the SftpSubsystem, there is a corner case that gives very little feedback as to the root cause.  Namely, if, within a directory listing, one of the SshFile entries returns false for doesExist, and null for getAbsolutePath, there is an internal NullPointerException when trying to generate the response.  (When doesExist is false, a FileNotFoundException is thrown by writeAttrs, with getAbsolutePath used as the message.  But sendStatus wrongly assumes e.getMessage() is non-null, triggering a NullPointerException in putString, obscuring the root cause.)
> A few possible suggestions:
> * guard code to handle this corner case without internal exceptions
> * further documentation on implementation requirements for a virtual file system (what needs to be implemented under which circumstances)
> * fail fast, with a helpful message, when an implementation fails to uphold a documented contract.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)