From d1dc63844f413ebce65162f1262c52d0bf15e06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=A4f?= Date: Sat, 10 Oct 2015 21:25:57 +0200 Subject: [PATCH] [MNG-5721] Possible NullPointerException in org.apache.maven.repository.MetadataResolutionResult Signed-off-by: Michael Osipov --- .../apache/maven/repository/MetadataResolutionResult.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index 62249075a7..cfdd7f96fc 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -232,10 +232,7 @@ public class MetadataResolutionResult public MetadataResolutionResult addError( Exception e ) { - if ( exceptions == null ) - { - initList( exceptions ); - } + exceptions = initList( exceptions ); exceptions.add( e );