Skip to content

Commit

Permalink
Fix serializability of some auxiliary classes
Browse files Browse the repository at this point in the history
These are sometimes part of OperationResult, which is Serializable.
  • Loading branch information
mederly committed Apr 4, 2022
1 parent 40b7e98 commit 569fec1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.Serializable;
import java.util.*;

import static com.evolveum.midpoint.xml.ns._public.common.common_3.OperationMonitoringLevelType.FULL;
Expand Down Expand Up @@ -173,7 +174,7 @@ public String toString() {
}
}

private static class OperationStatistics {
private static class OperationStatistics implements Serializable {
private int count;
private long time;

Expand Down Expand Up @@ -221,7 +222,7 @@ private void recordEndEmbeddedInternal() {
}
}

public static class ExecutedOperations {
public static class ExecutedOperations implements Serializable {

private final Map<MonitoredOperationType, OperationStatistics> map = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand All @@ -24,7 +25,7 @@

import static java.util.Collections.unmodifiableMap;

public class OperationMonitoringConfiguration {
public class OperationMonitoringConfiguration implements Serializable {

/**
* What operations should be monitored, and to what level?
Expand Down

0 comments on commit 569fec1

Please sign in to comment.