This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271462 - URLDisplayer is casted to NbURLDisplayer without any check
Summary: URLDisplayer is casted to NbURLDisplayer without any check
Status: NEW
Alias: None
Product: utilities
Classification: Unclassified
Component: URL (show other bugs)
Version: 8.2
Hardware: PC All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-12 09:37 UTC by scanti
Modified: 2017-09-12 09:37 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description scanti 2017-09-12 09:37:08 UTC
Inside o.n.core/src/org/netbeans/core/NbURLDisplayer.java at line 213 there is this code: 

((NbURLDisplayer) URLDisplayer.getDefault()).htmlViewer = null;

In our RCP application, we had to implement our own URLDisplayer, then a user of ours reported a ClassCastException because of the aforementioned code. 

I think you should add a method like reset() to URLDisplayer instead of doing the cast.