mirror of https://github.com/apache/cloudstack.git
CS-15778: Fetching thumbnail modified with review comments
This commit is contained in:
parent
fc8b7210c2
commit
8a86b4f555
|
|
@ -80,9 +80,10 @@ public class ConsoleProxyAjaxImageHandler implements HttpHandler {
|
|||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
key = Integer.parseInt(keyStr);
|
||||
} catch (NumberFormatException e) {
|
||||
try {
|
||||
if (keyStr != null)
|
||||
key = Integer.parseInt(keyStr);
|
||||
} catch (NumberFormatException e) {
|
||||
s_logger.warn("Invalid numeric parameter in query string: " + keyStr);
|
||||
throw new IllegalArgumentException(e);
|
||||
}
|
||||
|
|
@ -97,9 +98,9 @@ public class ConsoleProxyAjaxImageHandler implements HttpHandler {
|
|||
param.setClientTunnelSession(console_host_session);
|
||||
|
||||
ConsoleProxyClient viewer = ConsoleProxy.getVncViewer(param);
|
||||
AjaxFIFOImageCache imageCache =viewer.getAjaxImageCache();
|
||||
AjaxFIFOImageCache imageCache = viewer.getAjaxImageCache();
|
||||
|
||||
byte[] img = imageCache.getImage(0);
|
||||
byte[] img = imageCache.getImage(key);
|
||||
|
||||
if(img != null) {
|
||||
Headers hds = t.getResponseHeaders();
|
||||
|
|
|
|||
Loading…
Reference in New Issue