Github user necouchman commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-client/pull/206#discussion_r147560607
  
    --- Diff: 
extensions/guacamole-auth-cas/src/main/java/org/apache/guacamole/auth/cas/conf/PrivateKeyGuacamoleProperty.java
 ---
    @@ -60,6 +60,7 @@ public PrivateKey parseValue(String value) throws 
GuacamoleServerException {
                 for (int readBytes; (readBytes = keyStreamIn.read(keyBuffer)) 
!= -1;)
                     keyStreamOut.write(keyBuffer, 0, readBytes);
     
    +            keyStreamIn.close();
    --- End diff --
    
    Well, that was fun.  Nested `try{}` blocks to correctly capture all of the 
possible exceptions.  I *think* this works out correctly...though it seems like 
you could still run into issues if you hit the IOException during the file 
close, but I can't really see any way to get around that.


---

Reply via email to