From f9253f0b5b592443bf6734b7cd19b75db24f7def Mon Sep 17 00:00:00 2001 From: Robert Stephan Date: Wed, 15 Nov 2023 11:19:46 +0100 Subject: [PATCH] MCR-2999 cleanup code --- .../org/mycore/frontend/cli/MCRClassification2Commands.java | 3 +-- .../main/java/org/mycore/frontend/cli/MCRDerivateCommands.java | 3 +-- .../main/java/org/mycore/frontend/cli/MCRObjectCommands.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRClassification2Commands.java b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRClassification2Commands.java index 9aa8bd4a9f..506b9ac8fa 100644 --- a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRClassification2Commands.java +++ b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRClassification2Commands.java @@ -272,8 +272,7 @@ public static void export(String id, String dirname, String style) throws Except MCRCategory cl = DAO.getCategory(MCRCategoryID.rootID(id), -1); Document classDoc = MCRCategoryTransformer.getMetaDataDocument(cl, false); - Transformer trans - = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); + Transformer trans = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); String extension = MCRXSLTransformerUtils.getFileExtension(trans, "xml"); File xmlOutput = new File(dir, id + "." + extension); diff --git a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRDerivateCommands.java b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRDerivateCommands.java index ee66d2b0ff..87c07ec6f5 100644 --- a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRDerivateCommands.java +++ b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRDerivateCommands.java @@ -424,8 +424,7 @@ public static void exportWithStylesheet(String fromID, String toID, String dirna return; } - Transformer trans - = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); + Transformer trans = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); String extension = MCRXSLTransformerUtils.getFileExtension(trans, "xml"); int k = 0; diff --git a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRObjectCommands.java b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRObjectCommands.java index e2386b620d..82c7b9e13f 100644 --- a/mycore-base/src/main/java/org/mycore/frontend/cli/MCRObjectCommands.java +++ b/mycore-base/src/main/java/org/mycore/frontend/cli/MCRObjectCommands.java @@ -624,8 +624,7 @@ public static void exportWithTransformer(String id, String dirname, String trans + "The default for {3} is '{MCR.Layout.Transformer.Factory.XSLFolder}/save-object.xsl'.", order = 100) public static void exportWithStylesheet(String fromID, String toID, String dirname, String style) { - Transformer transformer - = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); + Transformer transformer = MCRCommandUtils.getTransformer(style, TRANSFORMER_CACHE); String extension = MCRXSLTransformerUtils.getFileExtension(transformer, "xml"); exportWith(fromID, toID, dirname, extension, (content, out) -> { StreamResult sr = new StreamResult(out);