From 3230df32bf15f687ede04cb73f68a422ade6f2e8 Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Thu, 1 Dec 2005 17:04:09 +0000 Subject: [PATCH] PR: MNG-1721 Fixing NPE when error parameter is null. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@350275 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/usability/diagnostics/DiagnosisUtils.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/DiagnosisUtils.java b/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/DiagnosisUtils.java index 8c4b4511e7..525640ca8c 100644 --- a/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/DiagnosisUtils.java +++ b/maven-error-diagnostics/src/main/java/org/apache/maven/usability/diagnostics/DiagnosisUtils.java @@ -80,6 +80,11 @@ public final class DiagnosisUtils public static void appendRootCauseIfPresentAndUnique( Throwable error, StringBuffer message, boolean includeTypeInfo ) { + if ( error == null ) + { + return; + } + Throwable root = getRootCause( error ); if ( root != null && !root.equals( error ) )