You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/09/05 06:43:08 UTC

[GitHub] [flink] TisonKun commented on a change in pull request #9620: [FLINK-13959] Consolidate DetachedEnvironment and ContextEnvironment

TisonKun commented on a change in pull request #9620: [FLINK-13959] Consolidate DetachedEnvironment and ContextEnvironment
URL: https://github.com/apache/flink/pull/9620#discussion_r321094080
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/api/common/JobSubmissionResult.java
 ##########
 @@ -56,10 +56,6 @@ public boolean isJobExecutionResult() {
 	 * @throws ClassCastException if this is not a JobExecutionResult
 	 */
 	public JobExecutionResult getJobExecutionResult() {
-		if (isJobExecutionResult()) {
-			return (JobExecutionResult) this;
-		} else {
-			throw new ClassCastException("This JobSubmissionResult is not a JobExecutionResult.");
-		}
+		throw new ClassCastException("This JobSubmissionResult is not a JobExecutionResult.");
 
 Review comment:
   In fact this infer a bad inheritance...

----------------------------------------------------------------
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