-
Bug
-
Resolution: Done
-
Major
-
7.0.0.ER4
-
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.
- is cloned by
-
RESTEASY-1293 ResteasyClientProxy class should be deprecated
- Closed
- is incorporated by
-
JBEAP-4600 Upgrade Resteasy to 3.0.17.Final
- Closed