CS-15778: Fetching thumbnail modified with review comments

This commit is contained in:
Rajesh Battala 2012-08-17 12:40:50 +05:30
parent fc8b7210c2
commit 8a86b4f555
1 changed files with 6 additions and 5 deletions

View File

@ -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();