Replies: 2 comments
-
Also IndirectSet is a Hashtable, see https://github.com/eclipse-ee4j/eclipselink/blob/7dfeab504e7b0042e6330315297bed0e6739cc95/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/indirection/IndirectMap.java. This is for as long EclipseLink exists, which is probably the reason: backwards compatibility. Changing these base classes would be a breaking change. That said, we are applying a ClassDescriptorCustomizer that sets up a custom IndirectionPolicy for all our containers. The containers used are copies of the EclipseLink implementations with ArrayList and HashMap replacing the old Vector and Hashtable, respectively. This is working for several years now. We also have a variant using LinkedHashMap or LinkedHashSet when the OrderBy annotation is used. Using the customizers is not too easy but works sufficiently well. |
Beta Was this translation helpful? Give feedback.
-
@t-beckmann is correct - the reason is backwards compatibility. But not only - another thing is that very first version of EclipseLink (called TopLink for Java back then) was ported from its predecessor written in SmallTalk to java around 1996 - that was a year, when Java 1.0 was released, now 27 years later, making such change would be/is quite challenging, non-trivial and long running task.. |
Beta Was this translation helpful? Give feedback.
-
Hello,
i am just curious, why is IndirectList a Vector? Are there technical reasons for it? And would be an ArrayList a better choice?
Thank you and Cheers.
Beta Was this translation helpful? Give feedback.
All reactions