-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
As a Java package maintainer,
I want javapackages-validator to detect and reject JAR files that contain manifests not encoded in UTF-8,
so that I can ensure all JAR metadata is reliably parsed and safely handled by Java tools that expect UTF-8, preventing encoding-related errors or unexpected behavior during build or runtime.
Acceptance Criteria
- The validator inspects all
.jarfiles included in the SRPM or built artifacts. - It attempts to read the
META-INF/MANIFEST.MFfile using UTF-8 encoding. - If the manifest cannot be parsed as UTF-8 (e.g., contains invalid byte sequences), validation fails.
- The error output must include:
- The name of the JAR file
- A note that the manifest is not UTF-8 encoded
Test Cases
-
✅ Valid Case: JAR contains a
META-INF/MANIFEST.MFfile encoded in valid UTF-8
→ Validation passes -
❌ Invalid Case: JAR contains a manifest with non-UTF-8 bytes (e.g., Latin-1 or Windows-1252)
→ Validation fails, error message displayed -
❌ Corrupted Case: JAR manifest contains invalid UTF-8 sequences (e.g., truncated multibyte character)
→ Validation fails, manifest identified in output
Metadata
Metadata
Assignees
Labels
No labels