Skip to content

Commit

Permalink
Misc ApplicationError fixes
Browse files Browse the repository at this point in the history
* Remove the synchronized keyword from the two methods that are
  using the Lombok Synchronized annotation, since that defeats
  the purpose.
* Remove VisibleForTesting from clearPersistentHostInformation
  because it is used by the ApplicationErrorExtension, which
  here is technically production code.
  • Loading branch information
sleberknight committed Sep 2, 2024
1 parent 8a17d12 commit 1b03239
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import static org.kiwiproject.base.KiwiThrowables.nextCauseOfNullable;
import static org.kiwiproject.base.KiwiThrowables.throwableInfoOfNullable;

import com.google.common.annotations.VisibleForTesting;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down Expand Up @@ -132,7 +131,7 @@ public static void setPersistentHostInformation(String hostName, String ipAddres
* {@link #checkPersistentHostState()} for the error message to be correct.
*/
@Synchronized
public static synchronized void setPersistentHostInformation(PersistentHostInformation hostInfo) {
public static void setPersistentHostInformation(PersistentHostInformation hostInfo) {
checkArgumentNotNull(hostInfo);
setPersistentHostInformation(hostInfo.getHostName(), hostInfo.getIpAddress(), hostInfo.getPort());
}
Expand All @@ -146,8 +145,7 @@ public static synchronized void setPersistentHostInformation(PersistentHostInfor
* persistent host information at the same time.
*/
@Synchronized
@VisibleForTesting
public static synchronized void clearPersistentHostInformation() {
public static void clearPersistentHostInformation() {
persistentHostInformation = null;
}

Expand Down

0 comments on commit 1b03239

Please sign in to comment.