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 d0f88e16cf Marshall module improvements
d0f88e16cf is described below
commit d0f88e16cfedb1e2477758915f96997920baa2cd
Author: James Bognar <[email protected]>
AuthorDate: Thu Dec 11 16:47:10 2025 -0500
Marshall module improvements
---
.../main/java/org/apache/juneau/BeanPropertyMeta.java | 16 ++++++++--------
.../org/apache/juneau/html/HtmlBeanPropertyMeta.java | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index 9e5377df4c..2baaa04d62 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -217,7 +217,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
assertArgNotNull("value", value);
value.accessible();
this.field = value;
- this.innerField = value.inner();
+ this.innerField = value;
return this;
}
@@ -242,7 +242,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
*/
public BeanPropertyMeta.Builder setInnerField(FieldInfo value) {
assertArgNotNull("value", value);
- this.innerField = value == null ? null : value.inner();
+ this.innerField = value;
return this;
}
@@ -254,7 +254,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
*/
public BeanPropertyMeta.Builder setInnerField(Field value) {
assertArgNotNull("value", value);
- this.innerField = value;
+ this.innerField = FieldInfo.of(value);
return this;
}
@@ -296,7 +296,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
canRead |= (nn(field) || nn(getter));
canWrite |= (nn(field) || nn(setter));
- var ifi = innerField == null ? null : info(innerField);
+ var ifi = innerField;
var gi = getter == null ? null : info(getter);
var si = setter == null ? null : info(setter);
@@ -306,7 +306,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
if (nn(field) || isNotEmpty(lp)) {
// Only use field type if it's a bean
property or has @Beanp annotation.
// Otherwise, we want to infer the type
from the getter or setter.
- rawTypeMeta =
bc.resolveClassMeta(last(lp), innerField.getGenericType(), typeVarImpls);
+ rawTypeMeta =
bc.resolveClassMeta(last(lp), innerField.inner().getGenericType(),
typeVarImpls);
isUri |= (rawTypeMeta.isUri());
}
lp.forEach(x -> {
@@ -456,7 +456,7 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
private final AnnotationProvider ap;
private final String name; // The name
of the property.
private final FieldInfo field; // The
bean property field (if it has one).
- private final Field innerField; // The
bean property field (if it has one).
+ private final FieldInfo innerField; //
The bean property field (if it has one).
private final Method getter, setter, extraKeys; // The bean
property getter and setter.
@@ -888,9 +888,9 @@ public class BeanPropertyMeta implements
Comparable<BeanPropertyMeta> {
/**
* Returns the field for this property even if the field is private.
*
- * @return The field for this bean property, or <jk>null</jk> if there
is no field associated with this bean property.
+ * @return The field info for this bean property, or <jk>null</jk> if
there is no field associated with this bean property.
*/
- public Field getInnerField() { return innerField; }
+ public FieldInfo getInnerField() { return innerField; }
/**
* Returns the name of this bean property.
diff --git
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java
index 50c38c9ec9..608acd1458 100644
---
a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java
+++
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlBeanPropertyMeta.java
@@ -83,7 +83,7 @@ public class HtmlBeanPropertyMeta extends
ExtendedBeanPropertyMeta {
var b = new Builder();
if (nn(bpm.getInnerField()))
- ap.find(Html.class,
info(bpm.getInnerField())).forEach(x -> b.findHtmlInfo(x.inner()));
+ ap.find(Html.class, bpm.getInnerField()).forEach(x ->
b.findHtmlInfo(x.inner()));
if (nn(bpm.getGetter()))
ap.find(Html.class, info(bpm.getGetter())).forEach(x ->
b.findHtmlInfo(x.inner()));
if (nn(bpm.getSetter()))