diff --git a/impl/src/main/java/com/sun/faces/util/MessageFactory.java b/impl/src/main/java/com/sun/faces/util/MessageFactory.java index 83fc14ed16..c4f96c2f2e 100644 --- a/impl/src/main/java/com/sun/faces/util/MessageFactory.java +++ b/impl/src/main/java/com/sun/faces/util/MessageFactory.java @@ -19,6 +19,7 @@ import java.text.MessageFormat; import java.util.Locale; import java.util.MissingResourceException; +import java.util.Objects; import java.util.ResourceBundle; import jakarta.el.ValueExpression; @@ -322,6 +323,19 @@ private String getFormattedString(String msgtext, Object[] params) { private final Locale locale; private final Object[] parameters; private Object[] resolvedParameters; + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), locale, parameters, resolvedParameters); + } + + @Override + public boolean equals(Object object) { + return super.equals(object) + && Objects.equals(locale, ((BindingFacesMessage) object).locale) + && Objects.equals(parameters, ((BindingFacesMessage) object).parameters) + && Objects.equals(resolvedParameters, ((BindingFacesMessage) object).resolvedParameters); + } } } // end of class MessageFactory