You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2022/07/01 13:22:58 UTC

[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #230: [SSHD-1273] Add support to use env vars together with subsystem

tomaswolf commented on code in PR #230:
URL: https://github.com/apache/mina-sshd/pull/230#discussion_r911959262


##########
sshd-core/src/main/java/org/apache/sshd/client/channel/PtyCapableChannelSession.java:
##########
@@ -200,21 +200,6 @@ public void setPtyModes(Map<PtyMode, Integer> ptyModes) {
         config.setPtyModes((ptyModes == null) ? Collections.emptyMap() : ptyModes);
     }
 
-    /**
-     * @param  key   The (never {@code null}) key (Note: may be empty...)
-     * @param  value The value to set - if {@code null} then the pre-existing value for the key (if any) is
-     *               <U>removed</U>.
-     * @return       The replaced/removed previous value - {@code null} if no previous value set for the key.
-     */
-    public Object setEnv(String key, Object value) {
-        ValidateUtils.checkNotNull(key, "No key provided");
-        if (value == null) {
-            return env.remove(key);
-        } else {
-            return env.put(key, value);
-        }
-    }
-

Review Comment:
   Also remove the map in line 88.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org