Two justices of the peace have ruled that a former Herald journalist does not have to reveal the names of confidential sources who gave him information published last year.

In the Waitakere District Court yesterday, the JPs said John Andrews, a former chief reporter who now works as a freelance journalist, does not have to give the names and ranks of police officers who passed him information.

The JPs acknowledged that lawyers had indicated they would appeal against whatever decision they made.

Mr Andrews appeared in the court on Tuesday as a witness in a depositions hearing.

Lawyer Rob Weir said he would appeal against the decision by the end of next week.