[ https://issues.apache.org/jira/browse/SSHD-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16859486#comment-16859486 ]
Goldstein Lyor commented on SSHD-862: ------------------------------------- {quote} it seems to be a valid use case to pass in null? {quote} Yes, although the code tries to provide the session instance whenever possible - i.e., if invoked during a session setup it will definitely not be null. However, in some cases (as described in the documentation) there might not be any session available - e.g., when attempting to decrypt a password protected file off-line. The documentation simply indicates that if you are implementing a {{FilePasswordProvider}} then you must take into account possible _null_ as the session context. {quote} Just wonder if it can be done better and pass session context instance {quote} How is this different than what is provided currently ? Please note that {{Session}}, and therefore {{ClientSession/ServerSession}} are all extensions of the {{SessionContext}}. In other words, when not null it is likely to be one or the other. > Provide session context to FilePasswordProvider > ----------------------------------------------- > > Key: SSHD-862 > URL: https://issues.apache.org/jira/browse/SSHD-862 > Project: MINA SSHD > Issue Type: Improvement > Affects Versions: 2.1.0 > Reporter: Goldstein Lyor > Assignee: Goldstein Lyor > Priority: Major > Fix For: 2.1.1 > > > Provide the session context (if known) to the {{FilePasswordProvider}} - > e.g., decide on different behavior based on the session attributes. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org