This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-tooling-support-install.git


The following commit(s) were added to refs/heads/master by this push:
     new dfc7392  releng: simplify exception handling
dfc7392 is described below

commit dfc7392cff02eb8102447d32160524cda7e222e9
Author: Konrad Windszus <[email protected]>
AuthorDate: Fri Nov 25 09:19:46 2022 +0100

    releng: simplify exception handling
---
 .../support/install/impl/InstallationResult.java     | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallationResult.java
 
b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallationResult.java
index d97894f..63e3b27 100644
--- 
a/src/main/java/org/apache/sling/tooling/support/install/impl/InstallationResult.java
+++ 
b/src/main/java/org/apache/sling/tooling/support/install/impl/InstallationResult.java
@@ -31,20 +31,14 @@ public class InstallationResult {
         this.message = message;
     }
 
-    public void render(Writer out) {
-
-        try {
-            JSONWriter writer = new JSONWriter(out);
-            writer.object();
-            writer.key("status").value(status ? "OK" : "FAILURE");
-            if (message != null) {
-                writer.key("message").value(message);
-            }
-            writer.endObject();
-        } catch (IOException e) {
-            // never happens
-            throw new RuntimeException(e);
+    public void render(Writer out) throws IOException {
+        JSONWriter writer = new JSONWriter(out);
+        writer.object();
+        writer.key("status").value(status ? "OK" : "FAILURE");
+        if (message != null) {
+            writer.key("message").value(message);
         }
+        writer.endObject();
     }
 
 }

Reply via email to