Bug 59895 - NPE updating an aspect in incremental mode
Summary: NPE updating an aspect in incremental mode
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Jim Hugunin CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 61845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-25 20:43 EDT by Wes Isberg CLA
Modified: 2012-04-03 16:10 EDT (History)
1 user (show)

See Also:


Attachments
patch fix (1.20 KB, patch)
2004-04-25 20:45 EDT, Wes Isberg CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wes Isberg CLA 2004-04-25 20:43:35 EDT
NPE when updating an aspect in incremental mode.
Find test case in incremental/full-rebuild.

AjBuildManager.java:208 finally clause runs after 
every iteration:

     ret = !handler.hasErrors();
     handler = null;

But at AjBuildManager.java:124, handler is only set if 
there is not a complete rebuild: 

    if (!canIncremental && !batch) { // retry as batch?
        return doBuild(buildConfig, baseHandler, true);
    }
    this.handler = ...

Since result is set by return doBuild..), could say

    if (null != handler) {
        ret = !handler.hasErrors();
    }

(Seems to have been introduced in a month ago in 1.44.  Our test coverage of
incremental mode is awful.)
Comment 1 Wes Isberg CLA 2004-04-25 20:45:07 EDT
Created attachment 9930 [details]
patch fix

minimal, also adds warning guard, passes test suite.  But I don't like this
code ...
Comment 2 Wes Isberg CLA 2004-04-25 20:46:40 EDT
raising priority to fix before 1.2 final
Comment 3 Adrian Colyer CLA 2004-05-13 05:18:51 EDT
Adrian fixed.
Comment 4 Adrian Colyer CLA 2004-05-13 05:27:12 EDT
*** Bug 61845 has been marked as a duplicate of this bug. ***