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 150408 - CSS Editor logs too many errors if docs/css21-spec.zip is missing
Summary: CSS Editor logs too many errors if docs/css21-spec.zip is missing
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-16 15:56 UTC by emi
Modified: 2010-04-19 14:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Check for null HELP_URL (1.30 KB, patch)
2008-10-16 15:57 UTC, emi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description emi 2008-10-16 15:56:36 UTC
Hy,

The CSS Editor logs too many exceptions in CssHelpResolver.getPropertyHelpURL() if docs/css21-spec.zip is missing and
thus HELP_URL==null.

The reason is that it tries to build an URL by appending "null" which fails with MalformedURLException. This exception
is logged every time document() is called basically (ie. every time the user switches the item in the completion list).

Attaching a patch that fixes this behavior. If HELP_URL==null there shouldn't be a documentation window and that's it.

Eventuall CssHelpResolver.getHelpZIPURL() could log a one-time warning that it is returning null if it's that important,
but I don't think it is needed.
Comment 1 emi 2008-10-16 15:57:20 UTC
Created attachment 71998 [details]
Check for null HELP_URL
Comment 2 Marek Fukala 2008-10-16 16:20:12 UTC
btw why is docs/css21-spec.zip missing???
Comment 3 emi 2008-10-16 20:16:11 UTC
In my case it's missing because I've packaged the files in my own way and excluded the docs/ folder.

So technically speaking this isn't a bug in a standard NetBeans install where you are guaranteed to have
docs/css21-spec.zip somewhere, but the code does have this bug if the file goes missing.
Comment 4 Marek Fukala 2008-10-16 21:08:22 UTC
Sure, I'll fix it. I just wanted to be sure there isn't another problem with the missing jar.
Comment 5 Marek Fukala 2010-04-19 14:12:37 UTC
already fixed