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

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


The following commit(s) were added to refs/heads/master by this push:
     new e6f74baa86 ISIS-3304: YamlUtils polishing
e6f74baa86 is described below

commit e6f74baa865ecee6287493da5ea19373e58cc5fe
Author: Andi Huber <[email protected]>
AuthorDate: Tue Dec 13 11:54:41 2022 +0100

    ISIS-3304: YamlUtils polishing
---
 .../src/main/java/org/apache/causeway/commons/io/YamlUtils.java  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 
a/commons/src/main/java/org/apache/causeway/commons/io/YamlUtils.java 
b/commons/src/main/java/org/apache/causeway/commons/io/YamlUtils.java
index 7985385679..6688a130cc 100644
--- a/commons/src/main/java/org/apache/causeway/commons/io/YamlUtils.java
+++ b/commons/src/main/java/org/apache/causeway/commons/io/YamlUtils.java
@@ -98,9 +98,16 @@ public class YamlUtils {
                 : null;
     }
 
-
     // -- CUSTOMIZERS
 
+    /**
+     * Include read-only JavaBean properties (the ones without setters) in the 
YAML document.
+     * <p>
+     * By default these properties are not included to be able to parse later 
the same JavaBean. */
+    public DumperOptions allowReadOnlyProperties(final DumperOptions opts) {
+        opts.setAllowReadOnlyProperties(true);
+        return opts;
+    }
 
     // -- MAPPER FACTORY
 

Reply via email to