mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
GUACAMOLE-362: Remove unnecessary IOException catch.
This commit is contained in:
@@ -56,13 +56,9 @@ public abstract class PrivateKeyGuacamoleProperty implements GuacamoleProperty<P
|
|||||||
FileInputStream keyStreamIn = new FileInputStream(keyFile);
|
FileInputStream keyStreamIn = new FileInputStream(keyFile);
|
||||||
ByteArrayOutputStream keyStreamOut = new ByteArrayOutputStream();
|
ByteArrayOutputStream keyStreamOut = new ByteArrayOutputStream();
|
||||||
byte[] keyBuffer = new byte[1024];
|
byte[] keyBuffer = new byte[1024];
|
||||||
try {
|
|
||||||
for (int readBytes; (readBytes = keyStreamIn.read(keyBuffer)) != -1;)
|
for (int readBytes; (readBytes = keyStreamIn.read(keyBuffer)) != -1;)
|
||||||
keyStreamOut.write(keyBuffer, 0, readBytes);
|
keyStreamOut.write(keyBuffer, 0, readBytes);
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
throw new GuacamoleServerException("IOException while trying to read bytes from file.", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
final byte[] keyBytes = keyStreamOut.toByteArray();
|
final byte[] keyBytes = keyStreamOut.toByteArray();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user