Added support for Reader and Inpustream with tests. Deploying a new snapshot
-- Jean-Louis Monteiro http://twitter.com/jlouismonteiro http://www.tomitribe.com On Tue, Sep 21, 2021 at 11:02 AM Jean-Louis Monteiro < [email protected]> wrote: > Yes, seems to be working > Deploying a new snapshot and then I'll update TomEE and run the TCK again > -- > Jean-Louis Monteiro > http://twitter.com/jlouismonteiro > http://www.tomitribe.com > > > On Tue, Sep 21, 2021 at 10:59 AM Romain Manni-Bucau <[email protected]> > wrote: > >> I see, pushed some enhancements with >> https://issues.apache.org/jira/browse/JOHNZON-351 if you want to retry >> >> The issue comes from the fact a class is casted s a Type (so a kind of >> misuse of the API - which can happen indeed in frameworks), hope it helps. >> >> Romain Manni-Bucau >> @rmannibucau <https://twitter.com/rmannibucau> | Blog >> <https://rmannibucau.metawerx.net/> | Old Blog >> <http://rmannibucau.wordpress.com> | Github < >> https://github.com/rmannibucau> | >> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book >> < >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > >> >> >> Le mar. 21 sept. 2021 à 10:51, Jean-Louis Monteiro < >> [email protected]> >> a écrit : >> >> > Added the following to JsonbReadTest and fails >> > >> > @Test >> > > public void simpleArrayMapping() throws Exception { >> > > final String representation = "[ \"Test String\" ]"; >> > > final List<String> expectedResult = Arrays.asList("Test String"); >> > > >> > > try (final Jsonb jsonb = JsonbBuilder.create()){ >> > > final Object unmarshalledObject = >> jsonb.fromJson(representation, >> > (Type) List.class); >> > > assertEquals(expectedResult, unmarshalledObject); >> > > } >> > > } >> > > >> > > >> > -- >> > Jean-Louis Monteiro >> > http://twitter.com/jlouismonteiro >> > http://www.tomitribe.com >> > >> > >> > On Tue, Sep 21, 2021 at 10:34 AM Jean-Louis Monteiro < >> > [email protected]> wrote: >> > >> > > I was about to run a git bysec >> > > I'll see if I can add some tests to reproduce >> > > -- >> > > Jean-Louis Monteiro >> > > http://twitter.com/jlouismonteiro >> > > http://www.tomitribe.com >> > > >> > > >> > > On Tue, Sep 21, 2021 at 10:28 AM Romain Manni-Bucau < >> > [email protected]> >> > > wrote: >> > > >> > >> Hmm, right, think it is >> > >> >> > >> >> > >> https://github.com/apache/johnzon/commit/15a4cc69344b3a0dd7ee80326cc064fa0972a779 >> > >> which is not wired properly everywhere. >> > >> If you can reproduce it I can surely help if needed. >> > >> >> > >> Romain Manni-Bucau >> > >> @rmannibucau <https://twitter.com/rmannibucau> | Blog >> > >> <https://rmannibucau.metawerx.net/> | Old Blog >> > >> <http://rmannibucau.wordpress.com> | Github < >> > >> https://github.com/rmannibucau> | >> > >> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book >> > >> < >> > >> >> > >> https://www.packtpub.com/application-development/java-ee-8-high-performance >> > >> > >> > >> >> > >> >> > >> Le mar. 21 sept. 2021 à 09:21, Jean-Louis Monteiro < >> > >> [email protected]> >> > >> a écrit : >> > >> >> > >> > The thing is that I tried with EE8 as well and there, the TCK did >> not >> > >> > change for quite a while now. >> > >> > >> > >> > TomEE master using Johnzon 1.2.10 and EE8 TCK works. >> > >> > TomEE master using Johnzon 1.2.11+ and EE8 TCK fails. >> > >> > >> > >> > 09-07-2021 10:15:57: SVR-ERROR: Test case throws exception: Cannot >> > >> > cast java.lang.Class to java.lang.reflect.ParameterizedType >> > >> > > 09-07-2021 10:15:57: SVR-ERROR: Exception at: >> > >> > > 09-07-2021 10:15:57: SVR-ERROR: java.lang.ClassCastException: >> > Cannot >> > >> > cast java.lang.Class to java.lang.reflect.ParameterizedType >> > >> > > at java.lang.Class.cast(Class.java:3369) >> > >> > > at >> > >> > >> org.apache.johnzon.jsonb.JohnzonJsonb.fromJson(JohnzonJsonb.java:139) >> > >> > > at >> > >> > >> > >> >> > >> com.sun.ts.tests.jsonb.SimpleMappingTester.testUnmarshallingByType(SimpleMappingTester.java:216) >> > >> > > at >> > >> > >> > >> >> > >> com.sun.ts.tests.jsonb.SimpleMappingTester.test(SimpleMappingTester.java:61) >> > >> > > at >> > >> > >> > >> >> > >> com.sun.ts.tests.jsonb.defaultmapping.untyped.UntypedMappingTest.testArrayMapping(UntypedMappingTest.java:130) >> > >> > > >> > >> > > >> > >> > Looks more like a regression on us. Wdyt? >> > >> > -- >> > >> > Jean-Louis Monteiro >> > >> > http://twitter.com/jlouismonteiro >> > >> > http://www.tomitribe.com >> > >> > >> > >> > >> > >> > On Tue, Sep 21, 2021 at 8:45 AM Romain Manni-Bucau < >> > >> [email protected]> >> > >> > wrote: >> > >> > >> > >> > > Hi JL, >> > >> > > >> > >> > > Recall these tests were adjusted so can be expected to fail. >> > >> > > Dont recall very well the details bit a quick search made >> > >> > > https://github.com/eclipse-ee4j/jsonb-api/pull/275/files popping >> > up. >> > >> > > Can be related to such an adjustment. >> > >> > > >> > >> > > Le mar. 21 sept. 2021 à 08:41, Jean-Louis Monteiro < >> > >> > > [email protected]> >> > >> > > a écrit : >> > >> > > >> > >> > > > Hi, >> > >> > > > >> > >> > > > I have noticed since the latest TomEE release, we have a >> couple of >> > >> > JSONB >> > >> > > > failures (4). >> > >> > > > >> > >> > > > > 0/-1/?0 - >> > >> > > > > >> > >> > > > >> > >> > > >> > >> > >> > >> >> > >> com/sun/ts/tests/jsonb/defaultmapping/untyped/UntypedMappingTest#java#testArrayMapping_from_appclient >> > >> > > > > - FAILED >> > >> > > > > 0/-2/?0 - >> > >> > > > > >> > >> > > > >> > >> > > >> > >> > >> > >> >> > >> com/sun/ts/tests/jsonb/defaultmapping/untyped/UntypedMappingTest#java#testArrayMapping_from_ejb >> > >> > > > > - FAILED >> > >> > > > > 0/-3/?0 - >> > >> > > > > >> > >> > > > >> > >> > > >> > >> > >> > >> >> > >> com/sun/ts/tests/jsonb/defaultmapping/untyped/UntypedMappingTest#java#testArrayMapping_from_jsp >> > >> > > > > - FAILED >> > >> > > > > 0/-4/?0 - >> > >> > > > > >> > >> > > > >> > >> > > >> > >> > >> > >> >> > >> com/sun/ts/tests/jsonb/defaultmapping/untyped/UntypedMappingTest#java#testArrayMapping_from_servlet >> > >> > > > > - FAILED >> > >> > > > > >> > >> > > > >> > >> > > > I have rolled back to 1.2.10 and I'm trying again. >> > >> > > > >> > >> > > > -- >> > >> > > > Jean-Louis Monteiro >> > >> > > > http://twitter.com/jlouismonteiro >> > >> > > > http://www.tomitribe.com >> > >> > > > >> > >> > > >> > >> > >> > >> >> > > >> > >> >
