FOR THOSE WHO sometimes deal in confidential information, as newspapers do, the decision of the New Jersey Supreme Court in the contempt case against The New York Times and reporter M. A. Farber is a disaster. The court ruled Thursday that a newspaper reporter cannot withhold, at least from the trial judge, information sought by a defendant in a criminal case. The logic by which it reached that judgment, however, reaches beyond newspapers and reporters. It leads inexorably to the conclusion that no one can withhold such information, that lawyers, doctors, clergymen, spouses and law-enforcement officers can be compelled to break their pledges or vows of confidentiality if a defendant seeks their testimony or records.

The New Jersey court, of course, did not carry its logic that far. It set aside for the time being those other privileges, noting only that they "seem to conflict" with its interpretation of the state and federal constitutions. The rights granted to defendants by those constitutions, it said, override the privilege granted to reporters by the New Jersey legislature to keep secret information that has come from confidential sources. But since those other privileges rest on either similar legislation or the common law, this decision makes them part of a suddenly endangered species. It will be interesting to see whether this particular court will treat the rights asserted by a lawyer or a clergyman in a similar case as cavalierly as it has treated the rights asserted by The Times.

An example of its peculiar handling of this case is its ruling on the claim by The Times that newspapers are entitled to full judicial hearing before they can be cited for contempt of a judge's order requiring them to submit confidential information. The court upheld that claim. But then it said The Times was not entitled to such a hearing in this case because the trial judge knew enough about the facts to rule without a hearing. In other words, The Times was right all along on that aspect of the law, but the law didn't apply to The Times.

The court was similarly disingenuous in its handling of other issues in this unusually complex case. It said a newspaper doesn't have to turn over confidential information that is "patently irrelevant to the needs of the [defendant] or [if] his needs are not manifestly compelling." But then it ruled that all the information sought by the defendant in this case had to be turned over to the trial judge without any determination of whether it was irrelevant or the need for it was compelling. That means The Times is being ordered to disclose the "irrelevant" materials the court said it shouldn't be required to disclose.

We can understand why the judges believe that some of the material in the hands of The Times and its reporter may be vital to the defense in this murder case. And we would understand an order directing that specific material be given to the defense. But the New Jersey courts are not content with that. They want everything that is in the files, whether it is relevant to the trial or not and regardless of what benefit its disclosure might give to the defense or what harm it might bring to The Times. That is the basic wrong in this case and one with which the New Jersey Supreme Court steadfastly refused to grapple.

The result of this decision is to leave The Times in a totally untenable situation. It has been ordered to yield all of its files for what is, at best, a fishing expedition requested by lawyers who hope something useful is there. If The Times refuse to comply with this order, the penalties already imposed - a $5,000-a-day fine on the paper and an indeterminate jail term for its reporter - could last indefinitely unless the defendant happens to be acquitted. If it complies, the paper and its reporter will be breaking a promise made to dozens of sources, and the case will become a precedent for fishing expeditions through the files of other newspapers.

That is bad enough. The case will clearly have an inhibiting effect on the willingness of confidential sources to speak about wrongdoing to reporters for The Times or any other newspaper. But the potential for even greater mischief is there. If other courts follow the logic of this decision, similar fishing expeditions through the files of prosecutors, doctors, lawyers and clergymen will become possible. Our reading of what they have written leads us to wonder whether the judges in New Jersey have given even one serious thought to the implications of what they have done.