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.
Summary: | Handle cases when there is no (valid) platform for a project | ||
---|---|---|---|
Product: | ruby | Reporter: | ajasja <ajasja> |
Component: | Platform | Assignee: | Martin Krauskopf <mkrauskopf> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=16832 | ||
Issue Type: | DEFECT | Exception Reporter: | 16832 |
Attachments: | stacktrace |
Description
ajasja
2007-12-31 11:57:29 UTC
Created attachment 54576 [details]
stacktrace
If RubyPlatform.platformFor can return null (which it seems like it plausibly could, if somebody installed the Ruby support without the optional bundled JRuby plugin, or, if they deleted all the platforms via the platform manager), then all the call sites need to check for it. I have some null handling annotations (@CheckForNull and @NonNull) in GSF. They're used in the GSF APIs and a few cases in ruby/editing, but I haven't been good about placing them on APIs elsewhere. It might be useful to place these in strategic places so findbugs can find issues like these. (There was a discussion on nbdev about doing something like this IDE wide recently; it should be easy to adapt our own annotation usage to the IDE ones when they are added.) > if somebody installed the Ruby support without the optional bundled JRuby plugin Yup, I did not take this into account. > or, if they deleted all the platforms via the platform manager This is not possible. Default platform cannot be deleted from the GUI. Moreover there is a fallback to the default platform (added today) if a platform previously selected for the project was removed. But the first case is still valid. Will also take a look on annotations. Thanks for tips. The particular reported problem is already fix. Changing this rather to TASK, since there is not any *known* problem at the moment. But nobody tried probably so not just closing. Some progress: 12c27940e5d9 Tried the IDE without default platform and there are many problem. Will fix what I catch for 6.5. > without default platform
As well as without *any* platform. IDE blows up in such case.
Fixed: #008e8ee34902 Likely -majority- of cases. Let's file other issues as they are found. Integrated into 'main-golden', available in build *200808260201* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/008e8ee34902 User: Martin Krauskopf <mkrauskopf@netbeans.org> Log: Handle cases when there is not available either default platform or any platform at all. Issues #124534, #132197. |