Skip to content

Commit ad2d8e1

Browse files
committed
spotless
1 parent 02710fd commit ad2d8e1

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5394,17 +5394,16 @@ private List<OfflineLink> getModulesLinks() throws MavenReportException {
53945394
logError("MavenInvocationException: " + e.getMessage(), e);
53955395

53965396
try {
5397-
String invokerLogContent = new String(Files.readAllBytes(invokerLogFile.toPath()),
5398-
StandardCharsets.UTF_8);
5397+
String invokerLogContent =
5398+
new String(Files.readAllBytes(invokerLogFile.toPath()), StandardCharsets.UTF_8);
53995399
// TODO: Why are we only interested in cases where the JVM won't start?
54005400
// probably we should throw an error in all cases
54015401
// [MJAVADOC-275][jdcasey] I changed the logic here to only throw an error WHEN
54025402
// the JVM won't start (opposite of what it was).
54035403
if (invokerLogContent.contains(JavadocUtil.ERROR_INIT_VM)) {
54045404
throw new MavenReportException(e.getMessage(), e);
54055405
}
5406-
}
5407-
catch (IOException ex) {
5406+
} catch (IOException ex) {
54085407
// ignore
54095408
}
54105409
} finally {

src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -827,12 +827,11 @@ protected static void invokeMaven(
827827

828828
if (result.getExitCode() != 0) {
829829
try {
830-
String invokerLogContent = new String(Files.readAllBytes(invokerLog.toPath()),
831-
StandardCharsets.UTF_8);
830+
String invokerLogContent = new String(Files.readAllBytes(invokerLog.toPath()), StandardCharsets.UTF_8);
832831

833832
// see DefaultMaven
834833
if (!invokerLogContent.contains("Scanning for projects...")
835-
|| invokerLogContent.contains(OutOfMemoryError.class.getName())) {
834+
|| invokerLogContent.contains(OutOfMemoryError.class.getName())) {
836835
if (log != null) {
837836
log.error("Error occurred during initialization of VM, trying to use an empty MAVEN_OPTS...");
838837

@@ -842,19 +841,18 @@ protected static void invokeMaven(
842841
}
843842
}
844843
} catch (IOException e) {
845-
// ignore
844+
// ignore
846845
}
847846
result = invoke(log, invoker, request, invokerLog, goals, properties, "");
848847
}
849848

850849
if (result.getExitCode() != 0) {
851850
try {
852-
String invokerLogContent = new String(Files.readAllBytes(invokerLog.toPath()),
853-
StandardCharsets.UTF_8);
851+
String invokerLogContent = new String(Files.readAllBytes(invokerLog.toPath()), StandardCharsets.UTF_8);
854852

855853
// see DefaultMaven
856854
if (!invokerLogContent.contains("Scanning for projects...")
857-
|| invokerLogContent.contains(OutOfMemoryError.class.getName())) {
855+
|| invokerLogContent.contains(OutOfMemoryError.class.getName())) {
858856
throw new MavenInvocationException(ERROR_INIT_VM);
859857
}
860858

0 commit comments

Comments
 (0)