File tree Expand file tree Collapse file tree
java/src/main/java/com/genexus Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments