Skip to content

Commit ba8a26f

Browse files
authored
GH-3737: Add serialVersionUID to MessageHistory
Fixes #3737 * Add an explicit `serialVersionUID` to `MessageHistory` to avoid class version conflicts in the future. See related GH issue for the workaround **Cherry-pick to `5.5.x`**
1 parent 5c912b1 commit ba8a26f

File tree

1 file changed

+6
-3
lines changed
  • spring-integration-core/src/main/java/org/springframework/integration/history

1 file changed

+6
-3
lines changed

Diff for: spring-integration-core/src/main/java/org/springframework/integration/history/MessageHistory.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -49,12 +49,14 @@
4949
* @author Mark Fisher
5050
* @author Artem Bilan
5151
* @author Gary Russell
52+
* @author Chris Bono
5253
*
5354
* @since 2.0
5455
*/
55-
@SuppressWarnings("serial")
5656
public final class MessageHistory implements List<Properties>, Serializable {
5757

58+
private static final long serialVersionUID = -2340400235574314134L;
59+
5860
private static final Log LOGGER = LogFactory.getLog(MessageHistory.class);
5961

6062
private static final UnsupportedOperationException UNSUPPORTED_OPERATION_EXCEPTION_IMMUTABLE =
@@ -303,12 +305,13 @@ private static Properties extractMetadata(NamedComponent component) {
303305
return entry;
304306
}
305307

306-
307308
/**
308309
* Inner class for each Entry in the history.
309310
*/
310311
public static class Entry extends Properties {
311312

313+
private static final long serialVersionUID = -8225834391885601079L;
314+
312315
public String getName() {
313316
return this.getProperty(NAME_PROPERTY);
314317
}

0 commit comments

Comments
 (0)