A thief was arrested for slapping a shop worker in the face after being stopped for trying to steal croissants.
As soon as Patrick Kavanagh (23) was released from a garda station, he went back to the same shop and stole a sandwich by eating it in the shop.
It turned out that Kavanagh, who had been drinking heavily earlier, would have been able to pay for the food if he had not given his money to a homeless person.
He admitted assault, att- empted theft and theft in the incidents at a city centre convenience shop.
Judge Michael Walsh struck the case out, leaving him without convictions, when he made a €240 donation to charity.
Dublin District Court heard gardai were called to Londis on Grafton Street last January 15 and spoke to a staff member who said there had been an attempt to steal "some food items in the shop".
The worker had seen Kavanagh, of Grace O'Malley Road, Howth, with the food in his pocket and trying to leave. He was stopped, and the food - two packets of croissants - was recovered.
As the worker tried to keep him at the scene, Kavanagh slapped him in the face. Gardai got a description of Kavanagh and stopped him a short distance away.
Later on the same date, Kavanagh returned to the same shop and took more food, this time a sandwich, and ate it in the shop. He had no recollection of what happened, said his barrister, Edel Gilligan.
He had been out drinking and had a "lot of alcohol".
He ate the sandwich in the shop because he had no money to pay for it, she said.
"He gave some money to a homeless person so he may have had enough money if that had not happened," she added.
The court heard that the defendant had no previous convictions and was ashamed of his actions.
To make amends for what he did, he had money in court.
The victim had not sustained any injury, Ms Gilligan said.