CIC
Canon 1201
Book IV. The sanctifying function of the Church
Worship, sacred places and times
Code of Canon Law
English§1. A promissory oath follows the nature and conditions of the act to which it is attached.
§2. If an oath is added to an act which directly tends toward the harm of others or toward the disadvantage of the public good or of eternal salvation, then the act is not reinforced by the oath.