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 270282

Summary: Added a isValid method into JavaPlatform
Product: java Reporter: Tomas Zezula <tzezula>
Component: ProjectAssignee: apireviews <apireviews>
Status: NEW ---    
Severity: normal Keywords: API, API_REVIEW_FAST
Priority: P3    
Version: Dev   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:
Attachments: Patch file

Description Tomas Zezula 2017-04-03 12:36:16 UTC
Created attachment 164009 [details]
Patch file

Added a isValid method into the JavaPlatform to check JavaPlatform validity.
Currently there are several places which check JavaPlatform validity in different ways.
Most used pattern is !jp.getInstallFolder().isEmpty() but on some places also important tools are checked in addition to install folders.

The JavaPlatform was extended by isValid method doing the !jp.getInstallFolder().isEmpty(). The subclasses like J2SEPlatform can do more checks like check of important tools and boot classpath validity.