You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/12/29 08:25:53 UTC
[GitHub] [netbeans] matthiasblaesing commented on a change in pull request
#1827: [NETBEANS-3041] Honor gradle.properties processing order for JVM args.
matthiasblaesing commented on a change in pull request #1827: [NETBEANS-3041] Honor gradle.properties processing order for JVM args.
URL: https://github.com/apache/netbeans/pull/1827#discussion_r361834584
##########
File path: groovy/gradle/test/unit/src/org/netbeans/modules/gradle/api/execute/GradleCommandLineTest.java
##########
@@ -277,4 +284,26 @@ public void testCombine3() {
GradleCommandLine cmd = GradleCommandLine.combine(first, second);
assertEquals(Arrays.asList("-Pversion=2.0", "build"), cmd.getSupportedCommandLine());
}
+
+ @Test
+ public void testJVMArgs1() throws IOException {
+ TemporaryFolder root = new TemporaryFolder();
+ root.create();
+ File props = root.newFile("gradle.properties");
+ Files.write(props.toPath(), Arrays.asList("org.gradle.jvmargs=\"-Dfile.encoding=UTF-8\" -Xmx2g"));
+ List<String> jvmargs = new ArrayList<>();
+ GradleCommandLine.addGradleSettingJvmargs(root.getRoot(), jvmargs);
+ assertEquals(Arrays.asList("-Dfile.encoding=UTF-8", "-Xmx2g"), jvmargs);
+ }
+
+ @Test
+ public void testJVMArgs2() throws IOException {
+ TemporaryFolder root = new TemporaryFolder();
+ root.create();
+ File props = root.newFile("gradle.properties");
+ Files.write(props.toPath(), Arrays.asList("org.gradle.jvmargs=\"-Dfile.encoding=UTF-8\" -Dsomething=\"space value\""));
+ List<String> jvmargs = new ArrayList<>();
+ GradleCommandLine.addGradleSettingJvmargs(root.getRoot(), jvmargs);
+ assertEquals(Arrays.asList("-Dfile.encoding=UTF-8", "-Dsomething=space value"), jvmargs);
Review comment:
This looks suspicious. I would have expected:
```java
assertEquals(Arrays.asList("-Dfile.encoding=UTF-8", "-Dsomething=\"space value\""), jvmargs);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists