File tree Expand file tree Collapse file tree 2 files changed +21
-9
lines changed
spark-operator-api/src/main/java/org/apache/spark/k8s/operator/spec Expand file tree Collapse file tree 2 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,16 @@ subprojects {
5454 apply plugin : ' eclipse'
5555 apply plugin : ' java'
5656
57- java {
58- sourceCompatibility = 17
59- targetCompatibility = 17
57+ if (project. name. equals(" spark-operator-api" )) {
58+ java {
59+ sourceCompatibility = 11
60+ targetCompatibility = 11
61+ }
62+ } else {
63+ java {
64+ sourceCompatibility = 17
65+ targetCompatibility = 17
66+ }
6067 }
6168
6269 repositories {
Original file line number Diff line number Diff line change @@ -29,11 +29,16 @@ public enum RestartPolicy {
2929
3030 public static boolean attemptRestartOnState (
3131 final RestartPolicy policy , final BaseStateSummary stateSummary ) {
32- return switch (policy ) {
33- case Always -> true ;
34- case Never -> false ;
35- case OnFailure -> stateSummary .isFailure ();
36- case OnInfrastructureFailure -> stateSummary .isInfrastructureFailure ();
37- };
32+ switch (policy ) {
33+ case Always :
34+ return true ;
35+ case Never :
36+ return false ;
37+ case OnFailure :
38+ return stateSummary .isFailure ();
39+ case OnInfrastructureFailure :
40+ return stateSummary .isInfrastructureFailure ();
41+ }
42+ return false ;
3843 }
3944}
You can’t perform that action at this time.
0 commit comments