fix(serde): handle raw % in README CSS without crashing export#2448
Open
kabhishek1001 wants to merge 1 commit into
Open
fix(serde): handle raw % in README CSS without crashing export#2448kabhishek1001 wants to merge 1 commit into
kabhishek1001 wants to merge 1 commit into
Conversation
URLDecoder.decode() throws IllegalArgumentException when a README description contains raw % characters from inline CSS (e.g. width:100%;). AssetDeserializer calls decodeContent() for every Readme asset during deserialization, so a single malformed README aborts the entire export. Catch IllegalArgumentException and fall back to the raw value. Content that was never URL-encoded is already in its correct form, so this is safe. Valid URL-encoded sequences (%XX) are unaffected. Fixes export failures on tenants where READMEs were saved with inline table styles via the rich-text editor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Kumar Abhishek <kumar.abhishek@atlan.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
StringUtils.decodeContentcallsURLDecoder.decode()on README descriptions during deserialization. When a README contains raw%in inline CSS (e.g.width:100%;), the decoder throwsIllegalArgumentException— aborting the entire export with no partial output.catch (IllegalArgumentException e)fallback to return the raw string as-is. Content that was never URL-encoded is already correct; valid%XXsequences are unaffected.AssetDeserializer.java:336→StringUtils.java:96→URLDecoder.decode()→IllegalArgumentException→ caught atLiveAtlanResponseGetter.java:170→raiseMalformedJsonError:266→ export exits with code 1.Root Cause
AssetDeserializer.java:336callsdecodeContent()specifically forReadmetype assets:StringUtils.decodeContent(StringUtils.java:96) had no guard againstIllegalArgumentException:Fix
Test Plan
./gradlew test)decodeContent("width:100%; border-collapse:collapse; ")returns the raw string without throwingdecodeContent("hello+world%21")still returnshello world!(valid URL-encoded content unaffected)decodeContent(null)returnsnull🤖 Generated with Claude Code