GH-3737: Add serialVersionUID to MessageHistory

Fixes https://github.com/spring-projects/spring-integration/issues/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`**
This commit is contained in:
Chris Bono
2022-03-08 15:27:20 -06:00
committed by Artem Bilan
parent 963c05ada3
commit e80c0ab919

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,12 +49,14 @@ import com.fasterxml.jackson.annotation.JsonCreator;
* @author Mark Fisher
* @author Artem Bilan
* @author Gary Russell
* @author Chris Bono
*
* @since 2.0
*/
@SuppressWarnings("serial")
public final class MessageHistory implements List<Properties>, Serializable {
private static final long serialVersionUID = -2340400235574314134L;
private static final Log LOGGER = LogFactory.getLog(MessageHistory.class);
private static final UnsupportedOperationException UNSUPPORTED_OPERATION_EXCEPTION_IMMUTABLE =
@@ -303,12 +305,13 @@ public final class MessageHistory implements List<Properties>, Serializable {
return entry;
}
/**
* Inner class for each Entry in the history.
*/
public static class Entry extends Properties {
private static final long serialVersionUID = -8225834391885601079L;
public String getName() {
return this.getProperty(NAME_PROPERTY);
}