A GAA player drunkenly told gardai to "f**k off" when they stopped him on his way home from the pub, a court heard.
Francis Carroll (23) refused to give his name and address to gardai, telling them he "didn't care" when they said he could be arrested.
A court heard Carroll was diagnosed with testicular cancer when he was 21, but the cancer is now in remission.
Judge David McHugh ordered Carroll to donate €50 to Blanchardstown Hospice and struck out the charges.
The defendant, of Glenhill Drive in Finglas, admitted before Blanchardstown District Court to public drunkenness, a breach of the peace and failing to provide his details to gardai.
Sergeant Mary Doherty said gardai were on mobile patrol on Jamestown Road in Finglas when Carroll walked in front of the patrol car.
Sgt Doherty said it appeared he threw something at the vehicle. Officers spoke to Carroll, who told them to "f**k off".
She said he refused to provide his name and address. When told he was obliged to do so, he told gardai he "didn't care".
Defence lawyer Jennifer Jackson said Carroll had been at a Dublin hurling match and had gone drinking afterwards.
He was looking for a taxi when he met the gardai. She said he did not throw anything at the garda car, but threw a napkin from a takeaway on the ground.
The court heard Carroll plays for Erin's Isle GAA Club. He also helps train the juvenile teams.