You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by ma...@apache.org on 2008/11/03 22:50:56 UTC
svn commit: r710178 - in /ant/ivy/core/trunk: CHANGES.txt
src/java/org/apache/ivy/plugins/report/LogReportOutputter.java
test/java/org/apache/ivy/ant/IvyResolveTest.java
Author: maartenc
Date: Mon Nov 3 13:50:55 2008
New Revision: 710178
URL: http://svn.apache.org/viewvc?rev=710178&view=rev
Log:
FIX: NPE in LogReportOutputter (IVY-961)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/LogReportOutputter.java
ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=710178&r1=710177&r2=710178&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Mon Nov 3 13:50:55 2008
@@ -85,6 +85,7 @@
=====================================
- FIX: Log levels aren't respected in certain cases using the standalone functionality (IVY-960) (thanks to Patrick Woodworth)
- FIX: Listing of URL's under a given URL does not handle fully specified URL's (IVY-959) (thanks to Randy Nott)
+- FIX: NPE in LogReportOutputter (IVY-961)
2.0.0-rc2
=====================================
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/LogReportOutputter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/LogReportOutputter.java?rev=710178&r1=710177&r2=710178&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/LogReportOutputter.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/report/LogReportOutputter.java Mon Nov 3 13:50:55 2008
@@ -48,6 +48,7 @@
ResolveReport report, ResolutionCacheManager cacheMgr, ResolveOptions options)
throws IOException {
IvySettings settings = IvyContext.getContext().getSettings();
+
if (settings.logModulesInUse() && ResolveOptions.LOG_DEFAULT.equals(options.getLog())) {
Message.info("\t:: modules in use:");
List dependencies = new ArrayList(report.getDependencies());
@@ -56,7 +57,7 @@
String[] confs = report.getConfigurations();
for (int i = 0; i < dependencies.size(); i++) {
IvyNode node = (IvyNode) dependencies.get(i);
- if (node.isCompletelyEvicted()) {
+ if (node.isCompletelyEvicted() || node.hasProblem()) {
continue;
}
List nodeConfs = new ArrayList(confs.length);
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java?rev=710178&r1=710177&r2=710178&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyResolveTest.java Mon Nov 3 13:50:55 2008
@@ -241,6 +241,16 @@
}
}
+ public void testIvyLogModulesInUseWithFailure() throws Exception {
+ resolve.getProject().setProperty("ivy.log.modules.in.use", "true");
+ resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-failure.xml"));
+ resolve.setHaltonfailure(false);
+ resolve.execute();
+
+ // we did manage to get here, so no NPE has been thrown (IVY-961)
+ }
+
+
public void testFailureWithMissingConfigurations() throws Exception {
try {
resolve.setFile(new File("test/java/org/apache/ivy/ant/ivy-simple.xml"));