[ https://issues.apache.org/jira/browse/SSHD-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14367615#comment-14367615 ]
Alex Dommasch commented on SSHD-435: ------------------------------------ Oh, interesting. Where would I find more information about the new API (and also about the roadmap or planned timing for 1.0 release)? Thanks! > 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)