diff --git a/src/main/java/com/exasol/containers/workarounds/LogRotationWorkaround.java b/src/main/java/com/exasol/containers/workarounds/LogRotationWorkaround.java index f19f1369..e78f3398 100644 --- a/src/main/java/com/exasol/containers/workarounds/LogRotationWorkaround.java +++ b/src/main/java/com/exasol/containers/workarounds/LogRotationWorkaround.java @@ -15,9 +15,7 @@ * This is a workaround for an issue with broken log rotation present in Exasol's `docker-db` version 7.0.x and below. */ public class LogRotationWorkaround implements Workaround { - static final Logger LOGGER = LoggerFactory.getLogger(LogRotationWorkaround.class); - @SuppressWarnings("java:S1075") // This is a fixed path. It won't change. - static final String ANACRON_SPOOL = "/var/spool/anacron/cron.daily"; + private static final Logger LOGGER = LoggerFactory.getLogger(LogRotationWorkaround.class); private final ExasolContainer> exasol; /** @@ -43,9 +41,7 @@ public boolean isNecessary() { final ExasolDockerImageReference reference = this.exasol.getDockerImageReference(); if (reference.hasMajor() && // ((reference.getMajor() < 7) // - || ((reference.getMajor() == 7) && reference.hasMinor() && (reference.getMinor() < 1)))) - - { + || ((reference.getMajor() == 7) && reference.hasMinor() && (reference.getMinor() < 1)))) { LOGGER.trace("Log rotation workaround required, since Exasol version is below 7.1."); return true; } else { @@ -61,8 +57,9 @@ public void apply() throws WorkaroundException { final ExecResult result = this.exasol.execInContainer("sed", "-i", "-es/'bucketfsd[^']*log' //", "/etc/cron.daily/exa-logrotate"); if (result.getExitCode() != ExitCode.OK) { - throw new WorkaroundException("Unable to apply log rotation workaround. Error during comand execution: " - + result.getStderr()); + throw new WorkaroundException( + "Unable to apply log rotation workaround. Error during command execution: " + + result.getStderr()); } } catch (final UnsupportedOperationException | IOException | SshException exception) { throw new WorkaroundException("Unable to apply log rotation workaround.", exception);