[NO ISSUE] Use getClass().getName() instead of getClass().getSimpleName()
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Use getClass().getName() instead of getClass().getSimpleName()
when logging closable failures to include anonymous classes.
Change-Id: I5e6e056000f7162e00e25a3b071c6ba1156cff6b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17983
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java
index 220311e..a29a04a 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/util/CleanupUtils.java
@@ -67,7 +67,7 @@
} catch (Throwable th) { // NOSONAR Will be suppressed
try {
LOGGER.log(ExceptionUtils.causedByInterrupt(th) ? Level.DEBUG : Level.WARN,
- "Failure closing a closeable resource of class {}", writer.getClass().getSimpleName(), th);
+ "Failure closing a closeable resource of class {}", writer.getClass().getName(), th);
} catch (Throwable loggingFailure) { // NOSONAR: Ignore catching Throwable
// NOSONAR: Ignore logging failure
}
@@ -92,7 +92,7 @@
} catch (Throwable th) { // NOSONAR Will be suppressed
try {
LOGGER.log(ExceptionUtils.causedByInterrupt(th) ? Level.DEBUG : Level.WARN,
- "Failure failing " + writer.getClass().getSimpleName(), th);
+ "Failure failing " + writer.getClass().getName(), th);
} catch (Throwable loggingFailure) { // NOSONAR: Ignore catching Throwable
// NOSONAR ignore logging failure
}
@@ -119,7 +119,7 @@
} catch (Throwable th) { // NOSONAR Will be suppressed
try {
LOGGER.log(ExceptionUtils.causedByInterrupt(th) ? Level.DEBUG : Level.WARN,
- "Failure closing a closeable resource", th);
+ "Failure closing a closeable resource {}", closable.getClass().getName(), th);
} catch (Throwable loggingFailure) { // NOSONAR: Ignore catching Throwable
// NOSONAR ignore logging failure
}