changeset 960:3d44d68e45be

Apply SUIDs for all Serializable classes: this protects from the benign instrumentation.
author shade
date Sat, 16 Aug 2014 15:00:18 +0400
parents 892e9d690259
children 0e898fece0ec
files jmh-core/src/main/java/org/openjdk/jmh/generators/core/GenerationException.java jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java jmh-core/src/main/java/org/openjdk/jmh/infra/IterationParams.java jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerResult.java jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java jmh-core/src/main/java/org/openjdk/jmh/results/Result.java jmh-core/src/main/java/org/openjdk/jmh/results/SampleTimeResult.java jmh-core/src/main/java/org/openjdk/jmh/results/SingleShotResult.java jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java jmh-core/src/main/java/org/openjdk/jmh/runner/Action.java jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkException.java jmh-core/src/main/java/org/openjdk/jmh/runner/NoBenchmarksException.java jmh-core/src/main/java/org/openjdk/jmh/runner/RunnerException.java jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/ActionPlanFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/ExceptionFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/FinishingFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/InfraFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/OptionsFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/link/ResultsFrame.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptionException.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java jmh-core/src/main/java/org/openjdk/jmh/util/AbstractStatistics.java jmh-core/src/main/java/org/openjdk/jmh/util/HashMultimap.java jmh-core/src/main/java/org/openjdk/jmh/util/HashMultiset.java jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultimap.java jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultiset.java
diffstat 38 files changed, 65 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jmh-core/src/main/java/org/openjdk/jmh/generators/core/GenerationException.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/generators/core/GenerationException.java	Sat Aug 16 15:00:18 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jmh.generators.core;
 
 public class GenerationException extends RuntimeException {
+    private static final long serialVersionUID = -3462499052514960496L;
 
     private final MetadataInfo element;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/infra/BenchmarkParams.java	Sat Aug 16 15:00:18 2014 +0400
@@ -50,6 +50,7 @@
  */
 @State(Scope.Thread)
 public class BenchmarkParams extends BenchmarkParamsL4 {
+    private static final long serialVersionUID = -1068219503090299117L;
 
     /**
      * Do the class hierarchy trick to evade false sharing, and check if it's working in runtime.
@@ -84,6 +85,8 @@
 }
 
 abstract class BenchmarkParamsL4 extends BenchmarkParamsL3 {
+    private static final long serialVersionUID = -2409216922027695385L;
+
     private int markerEnd;
     public BenchmarkParamsL4(String benchmark, String generatedTarget, boolean synchIterations,
                              int threads, int[] threadGroups, int forks, int warmupForks,
@@ -105,6 +108,8 @@
 }
 
 abstract class BenchmarkParamsL3 extends BenchmarkParamsL2 {
+    private static final long serialVersionUID = -53511295235994554L;
+
     private boolean q001, q002, q003, q004, q005, q006, q007, q008;
     private boolean q011, q012, q013, q014, q015, q016, q017, q018;
     private boolean q021, q022, q023, q024, q025, q026, q027, q028;
@@ -165,6 +170,8 @@
 }
 
 abstract class BenchmarkParamsL2 extends BenchmarkParamsL1 implements Serializable, Comparable<BenchmarkParams> {
+    private static final long serialVersionUID = -1068219503090299117L;
+
     protected final String benchmark;
     protected final String generatedTarget;
     protected final boolean synchIterations;
--- a/jmh-core/src/main/java/org/openjdk/jmh/infra/IterationParams.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/infra/IterationParams.java	Sat Aug 16 15:00:18 2014 +0400
@@ -48,6 +48,8 @@
  */
 @State(Scope.Thread)
 public class IterationParams extends IterationParamsL4 {
+    private static final long serialVersionUID = -8111111319033802892L;
+
     static {
         Utils.check(IterationParams.class, "type", "count", "timeValue", "batchSize");
     }
@@ -62,6 +64,8 @@
 }
 
 abstract class IterationParamsL4 extends IterationParamsL3 {
+    private static final long serialVersionUID = 9079354621906758255L;
+
     private int markerEnd;
     public IterationParamsL4(IterationType type, int count, TimeValue time, int batchSize) {
         super(type, count, time, batchSize);
@@ -73,6 +77,8 @@
 }
 
 abstract class IterationParamsL3 extends IterationParamsL2 {
+    private static final long serialVersionUID = 3907464940104879178L;
+
     private boolean q001, q002, q003, q004, q005, q006, q007, q008;
     private boolean q011, q012, q013, q014, q015, q016, q017, q018;
     private boolean q021, q022, q023, q024, q025, q026, q027, q028;
@@ -123,6 +129,8 @@
 }
 
 abstract class IterationParamsL2 extends IterationParamsL1 implements Serializable {
+    private static final long serialVersionUID = -6138850517953881052L;
+
     /**
      * iteration type
      */
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfAsmProfiler.java	Sat Aug 16 15:00:18 2014 +0400
@@ -760,6 +760,8 @@
     }
 
     static class PerfResult extends Result<PerfResult> {
+        private static final long serialVersionUID = 6871141606856800453L;
+
         private final String output;
 
         public PerfResult(String output) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/LinuxPerfProfiler.java	Sat Aug 16 15:00:18 2014 +0400
@@ -167,6 +167,8 @@
     }
 
     static class PerfResult extends Result<PerfResult> {
+        private static final long serialVersionUID = -1262685915873231436L;
+
         private final String output;
         private final long cycles;
         private final long instructions;
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/ProfilerResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -31,6 +31,8 @@
 import org.openjdk.jmh.util.Statistics;
 
 public class ProfilerResult extends Result<ProfilerResult> {
+    private static final long serialVersionUID = 3407232747805728586L;
+
     public ProfilerResult(String label, double n, String unit, AggregationPolicy policy) {
         this(label, of(n), unit, policy);
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/profile/StackProfiler.java	Sat Aug 16 15:00:18 2014 +0400
@@ -170,6 +170,8 @@
     }
 
     private static class StackRecord implements Serializable {
+        private static final long serialVersionUID = -1829626661894754733L;
+
         public final String[] lines;
 
         private StackRecord(String[] lines) {
@@ -194,6 +196,8 @@
     }
 
     public static class StackResult extends Result<StackResult> {
+        private static final long serialVersionUID = 2609170863630346073L;
+
         private final Map<Thread.State, Multiset<StackRecord>> stacks;
 
         public StackResult(Map<Thread.State, Multiset<StackRecord>> stacks) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/AverageTimeResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -35,6 +35,7 @@
  * Result class that stores average operation time.
  */
 public class AverageTimeResult extends Result {
+    private static final long serialVersionUID = 6937689337229703312L;
 
     public AverageTimeResult(ResultRole mode, String label, long operations, long durationNs, TimeUnit tu) {
         this(mode, label,
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/IterationResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -40,6 +40,7 @@
  * Class contains all info returned by benchmark iteration or/and collected during benchmark iteration.
  */
 public class IterationResult implements Serializable {
+    private static final long serialVersionUID = 960397066774710819L;
 
     private final BenchmarkParams benchmarkParams;
     private final IterationParams params;
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/Result.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/Result.java	Sat Aug 16 15:00:18 2014 +0400
@@ -35,6 +35,7 @@
  * Base class for all types of results that can be returned by a benchmark.
  */
 public abstract class Result<T extends Result<T>> implements Serializable {
+    private static final long serialVersionUID = -7332879501317733312L;
 
     protected final ResultRole role;
     protected final String label;
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/SampleTimeResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/SampleTimeResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -35,6 +35,7 @@
  * Result class that samples operation time.
  */
 public class SampleTimeResult extends Result {
+    private static final long serialVersionUID = -295298353763294757L;
 
     private final SampleBuffer buffer;
     private final TimeUnit outputTimeUnit;
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/SingleShotResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/SingleShotResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -35,6 +35,7 @@
  * Result class that stores once operation execution time.
  */
 public class SingleShotResult extends Result {
+    private static final long serialVersionUID = -1251578870918524737L;
 
     public SingleShotResult(ResultRole role, String label, long duration, TimeUnit outputTimeUnit) {
         this(role, label,
--- a/jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/results/ThroughputResult.java	Sat Aug 16 15:00:18 2014 +0400
@@ -35,6 +35,7 @@
  * Result class that counts the number of operations performed during a specified unit of time.
  */
 public class ThroughputResult extends Result {
+    private static final long serialVersionUID = 7269598073169413322L;
 
     public ThroughputResult(ResultRole role, String label, long operations, long durationNs, TimeUnit outputTimeUnit) {
         this(role, label,
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/Action.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/Action.java	Sat Aug 16 15:00:18 2014 +0400
@@ -29,6 +29,8 @@
 import java.io.Serializable;
 
 class Action implements Serializable {
+    private static final long serialVersionUID = -7315320958163363586L;
+
     private final BenchmarkParams params;
     private final ActionMode mode;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/ActionPlan.java	Sat Aug 16 15:00:18 2014 +0400
@@ -29,6 +29,7 @@
 import java.util.List;
 
 public class ActionPlan implements Serializable {
+    private static final long serialVersionUID = 7250784375093638099L;
 
     private final List<Action> actions;
     private final ActionType type;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkException.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/BenchmarkException.java	Sat Aug 16 15:00:18 2014 +0400
@@ -28,6 +28,7 @@
  * Internal exception in JMH. Always wraps the real cause.
  */
 public class BenchmarkException extends RuntimeException {
+    private static final long serialVersionUID = 4064666042830679837L;
 
     public BenchmarkException(Throwable ex) {
         super(ex);
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/NoBenchmarksException.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/NoBenchmarksException.java	Sat Aug 16 15:00:18 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jmh.runner;
 
 public class NoBenchmarksException extends RunnerException {
+    private static final long serialVersionUID = 1446854343206595167L;
 
     public String toString() {
         return "No benchmarks to run; check the include/exclude regexps.";
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/RunnerException.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/RunnerException.java	Sat Aug 16 15:00:18 2014 +0400
@@ -25,6 +25,8 @@
 package org.openjdk.jmh.runner;
 
 public class RunnerException extends Exception {
+    private static final long serialVersionUID = 7366763183238649668L;
+
     public RunnerException(Throwable t) {
         super(t);
     }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/WorkloadParams.java	Sat Aug 16 15:00:18 2014 +0400
@@ -30,6 +30,7 @@
 import java.util.TreeMap;
 
 public class WorkloadParams implements Comparable<WorkloadParams>, Serializable {
+    private static final long serialVersionUID = 780563934988950196L;
 
     private final SortedMap<String, Value> params;
 
@@ -104,6 +105,8 @@
     }
 
     private static class Value implements Comparable<Value>, Serializable {
+        private static final long serialVersionUID = 8846779314306880977L;
+
         private String value;
         private int order;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ActionPlanFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ActionPlanFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -29,6 +29,8 @@
 import java.io.Serializable;
 
 class ActionPlanFrame implements Serializable {
+    private static final long serialVersionUID = 4652437412096164885L;
+
     private final ActionPlan actionPlan;
 
     public ActionPlanFrame(ActionPlan actionPlan) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ExceptionFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ExceptionFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -29,6 +29,8 @@
 import java.io.Serializable;
 
 class ExceptionFrame implements Serializable {
+    private static final long serialVersionUID = 5595622047639653401L;
+
     private final BenchmarkException error;
 
     public ExceptionFrame(BenchmarkException error) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/FinishingFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/FinishingFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -27,4 +27,5 @@
 import java.io.Serializable;
 
 class FinishingFrame implements Serializable {
+    private static final long serialVersionUID = 2309975914801631608L;
 }
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/InfraFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/InfraFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -27,6 +27,7 @@
 import java.io.Serializable;
 
 class InfraFrame implements Serializable {
+    private static final long serialVersionUID = 6341776120773421805L;
 
     private final Type type;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OptionsFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OptionsFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -29,6 +29,7 @@
 import java.io.Serializable;
 
 class OptionsFrame implements Serializable {
+    private static final long serialVersionUID = 2082214387637725282L;
 
     private final Options opts;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/OutputFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -27,6 +27,8 @@
 import java.io.Serializable;
 
 class OutputFrame implements Serializable {
+    private static final long serialVersionUID = 8570795333046092668L;
+
     private final Type type;
     private final byte[] data;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ResultsFrame.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/link/ResultsFrame.java	Sat Aug 16 15:00:18 2014 +0400
@@ -31,6 +31,8 @@
 import java.io.Serializable;
 
 class ResultsFrame implements Serializable {
+    private static final long serialVersionUID = -5627086531281515824L;
+
     private final Multimap<BenchmarkParams, BenchmarkResult> res;
 
     public ResultsFrame(Multimap<BenchmarkParams, BenchmarkResult> res) {
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptionException.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptionException.java	Sat Aug 16 15:00:18 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jmh.runner.options;
 
 public class CommandLineOptionException extends Exception {
+    private static final long serialVersionUID = 4023975483757781721L;
 
     public CommandLineOptionException(String message) {
         super(message);
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/CommandLineOptions.java	Sat Aug 16 15:00:18 2014 +0400
@@ -50,6 +50,7 @@
  * Class that handles all the command line options.
  */
 public class CommandLineOptions implements Options {
+    private static final long serialVersionUID = 5565183446360224399L;
 
     private final Optional<Integer> iterations;
     private final Optional<TimeValue> runTime;
--- a/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/runner/options/OptionsBuilder.java	Sat Aug 16 15:00:18 2014 +0400
@@ -42,6 +42,7 @@
 import java.util.concurrent.TimeUnit;
 
 public class OptionsBuilder implements Options, ChainedOptionsBuilder {
+    private static final long serialVersionUID = -4088596253924343849L;
 
     @Override
     public Options build() {
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/AbstractStatistics.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/AbstractStatistics.java	Sat Aug 16 15:00:18 2014 +0400
@@ -28,6 +28,7 @@
 import org.apache.commons.math3.stat.inference.TestUtils;
 
 public abstract class AbstractStatistics implements Statistics {
+    private static final long serialVersionUID = 1536835581997509117L;
 
     /**
      * Returns the interval c1, c2 of which there's an 1-alpha
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/HashMultimap.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/HashMultimap.java	Sat Aug 16 15:00:18 2014 +0400
@@ -32,6 +32,7 @@
 import java.util.Map;
 
 public class HashMultimap<K, V> implements Multimap<K, V>, Serializable {
+    private static final long serialVersionUID = 2484428623123444998L;
 
     private final Map<K, Collection<V>> map;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/HashMultiset.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/HashMultiset.java	Sat Aug 16 15:00:18 2014 +0400
@@ -31,6 +31,7 @@
 import java.util.Map;
 
 public class HashMultiset<T> implements Multiset<T>, Serializable {
+    private static final long serialVersionUID = 8149201968248505516L;
 
     private final Map<T, Long> map;
     private long size;
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/HashsetMultimap.java	Sat Aug 16 15:00:18 2014 +0400
@@ -33,6 +33,7 @@
 import java.util.Map;
 
 public class HashsetMultimap<K, V> implements Multimap<K, V>, Serializable {
+    private static final long serialVersionUID = -4236100656731956836L;
 
     private final Map<K, Collection<V>> map;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/MultisetStatistics.java	Sat Aug 16 15:00:18 2014 +0400
@@ -25,6 +25,7 @@
 package org.openjdk.jmh.util;
 
 public class MultisetStatistics extends AbstractStatistics {
+    private static final long serialVersionUID = -4401871054963903938L;
 
     private final Multiset<Double> values;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/Optional.java	Sat Aug 16 15:00:18 2014 +0400
@@ -31,6 +31,7 @@
  * @param <T> stored value.
  */
 public class Optional<T> implements Serializable {
+    private static final long serialVersionUID = 5691070564925468961L;
 
     private final T val;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/SampleBuffer.java	Sat Aug 16 15:00:18 2014 +0400
@@ -30,6 +30,7 @@
  * Sampling buffer accepts samples.
  */
 public class SampleBuffer implements Serializable {
+    private static final long serialVersionUID = 6124923853916845327L;
 
     private static final int PRECISION_BITS = 10;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultimap.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultimap.java	Sat Aug 16 15:00:18 2014 +0400
@@ -32,6 +32,7 @@
 import java.util.TreeMap;
 
 public class TreeMultimap<K, V> implements Multimap<K, V>, Serializable {
+    private static final long serialVersionUID = 1323519395777393861L;
 
     private final Map<K, Collection<V>> map;
 
--- a/jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultiset.java	Sat Aug 16 00:54:17 2014 +0400
+++ b/jmh-core/src/main/java/org/openjdk/jmh/util/TreeMultiset.java	Sat Aug 16 15:00:18 2014 +0400
@@ -31,6 +31,7 @@
 import java.util.TreeMap;
 
 public class TreeMultiset<T extends Comparable<T>> implements Multiset<T>, Serializable {
+    private static final long serialVersionUID = 3571810468402616517L;
 
     private final Map<T, Long> map;
     private long size;