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

veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git

commit 3ba98001cb19c39cbba039680fff60249ec27bf7
Author: Andreas Veithen-Knowles <[email protected]>
AuthorDate: Sun Jun 14 15:39:52 2026 +0000

    Remove the checkerframework profile
    
    Instead, always execute the checker framework on relevant modules.
    
    Also fix some remaining issues.
---
 components/core-streams/pom.xml                       | 17 +++++++++++++++++
 implementations/axiom-dom/pom.xml                     |  5 ++++-
 implementations/axiom-impl/pom.xml                    |  5 ++++-
 .../axiom/om/impl/intf/AxiomNamedInformationItem.java | 15 +++++++++++++++
 mixins/pom.xml                                        | 17 +++++++++++++++++
 pom.xml                                               | 19 -------------------
 6 files changed, 57 insertions(+), 21 deletions(-)

diff --git a/components/core-streams/pom.xml b/components/core-streams/pom.xml
index 931aee9d8..71d46b441 100644
--- a/components/core-streams/pom.xml
+++ b/components/core-streams/pom.xml
@@ -113,4 +113,21 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths combine.children="append">
+                        <annotationProcessorPath>
+                            <groupId>${project.groupId}</groupId>
+                            
<artifactId>stringorcharacterdata-checker</artifactId>
+                            <version>${project.version}</version>
+                        </annotationProcessorPath>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/implementations/axiom-dom/pom.xml 
b/implementations/axiom-dom/pom.xml
index 6ba63f53f..451d7a49e 100644
--- a/implementations/axiom-dom/pom.xml
+++ b/implementations/axiom-dom/pom.xml
@@ -227,7 +227,10 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Import-Package>*</Import-Package>
+                        <Import-Package>
+                            org.checkerframework.*;resolution:=optional,
+                            *
+                        </Import-Package>
                         <Private-Package>
                             org.apache.axiom.core.*,
                             !org.apache.axiom.om.impl,
diff --git a/implementations/axiom-impl/pom.xml 
b/implementations/axiom-impl/pom.xml
index cc956d301..f05649be7 100644
--- a/implementations/axiom-impl/pom.xml
+++ b/implementations/axiom-impl/pom.xml
@@ -182,7 +182,10 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Import-Package>*</Import-Package>
+                        <Import-Package>
+                            org.checkerframework.*;resolution:=optional,
+                            *
+                        </Import-Package>
                         <Private-Package>
                             org.apache.axiom.core.*,
                             !org.apache.axiom.om.impl,
diff --git 
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/AxiomNamedInformationItem.java
 
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/AxiomNamedInformationItem.java
index 8ab0c20cd..e99e4c9fe 100644
--- 
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/AxiomNamedInformationItem.java
+++ 
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/AxiomNamedInformationItem.java
@@ -22,6 +22,7 @@ import javax.xml.namespace.QName;
 import org.apache.axiom.core.CoreNSAwareNamedNode;
 import org.apache.axiom.om.OMNamedInformationItem;
 import org.apache.axiom.om.OMNamespace;
+import org.checkerframework.dataflow.qual.Pure;
 
 public interface AxiomNamedInformationItem extends OMNamedInformationItem, 
AxiomInformationItem, CoreNSAwareNamedNode {
     void internalSetNamespace(OMNamespace namespace);
@@ -35,4 +36,18 @@ public interface AxiomNamedInformationItem extends 
OMNamedInformationItem, Axiom
     QName defaultGetQName();
 
     void beforeSetLocalName();
+
+    // Checker Framework assumes that the getLocalName, getPrefix and 
getNamespaceURI methods defined by DOM are pure.
+    // For compatibility, we need to declare them as pure in Axiom too, even 
though that might not be entirely correct.
+    @Override
+    @Pure
+    String getLocalName();
+
+    @Override
+    @Pure
+    String getPrefix();
+
+    @Override
+    @Pure
+    String getNamespaceURI();
 }
diff --git a/mixins/pom.xml b/mixins/pom.xml
index f78cb1584..10f48bb92 100644
--- a/mixins/pom.xml
+++ b/mixins/pom.xml
@@ -37,4 +37,21 @@
         <module>dom-mixins</module>
         <module>om-mixins</module>
     </modules>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <annotationProcessorPaths combine.children="append">
+                        <annotationProcessorPath>
+                            <groupId>${project.groupId}</groupId>
+                            
<artifactId>stringorcharacterdata-checker</artifactId>
+                            <version>${project.version}</version>
+                        </annotationProcessorPath>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/pom.xml b/pom.xml
index b410b45f6..b35cf2daf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1428,24 +1428,5 @@ $${type_declaration}</template></templates>]]></value>
                 </plugins>
             </build>
         </profile>
-        <profile>
-            <id>checkerframework</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-compiler-plugin</artifactId>
-                        <configuration>
-                            <annotationProcessorPaths 
combine.children="append">
-                                <annotationProcessorPath>
-                                    <groupId>${project.groupId}</groupId>
-                                    
<artifactId>stringorcharacterdata-checker</artifactId>
-                                    <version>${project.version}</version>
-                                </annotationProcessorPath>
-                            </annotationProcessorPaths>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
     </profiles>
 </project>

Reply via email to