This is an automated email from the ASF dual-hosted git repository.
jialiang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new ec1b8d651e AMBARI-26568: Fixing IllegalArgumentException: argument src
is null during schema upgrade (#4100)
ec1b8d651e is described below
commit ec1b8d651ecad94dfebb9cf3ffdf714c21b0b62c
Author: Basapuram Kumar <[email protected]>
AuthorDate: Tue Jan 27 13:56:59 2026 +0530
AMBARI-26568: Fixing IllegalArgumentException: argument src is null during
schema upgrade (#4100)
---
.../java/org/apache/ambari/server/stack/ThemeModule.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git
a/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
b/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
index ed13ea9fb0..17015cfd33 100644
---
a/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
+++
b/ambari-server/src/main/java/org/apache/ambari/server/stack/ThemeModule.java
@@ -58,7 +58,10 @@ public class ThemeModule extends BaseModule<ThemeModule,
ThemeInfo> implements V
try {
reader = new FileReader(themeFile);
} catch (FileNotFoundException e) {
- LOG.error("Theme file not found");
+ LOG.error("Theme file not found: {}", themeFile.getAbsolutePath());
+ setValid(false);
+ addError("Theme file not found: " + themeFile.getAbsolutePath());
+ return;
}
try {
Theme theme = mapper.readValue(reader, Theme.class);
@@ -70,6 +73,14 @@ public class ThemeModule extends BaseModule<ThemeModule,
ThemeInfo> implements V
LOG.error("Unable to parse theme file ", e);
setValid(false);
addError("Unable to parse theme file " + themeFile);
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ LOG.warn("Failed to close theme file reader", e);
+ }
+ }
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]