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 11436 - Java external compilers do not catch IllegalArgumentException
Summary: Java external compilers do not catch IllegalArgumentException
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks: 11367
  Show dependency tree
 
Reported: 2001-04-15 00:53 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-04-15 00:53:13 UTC
Java module's external compiler types fail to catch IllegalArgumentException
thrown from the constructor of ExternalCompiler (a documented exception). They
let the exception propagate past CompilerType.prepareJob, which is not
permitted. More to the point, the up-to-date-badge code when creating a compiler
job permits this to be thrown, and so IAE's can appear even when the user is not
doing anything.

This blocks a fix of #11367. Rather, that bug can be fixed, but when this is
done, any Java source which does not correspond to a file on disk (e.g.
un-checked-out VCS file, or any normal template) will cause an exception dialog
to appear when it is recognized and the badge is calculated. The dialog is
annotated with a localized message, so it is polite, but still makes no sense
that it should appear.

Suggest Java module implement fix similar to the one in Ant module very recently
(AntCompilerType):

1. All compiler types should check for possibility of IAE from ExternalCompiler
constructor, explicitly catch it, and if caught, do nothing immediately, but if
the compiler job is run, then print out a message to the user based on the
localized annotations. This requires a special compiler & group. See
AntCompilerType.BogusCompiler for an example.

2. Code to check compiler badges should probably catch RuntimeException just to
be safe, and log it at low level (log file, e.g.), since it is clearly harmless
if the compiler job could not be created correctly in this case.
Comment 1 Svata Dedic 2001-04-17 14:41:48 UTC
Fixed in dev trunk, pending merge to 3.2
Comment 2 Svata Dedic 2001-04-18 15:22:37 UTC
Merged to 3.2
Comment 3 Jan Becicka 2001-05-03 16:30:21 UTC
[010502_1] Verified
Comment 4 Jan Chalupa 2001-05-05 23:24:45 UTC
Target milestone -> 3.2
Comment 5 Quality Engineering 2003-07-01 13:19:39 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.