<i18n dev> RFR: 8315097: Rename createJavaProcessBuilder [v4]
Leo Korinth
lkorinth at openjdk.org
Thu Oct 19 15:16:42 UTC 2023
On Tue, 17 Oct 2023 12:29:46 GMT, Leo Korinth <lkorinth at openjdk.org> wrote:
>> Rename createJavaProcessBuilder so that it is not used by mistake instead of createTestJvm.
>>
>> I have used the following sed script: `find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createJavaProcessBuilderIgnoreTestJavaOpts(/g"`
>>
>> Then I have manually modified ProcessTools.java. In that file I have moved one version of createJavaProcessBuilder so that it is close to the other version. Then I have added a javadoc comment in bold telling:
>>
>> /**
>> * Create ProcessBuilder using the java launcher from the jdk to
>> * be tested.
>> *
>> * <p><b> Please observe that you likely should use
>> * createTestJvm() instead of this method because createTestJvm()
>> * will add JVM options from "test.vm.opts" and "test.java.opts"
>> * </b> and this method will not do that.
>> *
>> * @param command Arguments to pass to the java command.
>> * @return The ProcessBuilder instance representing the java command.
>> */
>>
>>
>> I have used the name createJavaProcessBuilderIgnoreTestJavaOpts because of the name of Utils.prependTestJavaOpts that adds those VM flags. If you have a better name I could do a rename of the method. I kind of like that it is long and clumsy, that makes it harder to use...
>>
>> I have run tier 1 testing, and I have started more exhaustive testing.
>
> Leo Korinth has updated the pull request incrementally with three additional commits since the last revision:
>
> - Revert "8315097: Rename createJavaProcessBuilder"
>
> This reverts commit 4b2d171133c40c5c48114602bfd0d4da75531317.
> - Revert "copyright"
>
> This reverts commit f3418c80cc0d4cbb722ee5e368f1a001e898b43e.
> - Revert "fix static import"
>
> This reverts commit 27da71508aec9a4bec1c0ad07031887286580171.
If this looks roughly acceptable, I will manually add indentation spaces. I am now running tests.
The changes can be verified by running the following commands:
git switch -c _reproduce 15acf4b8d7cffcd0d74bf1b9c43cde9acaf31ea9
find -name "*.java" | xargs -n 1 sed -i -e "s/createJavaProcessBuilder(/createLimitedJavaTestProcessBuilder(/g"
find -name "*.java" | xargs -n 1 sed -i -e "s/createTestJvm(/createJavaTestProcessBuilder(/g"
find -name "*.java" | xargs -n 1 sed -i -e "s/import static jdk.test.lib.process.ProcessTools.createJavaProcessBuilder/import static jdk.test.lib.process.ProcessTools.createLimitedJavaTestProcessBuilder/g"
git diff HEAD f80dda8d7109c2ef6bc1f685d0b611704dec645e
Only the documentation changes should be visible. When I have manually indented everything it should be easy to that verify that change as a whitespace-only change. But that is for tomorrow (at best).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15452#issuecomment-1771194189
More information about the i18n-dev
mailing list