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 124534 - Handle cases when there is no (valid) platform for a project
Summary: Handle cases when there is no (valid) platform for a project
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Platform (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-31 11:57 UTC by ajasja
Modified: 2008-08-26 05:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 16832


Attachments
stacktrace (2.73 KB, text/plain)
2007-12-31 11:57 UTC, ajasja
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ajasja 2007-12-31 11:57:29 UTC
Build: NetBeans Ruby IDE 20071230224200
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b06
OS: Windows XP, 5.1, x86

User Comments: 
Opened a Ruby on Rails project and the controller specs.
I ran the IDE with a fresh user dir --userdir D:\tmp\test
Comment 1 ajasja 2007-12-31 11:57:34 UTC
Created attachment 54576 [details]
stacktrace
Comment 2 Torbjorn Norbye 2008-01-02 17:11:52 UTC
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.)
Comment 3 Martin Krauskopf 2008-01-02 19:15:13 UTC
> 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.
Comment 4 Martin Krauskopf 2008-02-20 15:54:52 UTC
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.
Comment 5 Martin Krauskopf 2008-04-28 10:46:11 UTC
Some progress: 12c27940e5d9
Comment 6 Martin Krauskopf 2008-08-25 15:17:25 UTC
Tried the IDE without default platform and there are many problem. Will fix what I catch for 6.5.
Comment 7 Martin Krauskopf 2008-08-25 15:18:29 UTC
> without default platform

As well as without *any* platform. IDE blows up in such case.
Comment 8 Martin Krauskopf 2008-08-25 17:30:18 UTC
Fixed: #008e8ee34902

Likely -majority- of cases. Let's file other issues as they are found.
Comment 9 Quality Engineering 2008-08-26 05:59:06 UTC
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.