Skip to content

Commit a7ac4c9

Browse files
authored
JAVA-18701 :- Minor fixes to make the project compile and tests run. (#16684)
1 parent e75f2e6 commit a7ac4c9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

core-java-modules/core-java-os/pom.xml

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
<plugin>
6060
<groupId>org.apache.maven.plugins</groupId>
6161
<artifactId>maven-compiler-plugin</artifactId>
62+
<configuration>
63+
<source>17</source>
64+
<target>17</target>
65+
</configuration>
6266
</plugin>
6367
</plugins>
6468
</build>

core-java-modules/core-java-os/src/test/java/com/baeldung/java9/process/ProcessUnderstandingUnitTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ProcessUnderstandingUnitTest {
1919
@Test
2020
public void givenSubProcess_whenEncounteringError_thenErrorStreamNotNull() throws IOException {
2121
Process process = Runtime.getRuntime()
22-
.exec("javac -cp src src\\main\\java\\com\\baeldung\\java9\\process\\ProcessCompilationError.java");
22+
.exec("javac -cp src src\\test\\resources\\com\\baeldung\\java9\\process\\ProcessCompilationError.java");
2323
BufferedReader error = new BufferedReader(new InputStreamReader(process.getErrorStream()));
2424
String errorString = error.readLine();
2525
assertNotNull(errorString);

core-java-modules/core-java-os/src/main/java/com/baeldung/java9/process/ProcessCompilationError.java renamed to core-java-modules/core-java-os/src/test/resources/com.baeldung.java9.process/ProcessCompilationError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
public class ProcessCompilationError {
44
//This method has been written to generate error to display
55
//how process errorStream() can consume error
6-
//public static void();
6+
public static void();
77
}

0 commit comments

Comments
 (0)