feat: remove XMLBeans dependency from metaschema-testing module#567
Conversation
📝 WalkthroughWalkthroughReplaces XMLBeans artifacts with Metaschema-generated bindings and a YAML-first metaschema for the test-suite, updates build and static-analysis configuration, adds a bootstrap POM for regenerating bindings, and refactors test loading to use the bindingContext/bound loader API. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant TestRunner
participant BindingContext
participant BoundLoader
participant TestSuiteModel
Note over TestRunner,BindingContext: New binding-based load flow (replaces XMLBeans)
TestRunner->>BindingContext: obtain bindingContext
BindingContext->>BoundLoader: newBoundLoader()
TestRunner->>BoundLoader: load(TestSuite.class, URL)
BoundLoader->>TestSuiteModel: instantiate generated TestSuite model
BoundLoader-->>TestRunner: return TestSuiteModel
Note right of TestRunner: iterate via getTestCollections()/getTestScenarios()
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PMD (7.19.0)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java[ERROR] Cannot load ruleset pmd/category/java/custom.xml: Cannot resolve rule/ruleset reference 'pmd/category/java/custom.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath. core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.java[ERROR] Cannot load ruleset pmd/category/java/custom.xml: Cannot resolve rule/ruleset reference 'pmd/category/java/custom.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath. metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java[ERROR] Cannot load ruleset pmd/category/java/custom.xml: Cannot resolve rule/ruleset reference 'pmd/category/java/custom.xml'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath.
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (2)
443-465: Add Javadoc to document null return behavior.While private methods don't require Javadoc per guidelines, this method's null return for unrecognized formats is a subtle behavior worth documenting for maintainability.
📝 Suggested Javadoc
+ /** + * Convert a source format string to the corresponding Format enum value. + * + * @param sourceFormat + * the source format string (e.g., "XML", "JSON", "YAML") + * @return the corresponding Format, or {@code null} if the format is {@code null} or not recognized + */ @Nullable private static Format toFormat(@Nullable String sourceFormat) {
546-548: Consider adding Javadoc for clarity.While not required for private methods, documenting the
isValidhelper would improve code clarity, especially since "VALID" is a domain-specific validation result value.📝 Suggested Javadoc
+ /** + * Check if the validation result string indicates a valid result. + * + * @param validationResult + * the validation result string + * @return {@code true} if the result indicates valid, {@code false} otherwise + */ private static boolean isValid(@Nullable String validationResult) {
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
CLAUDE.mdPRDs/20251221-xmlbeans-removal/implementation-plan.mddatabind/spotbugs-exclude.xmldatabind/src/main/java/org/apache/xmlbeans/metadata/system/metaschema/codegen/package-info.javadocs/javadoc-style-guide.mdmetaschema-testing/pom.xmlmetaschema-testing/spotbugs-exclude.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/FormatType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/GenerationResultType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/ValidationResultType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/package-info.javametaschema-testing/src/main/metaschema/unit-tests.yamlmetaschema-testing/src/schema/xmlconfig.xmlpom.xml
💤 Files with no reviewable changes (7)
- databind/src/main/java/org/apache/xmlbeans/metadata/system/metaschema/codegen/package-info.java
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/FormatType.java
- databind/spotbugs-exclude.xml
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/ValidationResultType.java
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/package-info.java
- metaschema-testing/src/schema/xmlconfig.xml
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/GenerationResultType.java
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/spotbugs-exclude.xmlCLAUDE.mddocs/javadoc-style-guide.mdpom.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/spotbugs-exclude.xmlCLAUDE.mdPRDs/20251221-xmlbeans-removal/implementation-plan.mdmetaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
metaschema-testing/spotbugs-exclude.xmlCLAUDE.mddocs/javadoc-style-guide.mdmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
CLAUDE.mddocs/javadoc-style-guide.mdPRDs/20251221-xmlbeans-removal/implementation-plan.mdpom.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/src/main/antlr4/** : Metapath parser is generated from ANTLR4 grammar files in core/src/main/antlr4. Code generation occurs during Maven build producing output in target/generated-sources/
Applied to files:
CLAUDE.mdpom.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-19T04:01:45.001Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:45.001Z
Learning: In Java code for metaschema-framework/metaschema-java, override methods (annotated with Override) that implement interface methods automatically inherit Javadoc from the interface and do not require redundant documentation in the implementing class unless there is implementation-specific behavior that needs to be documented beyond what the interface specifies.
Applied to files:
CLAUDE.mddocs/javadoc-style-guide.md
📚 Learning: 2025-12-13T21:16:12.281Z
Learnt from: CR
Repo: metaschema-framework/metaschema PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T21:16:12.281Z
Learning: When adding or modifying datatypes, update `schema/json/metaschema-datatypes.json`, `schema/xml/metaschema-datatypes.xsd`, and `website/content/specification/datatypes.md` in sync
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include param, return, throws tags in the correct order (BLOCKING)
Applied to files:
CLAUDE.mddocs/javadoc-style-guide.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*Test.java : Test methods do not require Javadoc if they use descriptive method names. Use JUnit 5 for testing with parallel execution enabled.
Applied to files:
CLAUDE.mddocs/javadoc-style-guide.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Java target version must be Java 11. Use SpotBugs annotations (NonNull, Nullable) for null safety in code.
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: All PRs must be created from a personal fork and must target the develop branch (BLOCKING - required by CONTRIBUTING.md)
Applied to files:
PRDs/20251221-xmlbeans-removal/implementation-plan.md
📚 Learning: 2025-12-13T21:16:12.281Z
Learnt from: CR
Repo: metaschema-framework/metaschema PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T21:16:12.281Z
Learning: All PRs must target the `develop` branch, not `main`. The `main` branch receives merges only from `develop` during releases.
Applied to files:
PRDs/20251221-xmlbeans-removal/implementation-plan.md
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
🔇 Additional comments (13)
docs/javadoc-style-guide.md (1)
10-10: LGTM: XMLBeans exclusion removed appropriately.The removal of
*.xmlbeansfrom the excluded packages list correctly reflects the project's migration away from XMLBeans. The documentation now accurately describes only ANTLR as the source of generated code requiring exclusions.Also applies to: 354-354
PRDs/20251221-xmlbeans-removal/implementation-plan.md (1)
127-127: LGTM: Implementation plan accurately reflects PR completion.The status update to "Ready for PR" and all acceptance criteria marked as complete correctly document the successful completion of Phase 2 (metaschema-testing module migration and cleanup).
Also applies to: 180-192
pom.xml (1)
588-588: LGTM: Javadoc exclusion correctly simplified.The removal of
*.xmlbeansfrom the Javadoc exclusion pattern correctly reflects the elimination of XMLBeans from the project. Only ANTLR-generated packages now require exclusion from Javadoc generation.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (3)
79-79: LGTM: Constant appropriately defined.The
VALIDconstant provides a clear, maintainable reference for validation result checking, replacing hardcoded string literals.
152-166: LGTM: Loader-based approach correctly replaces XMLBeans parsing.The migration from XMLBeans
TestSuiteDocument.Factory.parse()tobindingContext.newBoundLoader().load()correctly aligns with the new Metaschema bindings architecture. The null-safe handling oftestCollectionsprevents NPE when no collections are present.
477-500: Verify null handling when toFormat returns null.When
toFormat()returnsnullfor an unrecognized format, the test case is skipped (line 480retval = null). This appears intentional, but ensure this aligns with expected test behavior—should unrecognized formats produce a test failure instead?metaschema-testing/spotbugs-exclude.xml (1)
12-15: LGTM: Appropriate exclusion for generated bindings.The SpotBugs exclusion for the
gov.nist.secauto.metaschema.model.testing.binding.*package correctly prevents analysis of generated code, consistent with the project's approach to ANTLR and other generated sources.CLAUDE.md (2)
105-116: LGTM: Documentation accurately reflects YAML-first approach.The new "Metaschema Module Authoring" section provides clear guidance for creating YAML Metaschema modules with proper IDE validation support. The replacement of XMLBeans references with metaschema-maven-plugin documentation correctly reflects the architectural change.
178-178: LGTM: Generated code exclusion documentation updated.The removal of
*.xmlbeanspackages from the generated code exclusion list is consistent with the XMLBeans removal and correctly documents only ANTLR as requiring exclusions.metaschema-testing/pom.xml (3)
59-76: LGTM: Build plugin exclusions properly configured.The configuration correctly:
- Excludes generated metaschema sources from PMD analysis
- Excludes generated binding classes from Checkstyle
- Configures SpotBugs to use the exclusion filter file
This ensures generated code doesn't trigger false positives in static analysis tools.
81-99: LGTM: Metaschema plugin correctly configured.The metaschema-maven-plugin configuration properly:
- Uses the
generate-sourcesgoal and phase- Points to the
unit-tests.yamlMetaschema module- Replaces the XMLBeans plugin with native Metaschema binding generation
This aligns with the project's migration to YAML-first Metaschema definitions.
105-113: LGTM: Build helper correctly updated.The build-helper-maven-plugin configuration properly adds the new
target/generated-sources/metaschemadirectory to the source path, replacing the old XMLBeans-generated sources location.metaschema-testing/src/main/metaschema/unit-tests.yaml (1)
1-199: LGTM: Well-structured Metaschema definition.The YAML Metaschema module is comprehensive and well-organized:
- Clear hierarchy: test-suite → test-collection → test-scenario → validation/generation cases
- Proper use of Metaschema constructs (assembly-ref, flag-ref, group-as)
- Appropriate constraints with allowed-values enumerations
- Sensible defaults (VALID, SUCCESS, MATCH)
- Good documentation with formal names and descriptions
Note: Verification that the Java bindings compile successfully requires Maven execution in a build environment and cannot be automated in this context. Manual verification is needed to confirm the module generates valid compilable Java bindings.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
PRDs/20251221-xmlbeans-removal/implementation-plan.md (1)
209-229: Bootstrap regeneration documentation is clear but could reference package-info location.The bootstrap class regeneration section provides good step-by-step instructions. Consider adding an explicit reference to where the regeneration instructions should be documented (e.g.,
databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/package-info.java) to ensure future maintainers find this guidance readily.🔎 Proposed enhancement for cross-reference
This process should be documented in the package-info.java or a README in the binding package. + +For example, see: `databind/src/main/java/gov/nist/secauto/metaschema/databind/config/binding/package-info.java`
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
PRDs/20251221-xmlbeans-removal/implementation-plan.md
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
PRDs/20251221-xmlbeans-removal/implementation-plan.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
PRDs/20251221-xmlbeans-removal/implementation-plan.md
🔇 Additional comments (3)
PRDs/20251221-xmlbeans-removal/implementation-plan.md (3)
179-193: Acceptance criteria appropriately scoped and marked complete.The acceptance criteria for Phase 2 comprehensively cover the scope: schema generation, Maven configuration, API migration, artifact cleanup, dependency management, and verification. All items marked complete align with the PR objectives (PR #567) confirming Metaschema binding migration, no remaining XMLBeans references, and passing tests.
151-151: Clarification on submodule scope is helpful.The added note clarifying that
core/metaschema/test-suite/unit-tests.xsdresides in a separate repository prevents confusion about what "deletion" means in the Phase 2 scope and sets expectations for artifacts outside this repository.
7-21: Prerequisites and reference materials are well-positioned.The prerequisite section and reference to the Metaschema JSON schema are appropriately placed to guide implementers authoring the YAML modules. This is especially helpful for translating XSD structures to Metaschema assemblies.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (2)
30-32: Remove extraneous quotes from Javadoc description.The Javadoc description on line 31 has unnecessary quotes around the entire text. This should be corrected in the binding generator configuration to produce standard Javadoc format.
🔎 Expected Javadoc format
/** - * "A URI reference to the metaschema module location." + * A URI reference to the metaschema module location. */
49-52: Add null safety annotation to return type.The
getMetaschemaData()method can returnnull(as evidenced by the no-argument constructor passingnull). The return type should be annotated with@Nullableto document this behavior and enable static analysis tools to catch potential null pointer exceptions.Verify that the binding generator is configured to produce appropriate null safety annotations on return types and parameters.
As per coding guidelines, SpotBugs annotations (@nonnull, @nullable) should be used for null safety in code.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
metaschema-testing/pom.xmlmetaschema-testing/spotbugs-exclude.xmlmetaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestCollection.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestScenario.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestSuite.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.java
🚧 Files skipped from review as they are similar to previous changes (1)
- metaschema-testing/spotbugs-exclude.xml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestCollection.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestSuite.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestScenario.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.javametaschema-testing/pom.xml
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestCollection.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestSuite.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestScenario.javametaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.javametaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
metaschema-testing/pom.xml
📚 Learning: 2024-11-14T17:07:03.586Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 245
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/item/atomic/IIPv4AddressItem.java:66-73
Timestamp: 2024-11-14T17:07:03.586Z
Learning: In the Metaschema Java codebase, differences in casting patterns across atomic type implementations are intentional and required; any differences in approach are significant and necessary.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧬 Code graph analysis (4)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.java (2)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestCollection.java (9)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/StringAdapter.java (1)
StringAdapter(23-46)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerateSchema.java (1)
MetaschemaAssembly(31-160)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestScenario.java (1)
MetaschemaAssembly(27-129)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestSuite.java (1)
MetaschemaAssembly(25-96)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.java (1)
MetaschemaAssembly(27-116)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.java (2)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code
- GitHub Check: Website
🔇 Additional comments (13)
metaschema-testing/pom.xml (2)
51-70: LGTM! Clean removal of XMLBeans build configuration.The build configuration has been appropriately simplified by removing XMLBeans-related plugins (xmlbeans-maven-plugin, build-helper-maven-plugin) and adding proper exclusions for the new Metaschema-generated binding classes in both Checkstyle and SpotBugs. This aligns well with the PR's objective to replace XMLBeans with Metaschema bindings.
56-60: The checkstyle exclude path and spotbugs configuration are correctly configured. The generated binding classes atgov/nist/csrc/ns/metaschema/test_suite/_1_0/are properly excluded from style checks. The package-info.java provides excellent documentation of the pre-generated bootstrap approach and includes clear regeneration instructions to handle the circular dependency with metaschema-maven-plugin.metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/package-info.java (1)
1-32: Well-documented bootstrap approach for generated bindings.The package-level documentation clearly explains the cyclic dependency workaround and provides actionable regeneration steps. The package name
gov.nist.csrc.ns.metaschema.test_suite._1_0reflects the XML namespacehttp://csrc.nist.gov/ns/metaschema/test-suite/1.0, which is the expected convention for generated Metaschema bindings (distinct from thegov.nist.secauto.metaschema.*convention used for hand-written framework code).metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/MetaschemaTestSuiteModule.java (1)
19-75: Module class structure is correct.The module correctly extends
AbstractBoundModule, registers all assembly classes via@MetaschemaModule, and provides standard metadata accessors. The override methods appropriately rely on inherited Javadoc from the interface. Based on learnings, this is the expected pattern.metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestCollection.java (1)
26-137: Binding class implementation is consistent and correct.The
TestCollectionclass follows the established pattern for Metaschema bindings:
- Required flags properly annotated with
required = true- Collection management with lazy initialization and null-safety via
ObjectUtils.requireNonNull- Javadoc on public helper methods (
addTestScenario,removeTestScenario)metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/ValidationCase.java (1)
24-116: Validation case binding is well-structured.The
ValidationCaseclass correctly models a content validation test case with:
- Appropriate constraint levels (
IConstraint.Level.ERROR) for allowed values- Default value
"VALID"forvalidationResult- Required
locationflag withUriReferenceAdaptermetaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestSuite.java (1)
22-96: Root element binding is correct.The
TestSuiteclass properly serves as the root element (rootName = "test-suite") and aggregatesTestCollectionitems. The collection management pattern is consistent with other binding classes in this package.metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/TestScenario.java (1)
24-129: Test scenario binding correctly models the test structure.The
TestScenarioclass provides the expected model with:
- Required
nameflag for identification- Optional
generateSchemaassembly (single instance)- Optional
validationCasescollection with unbounded cardinalityThe collection management for
validationCasesfollows the established pattern.metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerateSchema.java (1)
28-160: Schema generation binding is correctly structured.The
GenerateSchemaclass appropriately:
- Defaults
generationResultto"SUCCESS"andvalidationResultto"VALID"for common success cases- Requires
metaschemaassembly (minOccurs = 1) since schema generation needs a source module- Provides collection management for
generationCasesmetaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/GenerationCase.java (1)
24-115: Generation case binding follows established patterns.The
GenerationCaseclass mirrors the structure ofValidationCasewith appropriate differences:
matchResultdefaults to"MATCH"for expected comparison tests- Required
locationflag for the expected schema file reference- Optional
sourceFormatflag for specifying content formatThe implementation is consistent with the other binding classes in this package.
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (3)
62-65: LGTM!The
toString()implementation usingReflectionToStringBuilderis appropriate for generated binding classes. The inherited Javadoc fromObject.toString()is sufficient per project practices.
6-6: Package naming is correct for generated schema-derived bindings.The package
gov.nist.csrc.ns.metaschema.test_suite._1_0is intentionally derived from the XML namespacehttp://csrc.nist.gov/ns/metaschema/test-suite/1.0. This is the standard and correct naming pattern for code generated from external XML schemas. Thegov.nist.secauto.metaschema.*convention applies to framework code, not generated bindings. No changes needed.
41-47: This file is located in a directory (gov/nist/csrc/ns/metaschema/test_suite/_1_0/) that is explicitly excluded from checkstyle validation in the project'spom.xmlconfiguration. These are generated test fixtures that are intentionally exempt from the Javadoc and style guidelines that apply to the rest of the codebase. The review comment should not request manual changes to this generated code.Likely an incorrect or invalid review comment.
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
databind/pom.xmldatabind/src/main/config/pmd/ruleset.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/config/pmd/ruleset.xml
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/config/pmd/ruleset.xmldatabind/src/main/config/pmd/ruleset.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
databind/pom.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
databind/pom.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Website
- GitHub Check: Code
🔇 Additional comments (5)
databind/pom.xml (1)
102-104: LGTM! Cleaner approach to PMD configuration.The shift from file exclusions to a centralized ruleset configuration is a good practice. This allows PMD analysis to run on generated binding classes while accommodating their naming conventions.
metaschema-testing/src/main/config/pmd/ruleset.xml (1)
18-25: Field naming patterns accommodate generated binding conventions.The regex patterns appropriately allow underscore-prefixed field names used by the generated binding classes:
defaultFieldPatternpermits single underscore prefix (e.g.,_location)finalFieldPatternpermits double underscore prefix (e.g.,__metaschemaData)databind/src/main/config/pmd/ruleset.xml (2)
13-13: Verify the relative path to the project ruleset.Same issue as in the metaschema-testing ruleset: the path
../../../../../../src/main/config/pmd/ruleset.xmlcontains 7 parent directory references, but only 5 should be needed fromdatabind/src/main/config/pmd/to reach the project root. Please verify that PMD correctly resolves this path and inherits the project rules.The verification script from the metaschema-testing ruleset review can be adapted for this module as well.
18-25: Field naming patterns accommodate generated binding conventions.The customized patterns appropriately allow underscore-prefixed field names for generated bindings while preserving validation for hand-written code.
metaschema-testing/pom.xml (1)
54-76: Well-structured static analysis configuration for generated code.The pluginManagement configuration appropriately handles generated binding classes:
- Checkstyle excludes the generated test_suite bindings
- SpotBugs uses a separate exclusion filter file
- PMD uses the custom ruleset to accommodate naming conventions
This approach preserves code quality checks while accommodating the conventions of metaschema-maven-plugin generated code.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
databind/src/main/config/pmd/field-naming-ruleset.xml (1)
1-18: LGTM! Clean two-ruleset approach for generated code.The ruleset structure correctly implements the two-ruleset PMD strategy: excluding generated binding classes from field naming conventions while allowing other PMD rules to apply. The exclude pattern catches all binding directories, which aligns with the project's generated code locations.
Optional: Consider verifying pattern scope
The pattern
.*/binding/.*\.javawill match any directory named "binding" anywhere in the path. While this appears intentional (given multiple binding packages exist per Checkstyle config), you could optionally verify no non-generated code accidentally gets excluded:#!/bin/bash # Find all Java files matching the PMD exclude pattern to verify they're all generated fd --type f --full-path '.*/binding/.*\.java' databind/src/main/java | head -20If all results are in expected generated binding directories (
model/metaschema/binding,config/binding), the pattern is appropriately scoped.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
databind/pom.xmldatabind/src/main/config/pmd/field-naming-ruleset.xmldatabind/src/main/config/pmd/ruleset.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/config/pmd/field-naming-ruleset.xmlmetaschema-testing/src/main/config/pmd/ruleset.xml
🚧 Files skipped from review as they are similar to previous changes (2)
- metaschema-testing/src/main/config/pmd/ruleset.xml
- databind/src/main/config/pmd/ruleset.xml
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/config/pmd/field-naming-ruleset.xmldatabind/pom.xmldatabind/src/main/config/pmd/field-naming-ruleset.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/src/main/config/pmd/field-naming-ruleset.xmldatabind/pom.xmlmetaschema-testing/pom.xmldatabind/src/main/config/pmd/field-naming-ruleset.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
databind/pom.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code
- GitHub Check: Website
🔇 Additional comments (3)
databind/pom.xml (1)
102-114: LGTM! Well-structured static analysis configuration.The plugin configuration correctly implements the two-ruleset PMD approach and adds SpotBugs exclusions for generated code. This allows comprehensive rule coverage on hand-written code while accommodating the underscore-prefixed fields in generated bindings.
metaschema-testing/src/main/config/pmd/field-naming-ruleset.xml (1)
1-18: LGTM! Appropriately scoped exclusion pattern.The ruleset correctly excludes version-specific generated test suite bindings (
test_suite/_1_0) from field naming checks. The pattern is more specific than the databind equivalent, which is appropriate given the module-specific nature of these generated classes.metaschema-testing/pom.xml (1)
54-77: LGTM! Comprehensive static analysis configuration for generated code.The plugin configuration properly excludes generated test suite bindings from Checkstyle, SpotBugs, and PMD checks. The two-ruleset PMD approach is correctly implemented, mirroring the databind module's structure.
The pattern differences between tools (Checkstyle glob
**/gov/nist/csrc/ns/metaschema/test_suite/_1_0/**/*vs PMD regex.*/test_suite/_1_0/.*\.java) are expected and functionally equivalent for their respective contexts.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
73-73: Add null-safety annotation to setter parameter.The
valueparameter insetLocation(URI)is missing a null-safety annotation, which was previously flagged in review. While the@BoundFlagannotation marks the field asrequired = true, the getter returns@Nullableand the no-arg constructor doesn't initialize_location, indicating the field can be null in the Java object model.For consistency and to aid static analysis, annotate the parameter with
@Nullable(or@NonNullif validation is added to reject null values).🔎 Proposed fix
/** * Set the URI reference to the metaschema module location. * * @param value * the location URI to set */ - public void setLocation(URI value) { + public void setLocation(@Nullable URI value) { _location = value; }As per coding guidelines, use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Learnt from: CR
Repo: metaschema-framework/metaschema PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-13T21:16:12.281Z
Learning: Keep `schema/json/`, `schema/xml/`, and `website/content/specification/datatypes.md` in sync when updating schema definitions
📚 Learning: 2024-11-14T17:07:03.586Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 245
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/item/atomic/IIPv4AddressItem.java:66-73
Timestamp: 2024-11-14T17:07:03.586Z
Learning: In the Metaschema Java codebase, differences in casting patterns across atomic type implementations are intentional and required; any differences in approach are significant and necessary.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include param, return, throws tags in the correct order (BLOCKING)
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Java target version must be Java 11. Use SpotBugs annotations (NonNull, Nullable) for null safety in code.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧬 Code graph analysis (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Code
- GitHub Check: Website
🔇 Additional comments (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
6-6: No action needed. These are pre-generated binding classes committed to source control. The package namegov.nist.csrc.ns.metaschema.test_suite._1_0correctly reflects the XML namespacehttp://csrc.nist.gov/ns/metaschema/test-suite/1.0via standard Java package naming conventions. Thepackage-info.javafile provides explicit generation documentation, including the rationale for the bootstrap approach (circular dependency) and instructions for regeneration after schema modifications.
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (2)
44-59: Constructor Javadoc and annotations properly added.The constructors now have complete Javadoc documentation with appropriate
@paramtags, and the data parameter is correctly annotated with@Nullable. This addresses the previous review feedback and meets the coding guidelines requirement for 100% Javadoc coverage on public members.
66-74: Getter Javadoc and null safety annotation properly added.The
getLocation()method now has complete Javadoc with an@returntag, and the return type is correctly annotated with@Nullable. This addresses the previous review feedback.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2024-11-14T17:07:03.586Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 245
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/item/atomic/IIPv4AddressItem.java:66-73
Timestamp: 2024-11-14T17:07:03.586Z
Learning: In the Metaschema Java codebase, differences in casting patterns across atomic type implementations are intentional and required; any differences in approach are significant and necessary.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include param, return, throws tags in the correct order (BLOCKING)
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Java target version must be Java 11. Use SpotBugs annotations (NonNull, Nullable) for null safety in code.
Applied to files:
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
🧬 Code graph analysis (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Website
- GitHub Check: Code
🔇 Additional comments (1)
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java (1)
76-84: The @nullable annotation on the setter is appropriate and intentional. For data binding classes like this,@BoundFlag(required=true)specifies that the field is required in serialized form (schema validation), not that it must be non-null in the Java object state. Both the getter and setter correctly use@Nullableto reflect that the field can be null in memory before or after deserialization, which is a valid lifecycle state. The getter's javadoc explicitly documents this: "or {@code null} if not set". This is the correct pattern and requires no changes.
metaschema-testing/src/main/java/gov/nist/csrc/ns/metaschema/test_suite/_1_0/Metaschema.java
Outdated
Show resolved
Hide resolved
Addressed CodeRabbit FeedbackMetaschema.java - Accessor Methods & Null Safety
PMD Ruleset Path
Package Naming
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (1)
572-580: Incorrect log level for informational message.Line 574 uses
atError()for the message "Validating: {}", but this appears to be informational. Compare with line 527 which usesatInfo()for a similar message. Consider usingatInfo()oratDebug()for consistency.🔎 Proposed fix
protected static boolean validateWithSchema(@NonNull IContentValidator validator, @NonNull Path target) throws IOException { - LOGGER.atError().log("Validating: {}", target); + LOGGER.atInfo().log("Validating: {}", target); IValidationResult schemaValidationResult = validator.validate(target); if (!schemaValidationResult.isPassing()) { LOGGER.atError().log("Schema validation failed for: {}", target); } return processValidationResult(schemaValidationResult); }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
metaschema-testing/pom.xmlmetaschema-testing/src/main/config/pmd/field-naming-ruleset.xmlmetaschema-testing/src/main/config/spotbugs/exclude.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xml
🚧 Files skipped from review as they are similar to previous changes (2)
- metaschema-testing/src/main/config/spotbugs/exclude.xml
- metaschema-testing/src/main/config/pmd/field-naming-ruleset.xml
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/pom.xml
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xmlmetaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/src/main/antlr4/** : Metapath parser is generated from ANTLR4 grammar files in core/src/main/antlr4. Code generation occurs during Maven build producing output in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
metaschema-testing/pom.xml
🧬 Code graph analysis (1)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)
🔇 Additional comments (8)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (6)
21-26: Imports correctly reference generated binding classes.The import statements align with the binding configuration in
test-suite-bindings.xml, using the packagegov.nist.secauto.metaschema.model.testing.testsuite.
152-164: Clean migration to binding-based loading with proper null-safety.The switch from XMLBeans
TestSuiteDocumentparsing tobindingContext.newBoundLoader().load()is well-implemented. The null-safe handling oftestCollectionsusingStream.empty()as fallback is appropriate.
224-239: Consistent null-safety pattern for test scenarios.The null-safe handling mirrors the pattern in
testFactory(), maintaining consistency throughout the codebase.
443-465: Well-documented helper method with proper null-safety.The
toFormat()method has complete Javadoc with@paramand@returntags, and correctly uses@Nullableannotations for both parameter and return type.
468-536: Clean adaptation to new binding model with clearer naming.The use of
expectedValidboolean throughout the method improves readability. The helper methodstoFormat()andisValid()encapsulate the conversion logic appropriately.
539-548: Simple and safe validation result check.The
VALID.equals(validationResult)pattern correctly handles null input (returns false), making the explicit null check unnecessary.metaschema-testing/pom.xml (2)
54-76: Well-configured metaschema-maven-plugin replaces XMLBeans.The plugin configuration correctly references the binding config and metaschema YAML file. Using
${project.version}ensures version consistency.
78-105: Appropriate static analysis exclusions for generated code.The configuration correctly excludes the generated
testsuitepackage from Checkstyle and SpotBugs analysis, and the referenced PMD rulesets and SpotBugs exclude file are properly configured in place.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
54-60: Consider adding@NonNullannotation togetLocation()for null safety.The
locationfield is marked asrequired = truein the@BoundFlagannotation (line 37), indicating it should always have a value after successful deserialization. Adding a@NonNullannotation to the getter would make this contract explicit and enable SpotBugs to verify callers handle the value correctly.As per coding guidelines, SpotBugs annotations should be used for null safety in code.
🔎 Proposed enhancement
+import edu.umd.cs.findbugs.annotations.NonNull; + ... + @NonNull public URI getLocation() { return _location; }metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (2)
60-66: Missing Javadoc on constructors.As per coding guidelines, public constructors require Javadoc with
@paramtags. The similarMetaschema.javaclass in this PR includes Javadoc for its constructors.Suggested Javadoc for constructors
+ /** + * Constructs a new {@code TestScenario} instance with no metadata. + */ public TestScenario() { this(null); } + /** + * Constructs a new {@code TestScenario} instance with the provided metadata. + * + * @param data + * the metaschema data, or {@code null} if none + */ public TestScenario(IMetaschemaData data) { this.__metaschemaData = data; }
73-95: Missing Javadoc on accessor methods.Public getter and setter methods lack Javadoc documentation. Per coding guidelines, public members require Javadoc with
@paramand@returntags.However, if these classes are generated by the metaschema-maven-plugin bootstrap process (as indicated in the PR summary), this may be acceptable as-is since regeneration would overwrite manual changes.
Please confirm whether these binding classes are fully generated or manually maintained. If manually maintained, Javadoc should be added to all public accessors.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
43-54: Missing Javadoc on constructors and basic accessors.Same observation as
TestScenario.java: constructors and getter/setter methods lack Javadoc. This is consistent across all binding classes in this PR, suggesting a deliberate pattern (possibly due to generated code nature).metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (1)
68-73: Required assembly accessor may return null despiteminOccurs = 1.The
metaschemafield is marked as required (minOccurs = 1), butgetMetaschema()can returnnullif the object is constructed programmatically without setting the field. Consider adding@Nullableannotation for clarity, or document that callers should expect a non-null value after successful deserialization.This is consistent with the pattern in other classes (e.g.,
Metaschema.getLocation()hasrequired = truebut no null annotations), so it may be intentional for the binding framework's operation.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (13)
CLAUDE.mdmetaschema-testing/README.mdmetaschema-testing/pom-bootstrap.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.java
✅ Files skipped from review due to trivial changes (1)
- metaschema-testing/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
- CLAUDE.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.java
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xmlmetaschema-testing/pom-bootstrap.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
metaschema-testing/pom.xml
🧬 Code graph analysis (7)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (6)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (1)
MetaschemaAssembly(31-160)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
MetaschemaAssembly(29-137)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
MetaschemaAssembly(27-129)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (7)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/StringAdapter.java (1)
StringAdapter(23-46)core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
MetaschemaAssembly(29-137)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
MetaschemaAssembly(25-96)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (2)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.java (3)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/MarkupLine.java (1)
MarkupLine(32-114)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/MarkupMultiline.java (1)
MarkupMultiline(19-80)databind/src/main/java/gov/nist/secauto/metaschema/databind/model/AbstractBoundModule.java (1)
AbstractBoundModule(31-213)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (8)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (1)
MetaschemaAssembly(31-160)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
MetaschemaAssembly(29-137)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
MetaschemaAssembly(27-129)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
MetaschemaAssembly(25-96)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (5)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Website
- GitHub Check: Code
🔇 Additional comments (11)
metaschema-testing/pom.xml (1)
54-77: LGTM! Static analysis exclusions are appropriately configured for generated code.The checkstyle exclusion pattern and spotbugs filter file correctly target the generated testsuite package, ensuring static analysis tools don't flag issues in code that will be regenerated via the bootstrap process.
metaschema-testing/pom-bootstrap.xml (1)
1-53: Well-structured bootstrap POM with clear documentation.The standalone POM effectively addresses the circular dependency issue with metaschema-maven-plugin. The XML comment provides clear usage instructions for regenerating binding classes.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.java (1)
1-13: LGTM! Package annotations correctly establish XML binding metadata.The package-info properly wires the
MetaschemaTestSuiteModuleand configures the XML namespace for the test-suite bindings. The package naming follows thegov.nist.secauto.metaschema.*convention as per coding guidelines.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.java (1)
19-75: LGTM! Module class is well-structured.The module correctly registers all test-suite assembly classes and implements the required metadata accessors. The static constants for module metadata (NAME, SHORT_NAME, VERSION, namespaces) provide efficient reuse, and returning
nullforgetRemarks()is appropriate when no remarks are defined.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
24-115: LGTM! Generation case binding is correctly structured.The class properly defines the schema generation test case structure with appropriate constraints for
sourceFormat(XML/JSON/YAML) andmatchResult(MATCH/MISMATCH). Thelocationfield is correctly marked as required withUriReferenceAdapter.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
24-116: LGTM! Validation case binding follows consistent patterns.The class properly defines the content validation test case structure with appropriate constraints. The
validationResultfield correctly defaults to "VALID" with VALID/INVALID allowed values, matching the expected validation workflow.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
105-131: LGTM! Collection helper methods are well-documented with proper null checks.The
addTestScenarioandremoveTestScenariomethods include appropriate Javadoc with@paramand@returntags, and useObjectUtils.requireNonNullto validate inputs. The lazy initialization of the list on first add is a reasonable pattern.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
1-129: Consistent structure with sibling binding classes.The class structure, annotations, and patterns (constructor delegation, lazy collection initialization, null checks via
ObjectUtils.requireNonNull) are consistent with the other binding classes in this PR (TestSuite,TestCollection,GenerateSchema, etc.). The implementation correctly usesLinkedListfor lazy initialization and follows the established add/remove helper pattern.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
25-96: Well-structured root element binding.The
TestSuiteclass correctly:
- Declares itself as the root element via
rootName = "test-suite"- Enforces at least one
TestCollectionviaminOccurs = 1- Uses
JsonGroupAsBehavior.LISTfor proper JSON serialization- Implements consistent add/remove helpers with null validation
The implementation aligns well with the metaschema binding patterns used throughout this PR.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (2)
42-66: Well-defined value constraints for flags.The
@BoundFlagannotations correctly use:
defaultValuefor sensible defaults ("SUCCESS", "VALID")IConstraint.Level.ERRORto enforce strict validationTokenAdapterfor token-type string handling- Clear
@AllowedValuedescriptionsThis provides good schema enforcement for the test suite configuration.
128-154: Consistent collection management pattern.The
addGenerationCaseandremoveGenerationCasemethods follow the same pattern as other binding classes in this PR:
- Null validation via
ObjectUtils.requireNonNull- Lazy initialization of the backing
LinkedList- Proper null-safe removal logic
The Javadoc is present and follows the expected format with
@paramand@returntags.
Replace XMLBeans with Metaschema bindings in the metaschema-testing module, completing the XMLBeans removal from the codebase. Key changes: Metaschema Module and Bindings: - Create YAML Metaschema module (unit-tests.yaml) defining test suite structure - Add binding configuration to map namespace to package gov.nist.secauto.metaschema.model.testing.testsuite - Remove underscore-prefixed package (gov.nist.csrc.ns.metaschema.test_suite._1_0) Bootstrap Approach: - Use pre-generated binding classes due to cyclic dependency (metaschema-maven-plugin -> schemagen -> metaschema-testing) - Add pom-bootstrap.xml for regenerating classes when schema changes - Document bootstrap process in README.md and CLAUDE.md Static Analysis Configuration: - Add two-ruleset PMD approach for selective FieldNamingConventions exclusion - Reorganize configs into src/main/config/ structure - Update SpotBugs and Checkstyle excludes for new package Code Updates: - Update AbstractTestSuite.java to use new binding classes - Fix broken Javadoc reference in PathFormatSelection - Add Javadoc and null-safety annotations per CodeRabbit feedback XMLBeans Removal: - Remove XMLBeans handler classes from metaschema-testing - Remove XMLBeans from parent POM (dependencies, plugin, javadoc exclusions) - Clean up leftover XMLBeans artifacts in databind module No XMLBeans references remain in the codebase.
7622c77 to
d2dabc5
Compare
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (2)
metaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xml (1)
5-5: Schema location path was previously addressed.This issue with the schema location path was already identified and confirmed as addressed in earlier review iterations.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (1)
370-384: Null-safe handling for validation cases is appropriate.The pattern correctly handles potentially null validation case lists. Same observation as above regarding
assert contentCase != nullvsObjectUtils.notNull()consistency applies here.
🧹 Nitpick comments (2)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (2)
224-239: Minor inconsistency in null-handling approach.The null-safety handling for the list is good, but there's an inconsistency: line 232 uses
assert scenario != nullwhile line 160 usesObjectUtils.notNull(collection). The assertion can be disabled at runtime with-da, making it less robust.Consider using
ObjectUtils.notNull()consistently for null-safety guarantees across all such patterns.🔎 Suggested consistency fix
.flatMap(scenario -> { - assert scenario != null; return Stream.of(generateScenario( - scenario, + ObjectUtils.notNull(scenario), collectionUri, collectionGenerationPath, bindingContext));
443-465: Consider case-insensitive format matching for robustness.The switch statement requires exact uppercase matches ("XML", "JSON", "YAML"). Based on the codebase patterns (see
MetaschemaCommands.getFormat()), the standard approach usesFormat.valueOf(toFormatText.toUpperCase(Locale.ROOT))for case-insensitive matching.If the test suite XML could contain lowercase format strings (e.g., "xml"), this would return null unexpectedly.
🔎 Suggested case-insensitive handling
+import java.util.Locale; + @Nullable private static Format toFormat(@Nullable String sourceFormat) { if (sourceFormat == null) { return null; } - switch (sourceFormat) { - case "XML": - return Format.XML; - case "JSON": - return Format.JSON; - case "YAML": - return Format.YAML; - default: + try { + return Format.valueOf(sourceFormat.toUpperCase(Locale.ROOT)); + } catch (IllegalArgumentException ex) { return null; } }
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (33)
CLAUDE.mdPRDs/20251221-xmlbeans-removal/implementation-plan.mdcore/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.javadatabind/pom.xmldatabind/src/main/config/pmd/field-naming-ruleset.xmldatabind/src/main/config/pmd/ruleset.xmldatabind/src/main/config/spotbugs/exclude.xmldatabind/src/main/java/org/apache/xmlbeans/metadata/system/metaschema/codegen/package-info.javadocs/javadoc-style-guide.mdmetaschema-testing/README.mdmetaschema-testing/pom-bootstrap.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/config/pmd/field-naming-ruleset.xmlmetaschema-testing/src/main/config/pmd/ruleset.xmlmetaschema-testing/src/main/config/spotbugs/exclude.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/FormatType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/GenerationResultType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/ValidationResultType.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/package-info.javametaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xmlmetaschema-testing/src/main/metaschema/unit-tests.yamlmetaschema-testing/src/schema/xmlconfig.xmlpom.xml
💤 Files with no reviewable changes (6)
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/package-info.java
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/FormatType.java
- metaschema-testing/src/schema/xmlconfig.xml
- databind/src/main/java/org/apache/xmlbeans/metadata/system/metaschema/codegen/package-info.java
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/GenerationResultType.java
- metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/xml/xmlbeans/handler/ValidationResultType.java
🚧 Files skipped from review as they are similar to previous changes (8)
- metaschema-testing/src/main/config/pmd/field-naming-ruleset.xml
- databind/pom.xml
- metaschema-testing/pom-bootstrap.xml
- PRDs/20251221-xmlbeans-removal/implementation-plan.md
- docs/javadoc-style-guide.md
- metaschema-testing/README.md
- databind/src/main/config/pmd/field-naming-ruleset.xml
- pom.xml
🧰 Additional context used
📓 Path-based instructions (2)
**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.java: All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include @param, @return, @throws tags in the correct order (BLOCKING)
Java target version must be Java 11. Use SpotBugs annotations (@nonnull, @nullable) for null safety in code.
Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javacore/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java
**/metapath/**/*.java
📄 CodeRabbit inference engine (CLAUDE.md)
Metapath is an implementation of XPath 3.1. Use the XPath 3.1 specification (https://www.w3.org/TR/xpath-31/) and XPath Functions 3.1 (https://www.w3.org/TR/xpath-functions-31/) as authoritative reference when implementing new functions, fixing bugs, or understanding error handling. Raise clarification before making changes if implementation differs from spec.
Files:
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.java
🧠 Learnings (13)
📓 Common learnings
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
📚 Learning: 2025-12-19T04:01:37.408Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:37.408Z
Learning: When overriding Java interface methods, rely on inherited Javadoc from the interface. Do not duplicate documentation in the implementing class unless there is implementation-specific behavior that warrants additional notes beyond the interface contract.
Applied to files:
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.javacore/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/metapath/**/*.java : Metapath is an implementation of XPath 3.1. Use the XPath 3.1 specification (https://www.w3.org/TR/xpath-31/) and XPath Functions 3.1 (https://www.w3.org/TR/xpath-functions-31/) as authoritative reference when implementing new functions, fixing bugs, or understanding error handling. Raise clarification before making changes if implementation differs from spec.
Applied to files:
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.javametaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xml
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow package naming convention gov.nist.secauto.metaschema.* for all Java packages
Applied to files:
metaschema-testing/src/main/config/pmd/ruleset.xmlmetaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.javadatabind/src/main/config/pmd/ruleset.xmlmetaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.javametaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.javametaschema-testing/src/main/config/spotbugs/exclude.xmlCLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/metaschema/schema/xml/** : XMLBeans code is generated from XSD schemas in core/metaschema/schema/xml during Maven build. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xmlmetaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.javametaschema-testing/src/main/config/spotbugs/exclude.xmlCLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.{xmlbeans,antlr} : Generated code in *.xmlbeans and *.antlr packages is excluded from Javadoc and style checks. Generated sources are placed in target/generated-sources/
Applied to files:
metaschema-testing/pom.xmldatabind/src/main/config/pmd/ruleset.xmlmetaschema-testing/src/main/config/spotbugs/exclude.xmlCLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Use SpotBugs, PMD, Checkstyle, and Jacoco for static analysis. Project enforces Checkstyle code style, PMD source analysis (fails on priority 2+ violations), SpotBugs bug detection (with spotbugs-exclude.xml exclusions), and Jacoco code coverage (target: 60% coverage)
Applied to files:
metaschema-testing/pom.xmlmetaschema-testing/src/main/config/spotbugs/exclude.xmlCLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to core/src/main/antlr4/** : Metapath parser is generated from ANTLR4 grammar files in core/src/main/antlr4. Code generation occurs during Maven build producing output in target/generated-sources/
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-19T04:01:45.001Z
Learnt from: david-waltermire
Repo: metaschema-framework/metaschema-java PR: 550
File: core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/JsonPointerFormatter.java:56-100
Timestamp: 2025-12-19T04:01:45.001Z
Learning: In Java code for metaschema-framework/metaschema-java, override methods (annotated with Override) that implement interface methods automatically inherit Javadoc from the interface and do not require redundant documentation in the implementing class unless there is implementation-specific behavior that needs to be documented beyond what the interface specifies.
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : All code changes must follow the Javadoc style guide (docs/javadoc-style-guide.md). New code requires 100% Javadoc coverage on public/protected members. Modified code must add/update Javadoc on any members touched. All Javadoc must include param, return, throws tags in the correct order (BLOCKING)
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*Test.java : Test methods do not require Javadoc if they use descriptive method names. Use JUnit 5 for testing with parallel execution enabled.
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Follow Test-Driven Development (TDD) principles: write tests first before implementing functionality, verify tests fail with current implementation, implement minimal code to pass tests, then refactor while keeping tests green
Applied to files:
CLAUDE.md
📚 Learning: 2025-12-17T13:27:43.679Z
Learnt from: CR
Repo: metaschema-framework/metaschema-java PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-17T13:27:43.679Z
Learning: Applies to **/*.java : Java target version must be Java 11. Use SpotBugs annotations (NonNull, Nullable) for null safety in code.
Applied to files:
CLAUDE.md
🧬 Code graph analysis (7)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (8)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java (1)
MetaschemaAssembly(22-66)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
MetaschemaAssembly(29-137)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
MetaschemaAssembly(27-129)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
MetaschemaAssembly(25-96)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (2)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/StringAdapter.java (1)
StringAdapter(23-46)core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (3)
core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)cli-processor/src/main/java/gov/nist/secauto/metaschema/cli/processor/CLIProcessor.java (1)
SuppressWarnings(42-321)metaschema-cli/src/main/java/gov/nist/secauto/metaschema/cli/commands/MetaschemaCommands.java (1)
SuppressWarnings(56-626)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.java (3)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/MarkupLine.java (1)
MarkupLine(32-114)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/MarkupMultiline.java (1)
MarkupMultiline(19-80)databind/src/main/java/gov/nist/secauto/metaschema/databind/model/AbstractBoundModule.java (1)
AbstractBoundModule(31-213)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (2)
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/TokenAdapter.java (1)
TokenAdapter(23-45)core/src/main/java/gov/nist/secauto/metaschema/core/datatype/adapter/UriReferenceAdapter.java (1)
UriReferenceAdapter(27-65)
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (5)
core/src/main/java/gov/nist/secauto/metaschema/core/util/ObjectUtils.java (1)
ObjectUtils(18-135)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java (1)
MetaschemaAssembly(27-115)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
MetaschemaAssembly(29-137)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
MetaschemaAssembly(27-129)metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
MetaschemaAssembly(27-116)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Website
- GitHub Check: Code
🔇 Additional comments (22)
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/format/PathFormatSelection.java (1)
15-15: No action needed. The constant is actually namedMETAPATH_PATH_FORMATERinIPathFormatter.java(line 34), and the Javadoc reference on line 15 correctly references this existing constant. The reference will not result in a broken link.Likely an incorrect or invalid review comment.
metaschema-testing/src/main/config/spotbugs/exclude.xml (1)
12-15: LGTM! SpotBugs exclusion correctly configured for generated bindings.The exclusion for the generated test-suite binding classes is appropriate and follows the project's package naming convention.
databind/src/main/config/pmd/ruleset.xml (1)
1-27: LGTM! PMD ruleset properly configured with classpath reference.The ruleset correctly uses the classpath reference
pmd/category/java/custom.xmland provides clear rationale for each rule exclusion.metaschema-testing/src/main/metaschema-bindings/test-suite-bindings.xml (1)
6-10: LGTM! Binding configuration correctly maps namespace to package.The model-binding configuration correctly maps the test-suite namespace to the appropriate package following the project's naming convention.
metaschema-testing/src/main/config/pmd/ruleset.xml (1)
1-27: LGTM! PMD ruleset consistent with project configuration.The ruleset follows the same pattern as the databind module and correctly uses the classpath reference for the parent ruleset.
CLAUDE.md (3)
105-108: LGTM! Generated code documentation updated correctly.The documentation accurately reflects the migration from XMLBeans to Metaschema bindings.
110-125: LGTM! Bootstrap process well-documented.The bootstrap binding classes section provides clear instructions for regenerating bindings when the Metaschema module changes.
127-133: LGTM! YAML-first guidance is helpful.The Metaschema Module Authoring section provides valuable guidance for creating new modules using the YAML-first approach.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/package-info.java (1)
1-13: LGTM! Package annotations correctly configured.The package annotations properly configure the Metaschema binding metadata and XML namespace mapping for the test-suite.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/ValidationCase.java (1)
1-116: Well-structured generated binding class.The class correctly implements the
IBoundObjectinterface and follows the established pattern for metaschema-generated bindings. The bound flag annotations properly define constraints (requiredlocation, allowed values forsourceFormatandvalidationResult).Note: The PR comments mention that
getLocation()was changed to return@NonNull URIsincelocationis required. However, the current implementation doesn't include the@NonNullannotation. If null-safety annotations are desired for required fields, consider adding them.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestScenario.java (1)
1-129: Consistent implementation following the established binding pattern.The class properly:
- Defines a required
nameflag withStringAdapter- Contains an optional
GenerateSchemaassembly reference- Manages a collection of
ValidationCaseitems with null-safe add/remove helpers- Uses lazy initialization with
LinkedListfor the collectionThe Javadoc on
addValidationCaseandremoveValidationCasemethods is appropriate.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestCollection.java (1)
1-137: Properly structured collection container class.The implementation correctly:
- Requires both
location(URI) andname(String) flags- Enforces
minOccurs = 1forTestScenarioitems, ensuring at least one scenario per collection- Maintains consistency with sibling model classes in add/remove helper patterns
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/MetaschemaTestSuiteModule.java (1)
19-75: Module correctly registers all test-suite assemblies.The
@MetaschemaModuleannotation properly lists all seven assembly classes:TestSuite,TestCollection,TestScenario,GenerateSchema,Metaschema,ValidationCase, andGenerationCase.The static metadata (
NAME,SHORT_NAME,VERSION,XML_NAMESPACE,JSON_BASE_URI) aligns with the corresponding values inunit-tests.yaml:
short-name: metaschema-test-suite→SHORT_NAME = "metaschema-test-suite"namespace: http://csrc.nist.gov/ns/metaschema/test-suite/1.0→XML_NAMESPACEschema-version: 1.0.0→VERSION = "1.0.0"metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/TestSuite.java (1)
25-96: Root element correctly defined with required collection.The
TestSuiteclass is properly configured as the root element (rootName = "test-suite") and enforces at least oneTestCollectionviaminOccurs = 1. The implementation follows the established pattern for collection management.metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerateSchema.java (1)
1-160: Schema generation parameters correctly modeled.The class properly:
- Defines flags with defaults (
generationResult = "SUCCESS",validationResult = "VALID") matching the YAML schema- Requires the
Metaschemaassembly (minOccurs = 1)- Supports an optional collection of
GenerationCaseitems with the standard add/remove patternThe allowed values constraints are correctly applied via
@ValueConstraintsannotations.metaschema-testing/src/main/metaschema/unit-tests.yaml (1)
1-199: Well-structured YAML Metaschema definition.The schema correctly defines the test-suite data model with:
- 7 assemblies:
test-suite,test-collection,test-scenario,generate-schema,metaschema,validation-case,generation-case- 4 reusable flags:
source-format,generation-result,validation-result,match-resultThe hierarchy and constraints are consistent with the generated Java binding classes. Key observations:
- All collections use
in-json: ARRAYfor proper JSON serialization- Required fields are correctly marked with
required: "yes"ormin-occurs: 1- Default values (
SUCCESS,VALID,MATCH) align with the Java@BoundFlagannotations- The
flag-refpattern enables clean reuse of shared flag definitionsmetaschema-testing/pom.xml (1)
54-77: Static analysis configuration correctly excludes generated code.The plugin management configuration appropriately:
- Excludes the
testsuitepackage from Checkstyle (generated binding classes)- Configures SpotBugs with a custom exclusion filter at
src/main/config/spotbugs/exclude.xml- Adds PMD rulesets for analysis at
src/main/config/pmd/ruleset.xmlandsrc/main/config/pmd/field-naming-ruleset.xmlAll referenced configuration files are present and properly configured.
metaschema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java (5)
21-26: LGTM!The imports correctly reference the new generated test-suite model classes, replacing the XMLBeans dependencies. The package structure follows project conventions.
79-80: LGTM!Good practice extracting the magic string as a constant for maintainability.
152-167: Appropriate migration to binding-based loading with null-safe collection handling.The switch from XMLBeans to
bindingContext.newBoundLoader().load()is clean. The null-safety check fortestCollectionsis appropriate defensive programming since the binding may return null for optional collections.Minor observation: The
ObjectUtils.notNull(collection)on line 160 may be unnecessary ifgetTestCollections()returns a list that cannot contain null elements. However, this is harmless and provides explicit null-safety guarantees.
468-537: Logic for validation case handling is sound.The flow correctly:
- Parses format and expected validity from the test case
- Runs direct validation when format matches required format
- Converts and validates only when content is expected to be valid (invalid content may fail conversion)
- Includes expected validity in test names for clarity
The null-safety for
formatcomparison on line 481 works correctly sinceequals()will return false when comparing with null.
539-548: LGTM!The helper method is null-safe (constant on left side of equals), well-documented with complete Javadoc, and clearly expresses the intent.
...chema-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/AbstractTestSuite.java
Show resolved
Hide resolved
...esting/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java
Show resolved
Hide resolved
...esting/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/GenerationCase.java
Show resolved
Hide resolved
...ma-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java
Show resolved
Hide resolved
...ma-testing/src/main/java/gov/nist/secauto/metaschema/model/testing/testsuite/Metaschema.java
Show resolved
Hide resolved
dd1451a
into
metaschema-framework:develop
Summary
Changes
New Files
metaschema-testing/src/main/metaschema/unit-tests.yaml- YAML Metaschema module replacing XSDModified Files
metaschema-testing/pom.xml- Add metaschema-maven-plugin for binding generationmetaschema-testing/src/main/java/.../AbstractTestSuite.java- Use generated bindingspom.xml- Remove XMLBeans dependency, plugin management, and javadoc exclusionsCLAUDE.md- Document YAML-first approach for Metaschema modulesDeleted Files
FormatType.java,GenerationResultType.java, etc.)xmlconfig.xml)Test Plan
mvn clean install -PCI -PreleaseRelated
PRDs/20251221-xmlbeans-removal/Summary by CodeRabbit
Documentation
Chores
New Features
✏️ Tip: You can customize this high-level summary in your review settings.