Skip to content

Commit e1011e8

Browse files
Discarded changes in getGXFile method
1 parent ec43290 commit e1011e8

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,17 @@ private static BufferedImage createBufferedImageFromURI(String filePathOrUrl) th
3636
log.error("Failed to read image stream: " + filePathOrUrl);
3737
throw e;
3838
} finally {
39-
if (is != null) {
40-
try {
41-
is.close();
42-
} catch (IOException e) {
43-
log.error("Failed to close the input stream: " + is);
44-
throw e;
45-
}
39+
try {
40+
if (is != null) { is.close(); }
41+
} catch (IOException e) {
42+
log.error("Failed to close the input stream: " + is);
43+
throw e;
4644
}
4745
}
4846
}
4947

5048
private static GXFile getGXFile(String filePathOrUrl) {
5149
String basePath = (com.genexus.ModelContext.getModelContext() != null) ? com.genexus.ModelContext.getModelContext().getHttpContext().getDefaultPath(): "";
52-
String environmentName = basePath.substring(basePath.lastIndexOf("\\") + 1);
53-
if (filePathOrUrl.substring(1).startsWith(environmentName)) {
54-
filePathOrUrl = filePathOrUrl.substring(environmentName.length() + 2);
55-
}
5650
return new GXFile(basePath, filePathOrUrl, ResourceAccessControlList.Default, GxFileInfoSourceType.Unknown);
5751
}
5852

0 commit comments

Comments
 (0)