Community
Participate
Working Groups
Build Identifier: gemini-jpa-1.0.0.RC3 java.lang.ClassCastException: $Proxy1 cannot be cast to java.util.Map at org.eclipse.gemini.jpa.proxy.EMFBuilderServiceProxyHandler.invoke(EMFBuilderServiceProxyHandler.java:63) at $Proxy1.equals(Unknown Source) Reproducible: Always Steps to Reproduce: 1. Fetch an instance of EntityManagerFactoryBuilder 2. call equals (either direct or for example lock up the reference in a Map or Collection) 3. java.lang.ClassCastException: $Proxy1 cannot be cast to java.util.Map is thrown
Created attachment 208999 [details] patch for handling calls to equals method The attached patch should fix the issue. It adds handling of the #equals method.
Maybe you want handling the hashCode method also, I'm not sure if there is any issue with this, but normally if you hand over the equals to the proxy you should also use hashCode of the proxy to be consistent with the general contract of hashcode/equals.
Handling for hashCode as well as toString is already implemented in the proxy.
Right haven't seen that, thanks for the patch hopefully someone is applying it soon :)
Merged in. Thanks for the bug report and for the fix.
Fixed.