tillrohrmann commented on a change in pull request #10076:
[FLINK-14465][runtime] Let `StandaloneJobClusterEntrypoint` use user code class
loader
URL: https://github.com/apache/flink/pull/10076#discussion_r342043314
##########
File path:
flink-clients/src/test/java/org/apache/flink/client/program/PackagedProgramTest.java
##########
@@ -57,8 +62,17 @@ public void testExtractContainedLibraries() throws
Exception {
Assert.assertArrayEquals(nestedJarContent,
Files.readAllBytes(files.iterator().next().toPath()));
}
- private static final class NullOutputStream extends
java.io.OutputStream {
- @Override
- public void write(int b) {}
+ @Test
+ public void testNotThrowExceptionWhenJarFileIsNull() {
+ try {
+ new PackagedProgram(
+ null,
+ Collections.singletonList(new
File(CliFrontendTestUtils.getTestJarPath()).toURI().toURL()),
+ TEST_JAR_MAIN_CLASS,
+ new String[0]);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("can not throw exception");
+ }
Review comment:
no need to catch the `Exception` here. Let it simply bubble up.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services