buildframework/helium/sf/java/internaldata/src/com/nokia/helium/internaldata/ant/taskdefs/HlmAssertMessageTask.java
equal
deleted
inserted
replaced
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 package com.nokia.helium.internaldata.ant.taskdefs; |
18 package com.nokia.helium.internaldata.ant.taskdefs; |
19 |
19 |
|
20 import org.apache.tools.ant.BuildException; |
20 import org.apache.tools.ant.Task; |
21 import org.apache.tools.ant.Task; |
21 import org.apache.tools.ant.BuildException; |
22 |
22 import com.nokia.helium.internaldata.ant.listener.Listener; |
23 import com.nokia.helium.internaldata.ant.listener.Listener; |
23 |
24 |
24 |
25 |
25 /** |
26 /** |
26 * Task to identify failing assert and push them to the internal data database. |
27 * Task to identify failing assert and push them to the internal data database. |
40 /** |
41 /** |
41 * {@inheritDoc} |
42 * {@inheritDoc} |
42 */ |
43 */ |
43 public void execute() { |
44 public void execute() { |
44 |
45 |
45 if (assertName == null) |
46 if (assertName == null) { |
46 throw new BuildException("'assertName' attribute is not defined"); |
47 throw new BuildException("'assertName' attribute is not defined"); |
47 if (message == null) |
48 } |
|
49 if (message == null) { |
48 throw new BuildException("'message' attribute is not defined"); |
50 throw new BuildException("'message' attribute is not defined"); |
|
51 } |
49 |
52 |
50 for (int i = 0 ; i < getProject().getBuildListeners().size() ; i++) { |
53 for (int i = 0 ; i < getProject().getBuildListeners().size() ; i++) { |
51 if (getProject().getBuildListeners().get(i) instanceof Listener) { |
54 if (getProject().getBuildListeners().get(i) instanceof Listener) { |
52 Listener listen = (Listener)getProject().getBuildListeners().get(i); |
55 Listener listen = (Listener)getProject().getBuildListeners().get(i); |
53 listen.addAssertTask(this); |
56 listen.addAssertTask(this); |