From 8d9e1db8f27a1970ad602a3bfecc757ec13d9e7e Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 8 Jul 2024 14:25:42 +0200 Subject: [PATCH] Fix some ugly shit --- .../base/data/versioning/FourNumberVersioningSystem.java | 3 ++- .../base/data/versioning/SemanticVersioningSystem.java | 3 ++- .../data/versioning/StarOpenSourceVersioningSystem.java | 3 ++- .../base/data/versioning/ThreeNumberVersioningSystem.java | 3 ++- .../base/data/versioning/TwoNumberVersioningSystem.java | 3 ++- .../sosengine/base/internal/placeholders/JvmArguments.java | 6 ++++-- .../base/internal/placeholders/JvmImplementationName.java | 6 ++++-- .../base/internal/placeholders/JvmImplementationVendor.java | 6 ++++-- .../internal/placeholders/JvmImplementationVersion.java | 6 ++++-- .../sosengine/base/internal/placeholders/JvmJava.java | 6 ++++-- .../sosengine/base/internal/placeholders/JvmUptime.java | 6 ++++-- .../internal/placeholders/crashhandler/IssuerClass.java | 6 ++++-- .../internal/placeholders/crashhandler/IssuerCodePart.java | 6 ++++-- .../base/internal/placeholders/crashhandler/IssuerInfo.java | 6 ++++-- .../internal/placeholders/crashhandler/IssuerMessage.java | 6 ++++-- .../internal/placeholders/crashhandler/IssuerPackage.java | 6 ++++-- .../base/internal/placeholders/crashhandler/IssuerPath.java | 6 ++++-- .../base/internal/placeholders/crashhandler/Stacktrace.java | 6 ++++-- .../base/internal/placeholders/logger/LogClass.java | 6 ++++-- .../base/internal/placeholders/logger/LogCodePart.java | 6 ++++-- .../base/internal/placeholders/logger/LogColorPrimary.java | 6 ++++-- .../internal/placeholders/logger/LogColorSecondary.java | 6 ++++-- .../base/internal/placeholders/logger/LogInfo.java | 6 ++++-- .../base/internal/placeholders/logger/LogLevel.java | 6 ++++-- .../base/internal/placeholders/logger/LogMessage.java | 6 ++++-- .../base/internal/placeholders/logger/LogPackage.java | 6 ++++-- .../base/internal/placeholders/logger/LogPath.java | 6 ++++-- 27 files changed, 98 insertions(+), 49 deletions(-) diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/FourNumberVersioningSystem.java b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/FourNumberVersioningSystem.java index 2009d1f4..b0d87a7b 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/FourNumberVersioningSystem.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/FourNumberVersioningSystem.java @@ -88,8 +88,9 @@ public final class FourNumberVersioningSystem implements VersioningSystem { private final int number4; /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "n4"; } diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/SemanticVersioningSystem.java b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/SemanticVersioningSystem.java index b7cc1e6e..e5df3ac6 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/SemanticVersioningSystem.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/SemanticVersioningSystem.java @@ -107,8 +107,9 @@ public final class SemanticVersioningSystem implements VersioningSystem { private final int build; /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "Semantic"; } diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/StarOpenSourceVersioningSystem.java b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/StarOpenSourceVersioningSystem.java index b4119947..63e79528 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/StarOpenSourceVersioningSystem.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/StarOpenSourceVersioningSystem.java @@ -107,8 +107,9 @@ public final class StarOpenSourceVersioningSystem implements VersioningSystem { private final String fork; /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "StarOpenSource"; } diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/ThreeNumberVersioningSystem.java b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/ThreeNumberVersioningSystem.java index bdaac636..c9b4fb0e 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/ThreeNumberVersioningSystem.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/ThreeNumberVersioningSystem.java @@ -75,8 +75,9 @@ public final class ThreeNumberVersioningSystem implements VersioningSystem { private final int number3; /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "n3"; } diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/TwoNumberVersioningSystem.java b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/TwoNumberVersioningSystem.java index 741adb25..ac1936f8 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/versioning/TwoNumberVersioningSystem.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/versioning/TwoNumberVersioningSystem.java @@ -62,8 +62,9 @@ public final class TwoNumberVersioningSystem implements VersioningSystem { private final int number2; /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "n2"; } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmArguments.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmArguments.java index c6c7b2ea..85176a3d 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmArguments.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmArguments.java @@ -39,14 +39,16 @@ public final class JvmArguments implements Placeholder { public JvmArguments() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_arguments"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { StringBuilder arguments = new StringBuilder(); for (String argument : JvmInformation.getArguments()) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationName.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationName.java index 614cb6d2..6e6cb2b2 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationName.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationName.java @@ -39,14 +39,16 @@ public final class JvmImplementationName implements Placeholder { public JvmImplementationName() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_implementation_name"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", JvmInformation.getImplementationName()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVendor.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVendor.java index 435f1d85..4cf2c8e4 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVendor.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVendor.java @@ -39,14 +39,16 @@ public final class JvmImplementationVendor implements Placeholder { public JvmImplementationVendor() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_implementation_vendor"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", JvmInformation.getImplementationVendor()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVersion.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVersion.java index 02f99ea2..426f905c 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVersion.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmImplementationVersion.java @@ -39,14 +39,16 @@ public final class JvmImplementationVersion implements Placeholder { public JvmImplementationVersion() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_implementation_version"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", JvmInformation.getImplementationVersion()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmJava.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmJava.java index 01b0caef..2c61b41e 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmJava.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmJava.java @@ -39,14 +39,16 @@ public final class JvmJava implements Placeholder { public JvmJava() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_java"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", String.valueOf(JvmInformation.getJavaVersion())); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmUptime.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmUptime.java index edb65395..9d40905a 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmUptime.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/JvmUptime.java @@ -39,14 +39,16 @@ public final class JvmUptime implements Placeholder { public JvmUptime() {} /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "jvm_uptime"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", String.valueOf(JvmInformation.getUptime())); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerClass.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerClass.java index 1539b772..35f417fd 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerClass.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerClass.java @@ -50,14 +50,16 @@ public final class IssuerClass implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_class"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getName().replace(logIssuer.getClazz().getPackageName() + ".", "")); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerCodePart.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerCodePart.java index 9d66e2bd..12990c73 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerCodePart.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerCodePart.java @@ -50,14 +50,16 @@ public final class IssuerCodePart implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_code_part"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getCodePart().name()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerInfo.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerInfo.java index b7fc4eae..3950d06b 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerInfo.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerInfo.java @@ -50,14 +50,16 @@ public final class IssuerInfo implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_info"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { if (logIssuer.getAdditionalInformation() == null) return text.replace("%" + getName() + "%", ""); else diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerMessage.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerMessage.java index bbdebb73..accdd942 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerMessage.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerMessage.java @@ -49,14 +49,16 @@ public final class IssuerMessage implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_message"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", message); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPackage.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPackage.java index f33bebf5..bbbf9164 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPackage.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPackage.java @@ -50,14 +50,16 @@ public final class IssuerPackage implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_package"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getPackageName()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPath.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPath.java index 6e334821..159411a4 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPath.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/IssuerPath.java @@ -50,14 +50,16 @@ public final class IssuerPath implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "issuer_path"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getName()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/Stacktrace.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/Stacktrace.java index c3b0c8be..43ab919b 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/Stacktrace.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/crashhandler/Stacktrace.java @@ -51,14 +51,16 @@ public final class Stacktrace implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "stacktrace"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { if (throwable == null) return text.replace("%" + getName() + "%", "No stacktrace is available."); else { diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogClass.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogClass.java index 6527d60e..947bff05 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogClass.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogClass.java @@ -50,14 +50,16 @@ public final class LogClass implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_class"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getName().replace(logIssuer.getClazz().getPackageName() + ".", "")); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogCodePart.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogCodePart.java index c3ff6c54..1894c07a 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogCodePart.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogCodePart.java @@ -50,14 +50,16 @@ public final class LogCodePart implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_code_part"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getCodePart().name()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorPrimary.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorPrimary.java index 87d32be9..9ed48cea 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorPrimary.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorPrimary.java @@ -50,14 +50,16 @@ public final class LogColorPrimary implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_color_primary"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { String color; switch (level) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorSecondary.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorSecondary.java index 89ca6b5c..07a46469 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorSecondary.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogColorSecondary.java @@ -50,14 +50,16 @@ public final class LogColorSecondary implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_color_secondary"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { String color; switch (level) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogInfo.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogInfo.java index f10067a4..2e4de394 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogInfo.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogInfo.java @@ -50,14 +50,16 @@ public final class LogInfo implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_info"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { if (logIssuer.getAdditionalInformation() != null) return text.replace("%" + getName() + "%", "/" + logIssuer.getAdditionalInformation()); return text.replace("%" + getName() + "%", ""); diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogLevel.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogLevel.java index d417086a..22636b38 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogLevel.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogLevel.java @@ -49,14 +49,16 @@ public final class LogLevel implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_level"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { String levelText; switch (level) { diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogMessage.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogMessage.java index 7732d759..a79cd2f7 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogMessage.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogMessage.java @@ -49,14 +49,16 @@ public final class LogMessage implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_message"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", message); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPackage.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPackage.java index e3e531af..1eea6ae1 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPackage.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPackage.java @@ -50,14 +50,16 @@ public final class LogPackage implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_package"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getPackageName()); } } diff --git a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPath.java b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPath.java index 2d98aea2..fb79b993 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPath.java +++ b/base/src/main/java/de/staropensource/sosengine/base/internal/placeholders/logger/LogPath.java @@ -50,14 +50,16 @@ public final class LogPath implements Placeholder { } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String getName() { + public String getName() { return "log_path"; } /** {@inheritDoc} */ + @NotNull @Override - public @NotNull String replace(@NotNull String text) { + public String replace(@NotNull String text) { return text.replace("%" + getName() + "%", logIssuer.getClazz().getName()); } }