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 61759 - Exception when changing method params, no change made
Summary: Exception when changing method params, no change made
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 62224 62237 (view as bug list)
Depends on:
Blocks: 61694
  Show dependency tree
 
Reported: 2005-08-03 13:56 UTC by Milan Kubec
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
first exc stack trace (1020 bytes, text/plain)
2005-08-03 13:56 UTC, Milan Kubec
Details
second exc stack trace (1.42 KB, text/plain)
2005-08-03 13:57 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2005-08-03 13:56:17 UTC
[dev-200508021800, JDK 1.5.0_04]

Steps to reproduce:
1) Opened Java project created from bingo application (part of Java Tutorial)
2) Find class bingo.game.RingMaster and method announceBall(BingoBall b)
3) Invoke Refactor | Change Method Params action
4) Add boolead param with true deafult value, click Next
5) Double click the last line in preview dialog
6) Run Do Refactoring
InvalidObjectException is thrown.

javax.jmi.reflect.InvalidObjectException: Object was deleted.
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.throwInvalidObject(MetadataElement.java:145)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.objectChanged(MetadataElement.java:248)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.LightAttrList.objectChanged(LightAttrList.java:111)
...

After switching editor back to RingMaster class another NullPointerException was
thrown.

java.lang.NullPointerException
	at
org.netbeans.modules.java.ui.nodes.elements.ElementFormat$Tag.format(ElementFormat.java:535)
	at
org.netbeans.modules.java.ui.nodes.elements.ElementFormat.format(ElementFormat.java:240)
	at
org.netbeans.modules.java.ui.nodes.elements.ElementFormat.format(ElementFormat.java:263)
...

No change of parameters was done.
Comment 1 Milan Kubec 2005-08-03 13:56:47 UTC
Created attachment 23460 [details]
first exc stack trace
Comment 2 Milan Kubec 2005-08-03 13:57:23 UTC
Created attachment 23461 [details]
second exc stack trace
Comment 3 Milan Kubec 2005-08-03 14:41:13 UTC
Reproducible on following sources too (changing params of setIt() method):

package javaapplication2;
public class NewClass {    
    public NewClass() {
    }    
    public void setIt(String s) {
    }    
}
---
package javaapplication2;
public class NewClass2 {    
    public NewClass2() {
        NewClass nc = new NewClass();
        nc.setIt("asdf");
    }    
}

Reproducible only when displaying some of affected files (step 5 in steps to
reproduce).

Issue was marked as future Q-build stopper.
Comment 4 Tomas Hurka 2005-08-05 15:45:44 UTC
Fix in progress.
Comment 5 Tomas Hurka 2005-08-15 16:19:37 UTC
Fixed in trunk.
Checking in javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v  <--  
ResourceImpl.java
new revision: 1.90; previous revision: 1.89
done
Checking in src/org/netbeans/modules/java/JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
new revision: 1.198; previous revision: 1.197
done
Checking in src/org/netbeans/modules/java/JavaParserGlue.java;
/cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java,v  <--  JavaParserGlue.java
new revision: 1.56; previous revision: 1.55
done
Comment 6 Milan Kubec 2005-08-18 09:43:26 UTC
Change of params works now, but there is different problem. I'll file new issue.
Verified in dev-200508171800.
Comment 7 Tomas Hurka 2005-08-19 15:45:04 UTC
*** Issue 62224 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Hurka 2005-08-19 15:56:36 UTC
*** Issue 62237 has been marked as a duplicate of this issue. ***
Comment 9 Quality Engineering 2007-09-20 10:32:10 UTC
Reorganization of java component