Skip to content

Commit 86487bb

Browse files
author
tomas-sexenian
committed
fixed cherry pick issue
1 parent 8423020 commit 86487bb

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

java/src/main/java/com/genexus/GxImageUtil.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,13 @@ private static BufferedImage createBufferedImageFromURI(String filePathOrUrl) th
2525
{
2626
IHttpContext httpContext = com.genexus.ModelContext.getModelContext().getHttpContext();
2727
InputStream is = null;
28-
try{
29-
if (filePathOrUrl.toLowerCase().startsWith("http://") || filePathOrUrl.toLowerCase().startsWith("https://") ||
30-
(httpContext.isHttpContextWeb() && filePathOrUrl.startsWith(httpContext.getContextPath())))
31-
is = new URL(GXDbFile.pathToUrl( filePathOrUrl, httpContext)).openStream();
32-
else
33-
IHttpContext httpContext = com.genexus.ModelContext.getModelContext().getHttpContext();
34-
InputStream is = null;
3528
try{
3629
if (filePathOrUrl.toLowerCase().startsWith("http://") || filePathOrUrl.toLowerCase().startsWith("https://") ||
3730
(httpContext.isHttpContextWeb() && filePathOrUrl.startsWith(httpContext.getContextPath())))
3831
is = new URL(GXDbFile.pathToUrl( filePathOrUrl, httpContext)).openStream();
3932
else
4033
is = getGXFile(filePathOrUrl).getStream();
4134
return ImageIO.read(is);
42-
} catch (IOException e) {
4335
} catch (IOException e) {
4436
log.error("Failed to read image stream: " + filePathOrUrl);
4537
throw e;

0 commit comments

Comments
 (0)