This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new b734743204 Marshall module improvements
b734743204 is described below

commit b734743204cf668393517c4027f05822935f949f
Author: James Bognar <[email protected]>
AuthorDate: Sat Dec 6 21:35:40 2025 -0500

    Marshall module improvements
---
 .../src/main/java/org/apache/juneau/ClassMeta.java          | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git 
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java 
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
index ba3f41179f..cf40aca969 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
@@ -2,7 +2,7 @@
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
+ * The ASF licenses this file to You under  the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
  *
@@ -174,6 +174,12 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
        private final Map<Class<?>,Mutater<T,?>> toMutaters = new 
ConcurrentHashMap<>();
        private final ClassMeta<?> valueType;                                   
                                        // If MAP, the value class type.
 
+       private final Supplier<Tuple2<BeanMeta<T>,String>> beanMeta2;
+
+       private Tuple2<BeanMeta<T>,String> findBeanMeta() {
+               return BeanMeta.create(this, beanFilter.get(), null, 
implClass.isPresent() ? null : noArgConstructor.get());
+       }
+
        /**
         * Construct a new {@code ClassMeta} based on the specified {@link 
Class}.
         *
@@ -305,6 +311,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
                        }
 
                        this.beanMeta = notABeanReason == null ? _beanMeta : 
null;
+                       this.beanMeta2 = memoize(()->findBeanMeta());
                        if (nn(this.beanMeta))
                                cat.set(BEAN);
                        this.keyType = _keyType;
@@ -362,6 +369,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
                this.valueType = null;
                this.proxyInvocationHandler = null;
                this.beanMeta = null;
+               this.beanMeta2 = memoize(()->findBeanMeta());
                this.notABeanReason = null;
                this.swaps = null;
                this.stringMutater = null;
@@ -400,6 +408,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
                this.valueType = valueType;
                this.proxyInvocationHandler = mainType.proxyInvocationHandler;
                this.beanMeta = mainType.beanMeta;
+               this.beanMeta2 = mainType.beanMeta2;
                this.notABeanReason = mainType.notABeanReason;
                this.swaps = mainType.swaps;
                this.exampleMethod = mainType.exampleMethod;
@@ -976,7 +985,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
         *
         * @return <jk>true</jk> if this class is a bean.
         */
-       public boolean isBean() { return cat.is(BEAN); }
+       public boolean isBean() { return beanMeta != null; }
 
        /**
         * Returns <jk>true</jk> if this class is a subclass of {@link BeanMap}.

Reply via email to