Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-29888

(8.1.0.GA) JBMAR-261 - Allow serialization of records of with non-primitive types part 2

XMLWordPrintable

    • Important

      This issue is related to the JBEAP-28346 , this is a missing bit:

      diff --git api/src/main/java16/org/jboss/marshalling/reflect/JDKSpecific.java api/src/main/java16/org/jboss/marshalling/reflect/JDKSpecific.java
      index 85193ab..25d6806 100644
      --- api/src/main/java16/org/jboss/marshalling/reflect/JDKSpecific.java
      +++ api/src/main/java16/org/jboss/marshalling/reflect/JDKSpecific.java
      @@ -65,7 +65,7 @@ final class JDKSpecific {
            */
           static Object getRecordComponentValue(Object recordObject, String name, Class<?> type) {
               try {
      -            MethodHandle methodHandle = LOOKUP.findVirtual(
      +            MethodHandle methodHandle = MethodHandles.privateLookupIn(recordObject.getClass(), LOOKUP).findVirtual(
                           recordObject.getClass(), name, MethodType.methodType(type));
                   return (Object) methodHandle.invoke(recordObject);
               } catch (Throwable e) {

              ropalka Richard Opalka
              rhn-support-omolinab Oscar Molina
              Tommaso Borgato Tommaso Borgato
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: