Skip to content

Use a regular expression to not consider comma between quote while co…#9310

Open
YannLeCorse wants to merge 1 commit intoapache:masterfrom
YannLeCorse:Netbeans-9309
Open

Use a regular expression to not consider comma between quote while co…#9310
YannLeCorse wants to merge 1 commit intoapache:masterfrom
YannLeCorse:Netbeans-9309

Conversation

@YannLeCorse
Copy link
Copy Markdown
Contributor

This PR addresses the issue described in #9309.
Rather than splitting on comma, we are using a regular expression to ignore the comma that are between a pair of quotes.
By doing that, we properly the exported packages even if the input string contains syntax like org.sample.pkg1;version="1.0.0";uses:="fr.free.ylc,fr.free.ylc.sample",org.sample.pkg2;version="1.0.0"

@matthiasblaesing matthiasblaesing linked an issue Apr 3, 2026 that may be closed by this pull request
@matthiasblaesing matthiasblaesing added this to the NB30 milestone Apr 3, 2026
@matthiasblaesing matthiasblaesing added Platform [ci] enable platform tests (platform/*) ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Apr 3, 2026
@apache apache locked and limited conversation to collaborators Apr 3, 2026
@apache apache unlocked this conversation Apr 3, 2026
@matthiasblaesing
Copy link
Copy Markdown
Contributor

In general this looks sane to me. Specially thanks for the added test. Please check the author information though the "Paperwork" check ensures that author information is valid and the assumption, that a real name consists of at least two parts that are separated by a space.

Have a look at https://github.com/apache/netbeans/pull/9310.patch (or your preferred git client that shows real author information), line "From: ".

I'm aware that there are countries/regions where a single name is common and if that is the case, no problem, if that does not apply to you, please adjust the author information. Thank you.

@matthiasblaesing
Copy link
Copy Markdown
Contributor

@YannLeCorse before I forget this: changing author information requires a forced push. Contrary to normal pushes to PR branches, forced pushed don't result in information from github sent to reviewers, so if you do that, please also add a comment.

@YannLeCorse
Copy link
Copy Markdown
Contributor Author

@matthiasblaesing Author info should be fixed now. Thanks again.

@matthiasblaesing
Copy link
Copy Markdown
Contributor

Thank you for the update. From the code perspective this looks sane to me. I'm in the region of nitpicking. The commit message should describe why a change was done (and if huge give a summary of the changes). A quick idea:

Netigso: Fix parsing of complex Export-Package manifest entries

Export-Package entries are not just comma separated values, but can contain
parameters, which themselves can contain commas in quoted strings. These cases
need to be handled correctly.

This is a suggestion, feel free to rephrase of course.

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

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Platform [ci] enable platform tests (platform/*)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OSGi : Netigso class badly compute the exported packages

2 participants