Skip to content

Interim fix: recognize M4A/AAC as valid encoding type, warn content validation unsupported#1637

Open
jordanpadams wants to merge 1 commit into
mainfrom
issue/1635-m4a-aac-encoding-support
Open

Interim fix: recognize M4A/AAC as valid encoding type, warn content validation unsupported#1637
jordanpadams wants to merge 1 commit into
mainfrom
issue/1635-m4a-aac-encoding-support

Conversation

@jordanpadams

Copy link
Copy Markdown
Member

Summary

Fixes #1635. M4A/AAC is a valid encoding_standard_id per PDS4 standards, but validate was throwing ERROR [error.validation.internal_error] because the encoding type was not recognized. This interim fix:

  • Adds M4A/AAC to EncodingMimeMapping (mapped to new M4A entry with .m4a extension), eliminating the IllegalArgumentException that was surfacing as an internal error
  • Replaces the (previously unreachable) checkMetadata call in the M4A/AAC content validation branch with a WARNING (warning.validation.content_validation_not_yet_supported) advising users that content validation for M4A/AAC is not yet supported and to consult PDS4 experts
  • Adds new ProblemType.CONTENT_VALIDATION_UNSUPPORTED for clear, consistent reporting
  • Adds a Cucumber test in 4.2.x.feature verifying exactly 1 warning and no errors

Full content validation for M4A/AAC is tracked in a follow-on requirement issue.

Test plan

  • mvn test -Dtest=\!ReferenceIntegrityTest* "-Dcucumber.filter.name=NASA-PDS/validate#1635-1" passes (1 scenario, 3 steps)
  • mvn compile clean

🤖 Generated with Claude Code

…nt validation unsupported (#1635)

- Add M4A/AAC to EncodingMimeMapping so it no longer throws IllegalArgumentException
- Replace internal error with a WARNING that content validation is not yet supported
- Add new ProblemType CONTENT_VALIDATION_UNSUPPORTED for clear reporting
- Add Cucumber test in 4.2.x.feature

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jordanpadams jordanpadams requested a review from a team as a code owner July 3, 2026 00:16
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

GIF(Arrays.asList("gif")),
J2C(Arrays.asList("j2c", "jp2", "mj2", "mjp2")),
JPEG(Arrays.asList("jpg", "jpeg")),
M4A(Arrays.asList("m4a")),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M4A files often have the extension .aac so should this be M4A(Arrays.asList("m4a", "aac")),?

Also, since AAC is the codec and M4A is the container, would the enum be better off known as M4A_AAC (similar to the string detected later, line 38, as M4A/AAC)?

@nutjob4life nutjob4life left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. I left one interspersed comment which can be ignored.

Approval: ✅
Maven details:

[INFO] Tests run: 323, Failures: 0, Errors: 0, Skipped: 302
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  26.117 s
[INFO] Finished at: 2026-07-02T20:09:49-05:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Throws an error processing M4A/AAC files

2 participants