Skip to content

Commit ddaaf14

Browse files
Do not log as error exception that is probably always thrown intentio… (#786)
* Do not log as error exception that is probably always thrown intentionally Issue:105322 * GXReport output strem is always null * Remove try-catch block
1 parent b6b07a5 commit ddaaf14

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

java/src/main/java/com/genexus/reports/GXReport.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,14 @@ public IReportHandler getPrinter()
7171
}
7272
else if (getOutputType() == OUTPUT_PDF)
7373
{
74-
try {
75-
String implementation = com.genexus.Application.getClientContext().getClientPreferences().getPDF_RPT_LIBRARY();
76-
if (implementation.equals("ITEXT"))
77-
reportHandler = new PDFReportItext2(context);
78-
else if (implementation.equals("ITEXT8"))
79-
reportHandler = new PDFReportItext8(context);
80-
else
81-
reportHandler = new PDFReportPDFBox(context);
82-
((GXReportPDFCommons) reportHandler).setOutputStream(getOutputStream());
83-
} catch (Exception e) {
84-
log.error("Failed to set output stream: ", e);
85-
}
74+
String implementation = com.genexus.Application.getClientContext().getClientPreferences().getPDF_RPT_LIBRARY();
75+
if (implementation.equals("ITEXT"))
76+
reportHandler = new PDFReportItext2(context);
77+
else if (implementation.equals("ITEXT8"))
78+
reportHandler = new PDFReportItext8(context);
79+
else
80+
reportHandler = new PDFReportPDFBox(context);
81+
((GXReportPDFCommons) reportHandler).setOutputStream(getOutputStream());
8682
}
8783
else {
8884
throw new RuntimeException("Unrecognized report type: " + getOutputType());
@@ -139,7 +135,7 @@ protected int getOutputType() {
139135
}
140136

141137
protected java.io.OutputStream getOutputStream() {
142-
throw new RuntimeException("Output stream not set");
138+
return null;
143139
}
144140

145141
//M�todos para la implementaci�n de reportes din�micos

0 commit comments

Comments
 (0)