Problem with that is, if the AI civ intends to attack you anyway (but this was hidden from you), AND you were not subject to the troops on borders restriction (because you and the AI civ weren't geographically close), the AI will accept open borders, move a substantial force into your territory...