What happened

Shares of Johnson & Johnson (JNJ -0.69%) were moving higher today after the company got some favorable legal news.

The healthcare giant reached a settlement worth $8.9 billion over allegations that talc in its baby powder and other products caused ovarian cancer and mesothelioma in tens of thousands of victims.

While that might not sound like good news, the settlement had long been anticipated, and it removes a downside risk that had been nagging the company for years.

As a result, the stock was up 4% as of 2:24 p.m. ET.

So what

Johnson & Johnson had made several legal maneuvers to contain the damages from the claims, as its subsidiary being sued had filed for bankruptcy.

The proposed settlement, which involves nearly 70,000 plaintiffs, would cover all current and future claims over Johnson & Johnson's products that contain talc, effectively putting the matter to rest as long as the court approves the agreement.

In a statement, Johnson & Johnson said that it continues to believe the claims are "specious and lack scientific merit," but resolving them through the tort system would be more costly and take longer. The current settlement "allows claimants to be compensated in a timely manner, and enables the Company to remain focused on our commitment to profoundly and positively impact health for humanity."

Now what

While $8.9 billion is a considerable sum of money for any company, for Johnson & Johnson, it represents roughly two quarters' worth of profits based on last year's performance. That's a substantial penalty, but not large enough to jeopardize the future of the company.

As negotiated, the settlement will be paid out over 25 years, meaning it would not have an immediate impact on the company's financial results.

The deal still needs to be approved by the court and the plaintiffs, but investors clearly believe that this is a step in the right direction for the blue chip healthcare conglomerate.

Keep an eye out to see if it gains court approval, as investors are expecting.