From 73fc3f1b0c6eda81c3a3b67fa29b9b5a316fbe94 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Wed, 13 May 2009 17:58:59 +0000 Subject: [PATCH] o add a check for the fake session used in testing. git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@774451 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/maven/execution/MavenSession.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java index d307a5c7ca..7fe554a958 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java +++ b/maven-core/src/main/java/org/apache/maven/execution/MavenSession.java @@ -67,7 +67,11 @@ public class MavenSession this.container = container; this.request = request; this.result = result; - this.currentProject = projects.get( 0 ); + //TODO: Current for testing classes creating the session + if ( projects.size() > 0 ) + { + this.currentProject = projects.get( 0 ); + } this.projects = projects; }