-
Bug
-
Resolution: Done
-
Major
-
3.0.14.Final
-
None
-
None
org.jboss.resteasy.client.core.marshallers.ResteasyClientProxy class should be deprecated. Proxy object could be cast to ResteasyClientProxy only if old deprecated client is used.
This test use old deprecated client. Test pass:
@Test public void testOldClient() throws Exception { InterfaceA a = ProxyFactory.create(InterfaceA.class, generateURL("/foobar")); assertEquals("FOO", a.getFoo()); InterfaceB b = ((ResteasyClientProxy) a).as(InterfaceB.class); assertEquals("BAR", b.getBar()); }
This test use new client. Test fails with java.lang.ClassCastException: com.sun.proxy.$Proxy49 cannot be cast to org.jboss.resteasy.client.core.marshallers.ResteasyClientProxy:
@Test public void testNewClient() throws Exception { InterfaceA a = client.target(generateURL("/foobar")).proxy(InterfaceA.class); assertEquals("FOO", a.getFoo()); InterfaceB b = ((ResteasyClientProxy) a).as(InterfaceB.class); assertEquals("BAR", b.getBar()); }
So ResteasyClientProxy could be used only with old client and should be deprecated.
- clones
-
JBEAP-3197 ResteasyClientProxy class should be deprecated
- Closed