Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

More defensive guards against invalid code points in ant Preferences#8943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@mbien
Copy link
Member

@mbienmbien commentedOct 21, 2025
edited
Loading

followup on#6094

OncePreferences is loaded containingU+0000 in a key, it can't be used anymore since even removing that key (e.g via clear()) will throw IAE.

What we can do however is to remove and recreate the Preferences node.

example output with this change active:

WARNING [org.apache.tools.ant.module.api.IntrospectedInfo]: skipping malformed key; pref path: /org/apache/tools/ant/module/customDefs, msg: Key contains code point U+0000WARNING [org.apache.tools.ant.module.AntSettings]: recreating preferences node due to code point U+0000

tested by corrupting the config file using this script:

staticvoidmain()throwsjava.io.IOException {Stringpath ="netbeans/nbbuild/testuserdir/config/Preferences/org/apache/tools/ant/module/customDefs.properties";Files.writeString(Path.of(path),"\u0000",StandardOpenOption.APPEND        );    }

closes#8941
targets delivery

Once the Preferences is loaded containing U+0000 in a key, it can'tbe used anymore since even removing that key (e.g via clear()) willthrow IAE.What we can do however is to remove and recreate the Preferences node.
@mbienmbien added this to theNB28 milestoneOct 21, 2025
@mbienmbien added the Ant[ci] enable "build tools" tests labelOct 21, 2025
@mbienmbien requested a review fromlkishalmiOctober 21, 2025 07:22
Copy link
Contributor

@matthiasblaesingmatthiasblaesing left a comment

Choose a reason for hiding this comment

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

This is really ugly and IMHO a JDK issue. Anyway for us we have no real alternative, so I don't see an alternative.

mbien and ExE-Boss reacted with thumbs up emoji
@mbien
Copy link
MemberAuthor

agreed. At leastclear() should be implemented in a way so that it can reliably clear preferences.

ExE-Boss reacted with thumbs up emoji

@ebarboniebarboni merged commita99e87c intoapache:deliveryOct 23, 2025
32 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@matthiasblaesingmatthiasblaesingmatthiasblaesing approved these changes

@lkishalmilkishalmiAwaiting requested review from lkishalmi

Assignees

No one assigned

Labels

Ant[ci] enable "build tools" tests

Projects

None yet

Milestone

NB28

Development

Successfully merging this pull request may close these issues.

am getting an Unexpected Exception when cleaning a Netbeans project; can't use Netbeans for app developement now.

3 participants

@mbien@matthiasblaesing@ebarboni

[8]ページ先頭

©2009-2025 Movatter.jp