diff --git a/src/it/MPIR-437/pom.xml b/src/it/MPIR-437/pom.xml
new file mode 100644
index 00000000..963868f9
--- /dev/null
+++ b/src/it/MPIR-437/pom.xml
@@ -0,0 +1,71 @@
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.plugins.project-info-reports
+ MPIR-437
+ 1.0-SNAPSHOT
+ jar
+
+ Detect dependencies with no jdk details
+
+ MPIR retrieves class version information from dependencies to display that Java detected,
+ but when no detected should display a dash.
+
+
+
+
+ org.apache.tomcat
+ tomcat-i18n-de
+ 9.0.74
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ @sitePluginVersion@
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-project-info-reports-plugin
+ @project.version@
+
+
+
+ dependencies
+
+
+
+
+
+
+
diff --git a/src/it/MPIR-437/verify.groovy b/src/it/MPIR-437/verify.groovy
new file mode 100644
index 00000000..343724b0
--- /dev/null
+++ b/src/it/MPIR-437/verify.groovy
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+File dependencies = new File( basedir, 'target/site/dependencies.html' )
+def summaryRow = '''\
+
+1 |
+78.8 kB |
+141 |
+- |
+- |
+- |
+- |
+'''
+
+assert dependencies.text.contains( summaryRow.replaceAll( "\n", System.lineSeparator() ) )
diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
index 2470a4fe..e5eb5874 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
@@ -25,6 +25,7 @@
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.FieldPosition;
+import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -90,6 +91,9 @@ public class DependenciesRenderer extends AbstractProjectInfoRenderer {
/** Used to format file length values */
private final DecimalFormat fileLengthDecimalFormat;
+ private final MessageFormat javaVersionFormat =
+ new MessageFormat("{0,choice,0#|1.1<{0,number,0.0}|9#{0,number,0}}", Locale.ROOT);
+
/**
* @since 2.1.1
*/
@@ -611,7 +615,7 @@ private void renderSectionDependencyFileDetails() {
totalentries.getTotalString(i),
totalclasses.getTotalString(i),
totalpackages.getTotalString(i),
- (i < 0) ? String.valueOf(highestJavaVersion) : "",
+ (i < 0) ? javaVersionFormat.format(new Object[] {highestJavaVersion}) : "",
totalDebugInformation.getTotalString(i),
totalsealed.getTotalString(i)
});