Skip to content

Commit 01c18c6

Browse files
committed
Fix null handling in escapeHtml method and correct constructor documentation in TranslatorTimings
1 parent 0eae577 commit 01c18c6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/java/eu/europa/ted/efx/util/EfxProfilerReportGenerator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ public static String generateProfilerReport(final EfxParser parser, final Decisi
182182
* @return HTML-escaped text
183183
*/
184184
private static String escapeHtml(String text) {
185+
if (text == null) {
186+
return "";
187+
}
185188
return text.replace("&", "&")
186189
.replace("<", "&lt;")
187190
.replace(">", "&gt;")

src/main/java/eu/europa/ted/efx/util/TranslatorTimings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class TranslatorTimings {
1111
private final long totalTimeMs;
1212

1313
/**
14-
* Creates a new TimingData instance with the specified timing measurements.
14+
* Creates a new TranslatorTimings instance with the specified timing measurements.
1515
*
1616
* @param preprocessingTimeMs Time spent in EFX preprocessing phase (milliseconds)
1717
* @param translationTimeMs Time spent in EFX translation phase (milliseconds)

0 commit comments

Comments
 (0)