A judge has rejected a $2-billion class action suit mounted by Tim Hortons franchise owners that accuses the chain of gouging them under the company's new way of making doughnuts.

Justice George Strathy of the Ontario Superior Court recently issued a summary judgment in favour of Tim Hortons, dismissing an attempt by some franchisees to argue that the chain was wrongly profiting from a switch in how the company makes its baked goods.

Under what's known as the "Always Fresh Conversion" several years ago, the company stopped making baked goods from scratch in each location every day, and instead started shipping partially baked items that had been flash frozen before final baking in ovens at all Tims locations every morning.

The new system has proven very profitable for the parent company, but some franchisees complained it simply downloaded new costs to them while the parent company pocketed the savings.

The case also alleged that Tims was requiring franchisees to sell new lunch menu items at break-even prices — or sometimes even at a loss.

The plaintiffs allege that's a breach of their franchise agreements, which states ingredients would be sold to franchisees at commercially reasonable prices.

The judge dismissed all aspects of the suit, saying Tims is well within its rights as a franchisor to implement new procedures and technologies to its business model

"In order to keep the system healthy and competitive, the franchisor must be permitted to introduce new products, new methods of production or sale, and new techniques," the ruling reads. "It would not be commercially reasonable to require that the franchisor can only implement system-wide changes … if the proposed change is [demonstrated] to be an improvement that benefits that particular franchisee."

The plaintiffs have a right to appeal the decision, but for its part, Tims said in a statement Tuesday that the chain is eager to move on after the lengthy dispute.

"The company has enjoyed a long-standing, positive and collaborative relationship with our restaurant owners and we look forward to that continuing into the future," spokesman David Morelli said when asked for comment by CBC News.

"We're pleased that our summary judgment motion was granted and that the plaintiffs' claims in that regard were dismissed in their entirety."