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 29288 - CompilerTask.isSuccessful()
Summary: CompilerTask.isSuccessful()
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Chris Webster
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2002-12-04 16:35 UTC by Jan Pokorsky
Modified: 2004-04-19 16:15 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 Jan Pokorsky 2002-12-04 16:35:09 UTC
Javadoc of CompilerTask.isSuccessful() says it
returns null even if the task is stopped. IMO it
is not proper behavior. If  a compiler task is
just a part of an action (eg run execution
profile) then the action is not able to detect if
output of the compilation tak is ready for futher
tasks (eg execution).

I propose to return true just in case the
compilation finished  without any error.
Comment 1 Chris Webster 2002-12-04 18:33:44 UTC
 The javadoc for
org.netbeans.api.compilation.CompilerTask.isSuccessful returns true if
no errors were encountered prior to compilation termination (invoking
{@link #stop()} will return the compilation success for the portion of
compilation completed). false will be returned if at least one error
was reported during the compilation or the compilation terminated due
to a compiler exception.

Are you looking at the old compiler api's? 
Comment 2 Jan Pokorsky 2002-12-05 16:51:37 UTC
No, I was looking at the right API but type wrong return value (null
instead of false) :-)

For sure I will refine my proposal:
Return true just in case the compilation finished without any error
and any interruption (via stop()).

Reasons remain same.
Comment 3 Chris Webster 2002-12-05 20:44:35 UTC
You are requesting that isSuccessful return false if the compilation
was stopped correct? I am assuming the use case is that you don't want
to execute something where the compilation was stopped prematurely. 
Comment 4 Jan Pokorsky 2002-12-06 11:56:35 UTC
Yes, exactly. Why is a compilation considered as successful even if it
was interrupted? It does not make much sense to me.
Comment 5 Chris Webster 2002-12-10 19:21:16 UTC
committed
Comment 6 Jan Pokorsky 2003-07-15 14:48:12 UTC
verified
Comment 7 Jan Becicka 2003-11-25 14:20:05 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.

Marking issue as CLOSED.