Skip to content

Commit

Permalink
GH-3737: Add serialVersionUID to MessageHistory
Browse files Browse the repository at this point in the history
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`**
  • Loading branch information
onobc committed Mar 8, 2022
1 parent 5c912b1 commit ba8a26f
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -49,12 +49,14 @@
* @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 =
Expand Down Expand Up @@ -303,12 +305,13 @@ private static Properties extractMetadata(NamedComponent component) {
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);
}
Expand Down

0 comments on commit ba8a26f

Please sign in to comment.