commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cancrinus, Bas" <cancrinu...@schiphol.nl>
Subject [lang] Advise needed for broken reflectionEquals in WebLogic 10.3.5
Date Wed, 27 Jul 2011 16:49:54 GMT
I'm currently migrating an EAR from WebLogic 10.3.3 to 10.3.5. While testing I noticed that
the following invocation returned false while I expected true (lang 2.5):

EqualsBuilder.reflectionEquals(Object lhs, Object rhs, String[] excludeFields)

I noticed in my debugger that my domain classes were extended by the WebLogic JPA provider
with the following field:

protected org.eclipse.persistence.queries.FetchGroup _persistence_fetchGroup

EqualsBuilder.reflectionAppend() (lang 2.5-3.0) only ignores:

-          "$" in field names

-          static modifiers

-          transients (conditional)

-          and of course the excludeFields array

The JPA extension field mentioned above doesn't fall into any of those categories, so it is
appended to the equals result.

The easy way out for me would be to add this field to all reflectionEquals excludeFields arrays,
but I'm looking for a more sustainable way to do this.

-          What do you think about patching EqualsBuilder.reflectionAppend() so that it ignores
this field ( f.startsWith("_") )?

-          Are there any other better ways to fix this issue?

I appreciate any help very much!

Have a nice day,
Bas


P: Please consider the environment before printing this e-mail

________________________________

This e-mail may contain confidential and privileged material. You are requested not to disclose,
copy or distribute any information thereof. If you are not the intended recipient (or have
received this e-mail in error) please notify the sender immediately and delete this e-mail.
We accept no liability for damage related to data and/or documents which are communicated
by electronic mail.

________________________________

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message