The police detective accused of exposing his penis to a woman and her 11-year-old son has been found not guilty.

Detective Thomas Andrews, who works at police National Head Quarters and can be named for the first time, was charged with obscene exposure and offensive behaviour after a drinking session on New Year's Eve.

Mr Andrews, 44, told the court that he had about 10 drinks while out dancing in Pukekohe and was heading to a BP station for food at about 2am when he stopped to urinate in central Pukekohe.

He said not long after he heard a "metallic sound" and saw lights outside the Salvation Army shop and decided to investigate.

The complainant, Justine Richardson, said she was confronted by a drunk man who swore at her and asked "What the f*** am I doing out on the street with my child at that time of night".

"The words were slurred and not flowing and that's when I became aware he was intoxicated," Ms Richardson told the court yesterday.

She said the man showed her a police detective's badge before she told him his fly was undone.

"He then looked down and he chuckled a little bit and stepped backwards.

"He began to fumble with the dome on his pants and he was still chuckling as if he found the situation very funny. It was then that his pants fell down to his knees area. I saw his penis," the woman said.

But Mr Andrews told the court this never happened. He said he confronted a woman while only "moderately intoxicated" and she sped off.

He told the court that at no time did he expose himself to Ms Richardson.

Judge Sharon McAuslan said she had "doubts" about Ms Richardson's story and pointed to evidence raised by defence lawyer Peter Kaye that Ms Richardson had a history of dishonesty offences.

"I accept that she had extensive dealings with police and appeared before the court as a person with a history of dishonesty," Judge McAuslan said.

Ms Richardson had earlier told the court that after the exposure she had driven around the block before going to the 24 hour BP petrol station to call police.

Judge McAuslan said she found this strange, given that there was evidence that both she and her son had cell phones and neither had called police.

"If she was so terrified and so scared, she would not have gone around the block and back to the BP," she said.

"This gives me cause to have doubts," Judge McAuslan said.

She also found it strange that the woman's son had turned away from the man at the window, just as the exposure was supposed to have happened.

"This seems to me patently impossible. If a child is so scared he would have remained [focussed] on the subject of terror," Judge McAuslan said.

But the judge also criticised Mr Andrews for being "highly intoxicated" in public and trying to carry out police work in such a state.

"I find it reprehensible that a serving police officer was so intoxicated in a public place," Judge McAuslan said.

She said despite Mr Andrew's claim that he was "moderately intoxicated" he admitted not noticing Ms Richardson's son in the car and then not recognising her at a petrol station a short time later

Outside court Mr Kaye said he was "thankful and very relieved" at the decision but he and his client would not be commenting further.