Repository navigation
Split a property list given as one string at every comma - #166
Merged
Merged
Conversation
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.
An engine builder's
setProperties(String), the setter for a property list given as one string, now splits the list at every comma and trims the spaces round each name. Until now it split only where a comma had one white space character on each side, soIsMobile,BrowserName, the form the specification gives, was passed on as one property of that name.What the specification says
pipeline-configuration.md lines 50 to 61 at b3b2c0dd:
What was different on
rcAspectEngineBuilderBase.setProperties(String) at 30e8df60 split with the pattern
\s,\s, which matches a comma only with exactly one white space character before and after it. SoIsMobile,BrowserNameandIsMobile, BrowserNameeach stayed one name, a space before the first name was kept, and an empty entry was kept as a name. It is the method an engine builder offers for a list given as one string, which is how the specification says a configuration file gives a list, so such a list became one property with commas in its name. The usage sharing builder already splits its lists with\s*,\s*(ShareUsageBuilderBase.java line 229).What changed
d4677e54.
setProperties(String)splits at every comma, trims each name and leaves out an empty one, and adds each name once as before. The Javadoc says the parameter is a comma-separated list. A list with one name, and a list written with a space on each side of every comma, give the same properties as before.Before you upgrade
A call to
setProperties(String)that gives several properties separated by commas with no space on one side or both now asks for each of those properties. Before, the whole list was passed to the engine as one name.Tests
Tests first, 0b029bed. New
AspectEngineBuilderBasePropertiesTestinpipeline.engines, through the test engine builder, checks that commas with no spaces give each property, that spaces round the names are trimmed, that empty entries are left out, that one name gives one property, and that a name given twice is added once.Red 43696712453 ran the test commit on
rc30e8df6 plus a throwaway workflow on Ubuntu and Windows, Java 17. On both, 4 of the 5 new tests failed, for example "expected:<[IsMobile, BrowserName, PlatformName]> but was:<[IsMobile,BrowserName,PlatformName]>", and the one name test passed, as it should onrc.OnPremiseAspectEngineBuilderBaseTestpassed. Green 43696723498 ran the head plus the same workflow, and on both systems all 5 passed andOnPremiseAspectEngineBuilderBaseTestpassed 6 of 6 on Ubuntu, with its 3 Unix permission tests skipped on Windows as onrc.Full build
Run 43916464765 built dc0f2b4 merged with
rc81e3d4a on nine configurations, Ubuntu x64 with Java 8, 11, 17 and 21, Ubuntu arm64 with Java 17, and Windows with Java 8, 11, 17 and 21. Configure and all nine Build and Test jobs passed, read from each job's log, andAspectEngineBuilderBasePropertiesTestpassed 5 of 5 in all nine jobs. Each of its tenSetting 'PullRequestSha'lines names dc0f2b4, and its Configure job printed "Left out 6 macOS entries". The run's last job, which only gathers the results, was still waiting for a runner when this was written.What it releases
pipeline.engineschanges, so it and the packages that depend on it are released, each at its own next patch version.Base branch
rc81e3d4a is merged into the head, dc0f2b4, with a merge commit, with no conflict. #179 changes the sameAspectEngineBuilderBase.java, so whichever merges second keeps one copy.What remains
Nothing for this requirement in Java.