Skip to content

Commit

Permalink
sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rjpmestre committed Jun 21, 2024
1 parent 1b762d2 commit a7dfe4b
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private ErrorReportingStrategies() {
* @return Supplier of RhnRuntimeException that logs the message and throw the exception
*/
public static Supplier<RhnRuntimeException> raiseAndLog(Object obj, String message) {
Logger logger = OBJ_LOGGER.computeIfAbsent(obj, (key) -> LogManager.getLogger(obj.getClass().getName()));
Logger logger = OBJ_LOGGER.computeIfAbsent(obj, key -> LogManager.getLogger(obj.getClass().getName()));
return () -> {
logger.error(message);
return new RhnRuntimeException(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
import org.apache.logging.log4j.Logger;
import org.hibernate.Session;

import java.io.IOException;
import java.net.IDN;
import java.security.SecureRandom;
import java.sql.Date;
Expand Down Expand Up @@ -2155,7 +2154,7 @@ public byte[] createProxyContainerConfig(User user, String proxyName, Integer pr
SSLCertPair proxyCertKey,
SSLCertPair caPair, String caPassword, SSLCertData certData,
SSLCertManager certManager)
throws IOException, InstantiationException, SSLCertGenerationException {
throws SSLCertGenerationException {

return new ProxyContainerConfigCreate().create(
saltApi, systemEntitlementManager, user, server, proxyName, proxyPort, maxCache, email,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import com.suse.manager.webui.services.impl.runner.MgrUtilRunner;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.security.SecureRandom;
import java.util.HashSet;
Expand All @@ -53,7 +51,6 @@
* Acquires and validates all necessary data for the Proxy container configuration creation files.
*/
public class ProxyContainerConfigCreateAcquisitor implements ProxyContainerConfigCreateContextHandler {
private static final Logger LOG = LogManager.getLogger(SystemManagerUtils.class);

private SaltApi saltApi;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
import com.suse.manager.webui.services.iface.SaltApi;
import com.suse.manager.webui.services.impl.runner.MgrUtilRunner;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -37,8 +34,6 @@
*/
public class ProxyContainerConfigCreateContext {

private static final Logger LOG = LogManager.getLogger(ProxyContainerConfigCreateContext.class);

// provided
private final SaltApi saltApi;
private final User user;
Expand Down

0 comments on commit a7dfe4b

Please sign in to comment.