Skip to content

[release/3.16] 优化 SVG 图像支持 - #6873

Merged
Glavo merged 3 commits into
HMCL-dev:release/3.16from
Glavo:backport/3.16/6790
Sep 16, 2026
Merged

Glavo merged 3 commits into
HMCL-dev:release/3.16from
Glavo:backport/3.16/6790

Conversation

@Glavo

@Glavo Glavo commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

@Glavo Glavo changed the title [release/3.16] 优化 SVG 图像的识别与读取 [release/3.16] 优化 SVG 图像支持 Sep 16, 2026
@github-actions github-actions Bot added the 100+ label Sep 16, 2026
@Glavo Glavo added the backport label Sep 16, 2026
@Glavo

Glavo commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T13:19:17.959478Z b823a82 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b823a82a4f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

).get();
}
Supplier<Image> supplier = () -> {
SVGImage image = SVGLoader.load(content, parameters);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore the null guard before snapshotting SVGs

When fxsvgimage cannot parse a malformed or unsupported SVG, SVGLoader.load(...) can return null; the previous implementation handled that explicitly, but the new supplier immediately dereferences the result via toImage or getScaledWidth. Such inputs now produce a NullPointerException (wrapped in ExecutionException off the FX thread) instead of the intended IOException, so keep the result nullable and check it inside the supplier before snapshotting.

AGENTS.md reference: AGENTS.md:L7-L9

Useful? React with 👍 / 👎.

Schedulers.javafx()
).get();
}
Supplier<Image> supplier = () -> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document the modified SVG loader field

The SVG field modified by this block still has no /// documentation above its declaration, even though the repository requires documentation for every field using Markdown-style Javadoc. Add a concise description of its JavaFX-thread scheduling and scaling behavior.

AGENTS.md reference: AGENTS.md:L18-L20

Useful? React with 👍 / 👎.

@Glavo
Glavo merged commit 552276e into HMCL-dev:release/3.16 Sep 16, 2026
3 checks passed
@Glavo
Glavo deleted the backport/3.16/6790 branch September 16, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant