State judges invited to party it up at a law firm shindig may want to think twice.

In an opinion published Tuesday, the California Supreme Court Committee on Judicial Ethics Opinions said law firm holiday parties, grand opening events and anniversary celebrations present potential canonical pitfalls for unwary judicial officers.