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 91141 - Support Ant 1.7 IntrospectionHelper
Summary: Support Ant 1.7 IntrospectionHelper
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: SIMPLEFIX
Depends on:
Blocks: 91142
  Show dependency tree
 
Reported: 2006-12-15 22:33 UTC by loweryr
Modified: 2006-12-20 21:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Updated BridgeImpl.java (22.76 KB, text/plain)
2006-12-15 22:34 UTC, loweryr
Details
Corresponding patch against r551, after whitespace normalization (probably will not apply against trunk code) (1.29 KB, patch)
2006-12-15 22:47 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description loweryr 2006-12-15 22:33:31 UTC
The following code replacing lines 510-519 in
  org.apache.tools.ant.module.bridge.impl.BridgeImpl
     method gutProject(Project p)

  will support the change in ant's IntrospectionHelper (field "helpers" was
changed to "HELPERS").

  Added benefit... JUnit4 tests will function native with this patch, and
pointing ant directory to a 1.7.0RC1+ build of ant.

<CODE>
            boolean found16helpers = false;
            boolean found17helpers = false;
            try {
                Field helpersF = IntrospectionHelper.class.getDeclaredField
("helpers");
                helpersF.setAccessible (true);
                Object helpersO = helpersF.get (null);
                Map helpersM = (Map) helpersO;
                helpersM.clear ();
                found16helpers = true;
            } catch (NoSuchFieldException nsfe) {
                Field helpers17F = IntrospectionHelper.class.getDeclaredField
("HELPERS");
                helpers17F.setAccessible (true);
                Object helpers170 = helpers17F.get (null);
                Map helpers17M = (Map) helpers170;
                helpers17M.clear ();
                found17helpers = true;
            }
</CODE>
Comment 1 loweryr 2006-12-15 22:34:54 UTC
Created attachment 36698 [details]
Updated BridgeImpl.java
Comment 2 Jesse Glick 2006-12-15 22:42:47 UTC
Yes, I will do something like this. Thanks for pointing this out.

By the way, in the future please submit patches in diff (-u) format, rather than
a modified copy of the whole file. In this case I can easily write the necessary
code myself once I know it needs to be done, but in general a patch is much
easier to deal with.
Comment 3 Jesse Glick 2006-12-15 22:47:19 UTC
Created attachment 36699 [details]
Corresponding patch against r551, after whitespace normalization (probably will not apply against trunk code)
Comment 4 Jesse Glick 2006-12-20 21:43:53 UTC
Turns out I had already fixed this in trunk, just forgot about it.