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 186177 - [69cat] WorkingCopy.rewrite(Tree,Tree) sometimes generates broken throws for methods
Summary: [69cat] WorkingCopy.rewrite(Tree,Tree) sometimes generates broken throws for ...
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Jan Lahoda
Depends on:
Reported: 2010-05-14 17:01 UTC by misterm
Modified: 2010-05-14 18:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2010-05-14 17:01:46 UTC
After performing a project-wide rewrite using the Java Source API, touching several methods per class, in around 3.5k classes, there are exactly 80 methods that get broken, being changed from:

public void method() {


public void method() throws  {

It doesn't depend on method name nor the generated annotation nor the containing class. I couldn't isolate the cause. It's interesting that there are two spaces after throws in these methods.

It always happens for the same methods in the same classes. I can't come up with a non-proprietary source file that is affected by this issue.

Product Version = NetBeans IDE Dev (Build 100514-3a3dbb12a89f)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_19
Runtime = Java HotSpot(TM) Client VM 16.2-b04
Comment 1 Jan Lahoda 2010-05-14 18:50:42 UTC
Sorry, but without reproducible test case, there is virtually no way to fix this. I tried to look at the diffing code, but there is nothing obviously wrong. I am also removing the random keyword - the bug is unlikely to be random, it only happens under some very specific conditions.