This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch feature/return-value-of-filterattributes in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
commit e8036b1a9b713713371c9a7d603f3ed4c06c321c Author: Konrad Windszus <[email protected]> AuthorDate: Thu Feb 19 11:08:30 2026 +0100 Return SinkEventAttributes instead of super class MutableAttributeSet for filterAttributes That way the return value can be used to easily access also the members only provided by SinkEventAttributes (e.g. the constants). --- .../src/main/java/org/apache/maven/doxia/sink/impl/SinkUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkUtils.java b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkUtils.java index 4433e645..b6839066 100644 --- a/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkUtils.java +++ b/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/SinkUtils.java @@ -226,10 +226,10 @@ public class SinkUtils { * are compared to the elements of the valids array. * @param valids a sorted array of attribute names that are to be kept in the resulting AttributeSet. * <b>Note:</b> a binary search is employed, so the array has to be sorted for correct results. - * @return A filtered MutableAttributeSet object. Returns null if the input AttributeSet is null. + * @return A filtered {@link SinkEventAttributes} object. Returns null if the input AttributeSet is null. * If the array of valids is either null or empty, an empty AttributeSet is returned. */ - public static MutableAttributeSet filterAttributes(AttributeSet attributes, String[] valids) { + public static SinkEventAttributes filterAttributes(AttributeSet attributes, String[] valids) { if (attributes == null) { return null; } @@ -238,7 +238,7 @@ public class SinkUtils { return new SinkEventAttributeSet(0); } - MutableAttributeSet atts = new SinkEventAttributeSet(attributes.getAttributeCount()); + SinkEventAttributes atts = new SinkEventAttributeSet(attributes.getAttributeCount()); Enumeration<?> names = attributes.getAttributeNames();
