Sir John Thomas sitting at the High Court ruled that the two men were in breach of the injunction and therefore in contempt of court.
Reflecting on the "gravity" of their offence he said they would be given nine months imprisonment but because of mitigating circumstances it would be suspended.
More top news
Lottie and her dog Marley confronted a man who had taken a laptop and goods from a Lush store in Oxford.
Feeling colder with a biting, bitter windchill
A thoughtful teenager has taken Valentine's romance to a whole new level by buying 900 flowers and giving one to every girl in his school.