You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kw...@apache.org on 2026/02/24 15:37:08 UTC
(maven-doxia) branch master updated: Return SinkEventAttributes instead of super class MutableAttributeSet for filterAttributes
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
The following commit(s) were added to refs/heads/master by this push:
new fc87c531 Return SinkEventAttributes instead of super class MutableAttributeSet for filterAttributes
fc87c531 is described below
commit fc87c531a1b372fecd9cbf054cef98fc42b3820f
Author: Konrad Windszus <kw...@apache.org>
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 | 7 +++----
1 file changed, 3 insertions(+), 4 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..1a47808c 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
@@ -19,7 +19,6 @@
package org.apache.maven.doxia.sink.impl;
import javax.swing.text.AttributeSet;
-import javax.swing.text.MutableAttributeSet;
import java.util.Arrays;
import java.util.Enumeration;
@@ -226,10 +225,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 +237,7 @@ public class SinkUtils {
return new SinkEventAttributeSet(0);
}
- MutableAttributeSet atts = new SinkEventAttributeSet(attributes.getAttributeCount());
+ SinkEventAttributes atts = new SinkEventAttributeSet(attributes.getAttributeCount());
Enumeration<?> names = attributes.getAttributeNames();