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 - Added a isValid method into JavaPlatform
Summary: Added a isValid method into JavaPlatform
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: apireviews
Depends on:
Reported: 2017-04-03 12:36 UTC by Tomas Zezula
Modified: 2017-04-03 12:38 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:

Patch file (33.67 KB, application/octet-stream)
2017-04-03 12:36 UTC, Tomas Zezula

Note You need to log in before you can comment on or make changes to this bug.
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.