SAN FRANCISCO — A state appeal court brewed up a controversy Tuesday by ruling that Starbucks Corp.’s tip-pooling policies don’t violate California law because gratuities are gathered collectively and shared equally.

The decision negates $86 million in restitution that a San Diego judge awarded last year to a class of baristas who had sued the coffee giant.