Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bz-62655 throw a BuildException from augment task #68

Merged
merged 1 commit into from Aug 26, 2018

Conversation

Projects
None yet
3 participants
@jaikiran
Copy link
Contributor

commented Aug 25, 2018

Reference https://bz.apache.org/bugzilla/show_bug.cgi?id=62655

The manual of the augment task[1] states that it's supposed to throw a BuildException if the referenced id value isn't known. I admit that the bugzilla is more about the id attribute not being specified whereas the manual seems to talk about the value of id being unknown reference, but I think the issue itself can be considered valid.

The referenced bugzilla issue shows that it throws an IllegalStateException. That exception then does indeed get thrown as a BuildException[2] but the reason that gets reported to the build listeners[3] is the original cause (in this case the IllegalStateException).

The commit here is trivial and it throws the BuildException from the augment task when either id isn't specified or it points to an unknown reference. However, given that it appears that this task has always been in this manner, I wanted to make sure there isn't any specific reason of its current implementation.

There's already tests for this task which pass both with and without this change[4]

[1] https://ant.apache.org/manual/Tasks/augment.html
[2] https://github.com/apache/ant/blob/1.9.x/src/main/org/apache/tools/ant/Task.java#L360
[3] https://github.com/apache/ant/blob/1.9.x/src/main/org/apache/tools/ant/Task.java#L368
[4] https://github.com/apache/ant/blob/1.9.x/src/tests/antunit/taskdefs/augment-test.xml

bz-62655 throw a BuildException from augment task if the id attribute…
… isn't specified or if the value points to an unknown reference
@asfgit

This comment has been minimized.

Copy link

commented Aug 25, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ant%20Github-PR-Linux/78/

@asfgit

This comment has been minimized.

Copy link

commented Aug 25, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ant%20Github-PR-Windows/84/

@bodewig
Copy link
Member

left a comment

Looks good.

@asfgit asfgit merged commit 21de7ad into apache:1.9.x Aug 26, 2018

1 check failed

default FAILURE 2663 tests run, 50 skipped, 1 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.