LifecycleStarter implementations silently swallow RuntimeException
Found in: maven-4.0.x branch
Files:
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleStarter.java (line 88)
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/ConcurrentLifecycleStarter.java (line 67)
Severity: High
Description
Both lifecycle starter implementations catch all exceptions, including RuntimeException and Error, and silently add them to the result without rethrowing:
} catch (Exception e) {
result.addException(e); // RuntimeException NOT rethrown
}
This means NullPointerException, ArrayIndexOutOfBoundsException, and other programming errors are silently recorded but the build continues as if nothing happened (or terminates normally with errors in the result). The caller has no way to distinguish between a recoverable build error and a JVM-level programming error.
LifecycleStarter implementations silently swallow RuntimeException
Found in: maven-4.0.x branch
Files:
impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecycleStarter.java(line 88)impl/maven-core/src/main/java/org/apache/maven/lifecycle/internal/concurrent/ConcurrentLifecycleStarter.java(line 67)Severity: High
Description
Both lifecycle starter implementations catch all exceptions, including
RuntimeExceptionandError, and silently add them to the result without rethrowing:This means
NullPointerException,ArrayIndexOutOfBoundsException, and other programming errors are silently recorded but the build continues as if nothing happened (or terminates normally with errors in the result). The caller has no way to distinguish between a recoverable build error and a JVM-level programming error.