Skip to content

Commit

Permalink
Simplify check now that JDK 17 is the base
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jan 23, 2024
1 parent 9004c8a commit a6396ce
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public void dockerBuildFromJar(DockerConfig dockerConfig,
Optional<DockerFileBaseInformationProvider.DockerFileBaseInformation> dockerFileBaseInformation = dockerFileBaseInformationProvider
.determine(dockerfilePaths.getDockerfilePath());

if ((compiledJavaVersion.getJavaVersion().isJava17OrHigher() == CompiledJavaVersionBuildItem.JavaVersion.Status.TRUE)
&& dockerFileBaseInformation.isPresent() && (dockerFileBaseInformation.get().getJavaVersion() < 17)) {
if (dockerFileBaseInformation.isPresent() && (dockerFileBaseInformation.get().getJavaVersion() < 17)) {
throw new IllegalStateException(
String.format(
"The project is built with Java 17 or higher, but the selected Dockerfile (%s) is using a lower Java version in the base image (%s). Please ensure you are using the proper base image in the Dockerfile.",
Expand Down

0 comments on commit a6396ce

Please sign in to comment.