This isn't a law. It just says that if you go into someone else's territorial waters, and you aren't on the surface, they can treat you like a hostile. It doesn't set us up for criminal prosecution or anything. It's really just saying that if you are on the surface, by international law you have a right to be there and can't be attacked.
This is not true. When two of more nations sign a treaty, they agree to treat the terms of the treaty as part of their national law. It would mean that a dispute about a matter would go to an international court (The Hague) or to arbitration. The Treaty is bad for the US.