Finding out that J.C. Penney (JCPN.Q) lost its long battle against Macy's (M -1.52%) over the right to sell Martha Stewart Living Omnimedia (MSO.DL) products was surprisingly cathartic. It felt like finding Waldo after an hour of staring at a page full of sunburned swimmers and striped beach towels. Yesterday, a judge ruled that J.C. Penney interfered with Macy's exclusivity agreement with Martha Stewart by selling certain products.

J.C. Penney won't be assessed any punitive damages, with the New York state Supreme Court judge saying the company's board and management had suffered enough by being "humiliated." Macy's can still argue for monetary damages for lost revenue, but any punishment has been ruled out.

Martha Stewart in high demand
The whole debacle links back to J.C. Penney's usual suspect, former CEO Ron Johnson. Under Johnson's watch, the company signed a deal that brought the Martha Stewart brand's homewares line into stores. The problem is that Macy's had an exclusivity agreement with Martha Stewart for many of the lines that J.C. Penney picked up.

The judge said J.C. Penney exhibited "adolescent behavior in the worst form." Even so, he decided that Macy's had failed to show that it deserved any extra money from punitive damages, saying that J.C. Penney's actions were not malicious.

It's the absolute best outcome that J.C. Penney investors could have hoped for, as it seemed clear from the start that Macy's was going to win this one. J.C. Penney's stock was up slightly at midday Tuesday, reflecting the fact that things could have gone much worse for the company.

J.C. Penney sees a brighter future
I've been on a J.C. Penney positivity kick recently. CEO Myron Ullman has a clear idea of what the company needs to do, which is a positive step for the business. J.C. Penney could easily have been hammered by a huge fine, taking more of the company's already limited cash away from day-to-day operations.

There's still the chance for things to go wrong here, with Macy's free to argue for substantial lost revenue, which would not fall under the "punitive damages" umbrella. The decision on final payments will be made by a special committee at a later date. Analysts have estimated that J.C. Penney may have gained upward of $100 million from Martha Stewart sales, some of which Macy's is going to go right after. Even with the potential for a hit later on, J.C. Penney investors should still revel in this result.