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 40440

Summary: Fix does not work: "No classes were changed."
Product: debugger Reporter: Jaroslav Tulach <jtulach>
Component: CodeAssignee: issues@debugger <issues>
Status: RESOLVED INVALID    
Severity: blocker CC: jrojcek
Priority: P2    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jaroslav Tulach 2004-02-25 06:50:26 UTC
I have not yet seen "Debug/Fix" to work on my
computer in 3.6. When ever I try to use it I get "
No classes were changed." response, even I just
recompiled them.

In my filesystems I have CVS filesystem mounted as
nb_all and various treefs ones over it
(openide/src, openide/test/unit/src) and of course
necessary additional jar files (like junit*.jar).

I start the debug of a test (in my current case  
  org.openide.text.Starvation37045Test) stop on a
breakpoint at    
org.openide.text.CloneableEditorSupport, modify
the class, successfully recompile, go to Debug/Fix
and "No classes were changed."

This lead me to believe that there is a serious
bug in the fix and continue support.
Comment 1 Milan Kubec 2004-02-25 07:39:37 UTC
Jardo, I just verified in build dev-200402241900 on Linux that Fix
functionality is working perfectly. Please see issue #39242 if it
isn't your case. If not please provide reproducible testcase.
Comment 2 Jaroslav Tulach 2004-02-25 09:11:19 UTC
Just tested on newest build. It does not work:

/usr/local/java/bin/java -Xdebug -Xnoagent
-Xrunjdwp:transport=dt_socket,address=d-eprg05-75-231:34819,suspend=y
-Djava.compiler=NONE -classpath
"/usr/local/home/jarda/.netbeans/dev/system:/usr/local/home/jarda/.netbeans/dev/system:/usr/local/home/jarda/work/nbbuild/netbeans/system:/usr/local/home/jarda/work/openide/src:/usr/local/home/jarda/work/openide/test/unit/src:/usr/local/home/jarda/work/openide/compat/test/unit/src:/usr/local/home/jarda/work/core/bootstrap/src:/usr/local/home/jarda/work/core/test/unit/src:/usr/local/home/jarda/work/xtest/nbjunit/src:/usr/local/home/jarda/work/openide/compiler/src:/usr/local/home/jarda/work/openide/loaders/src:/usr/local/home/jarda/work/core/src:/usr/local/home/jarda/work/openide/windows/src:/usr/local/home/jarda/work/core/windows/src:/usr/local/home/jarda/work/openide/explorer/src:/usr/local/home/jarda/work/openide/execution/src:/usr/local/home/jarda/work/openide/io/src:/usr/local/home/jarda/work/core/libsrc:/usr/local/home/jarda/work/openide/util/src:/usr/local/home/jarda/src/nb_all/xtest/external/junit-3.8.1.jar:/usr/local/lib/java/j2sdk1.4.2/src.zip:/usr/local/home/jarda/src/nb_all/libs/external/regexp-1.2.jar:/usr/local/home/jarda/work/nbbuild/netbeans/modules/ext/AbsoluteLayout.jar:/usr/local/home/jarda/work/nbbuild/netbeans/modules/ext/junit-3.8.1.jar:/usr/local/home/jarda/work/nbbuild/netbeans/modules/ext/junit-testrunner.jar:/usr/local/home/jarda/src/nb_all/core/netbeans/lib/core.jar:/usr/local/home/jarda/src/nb_all/core/settings/netbeans/modules/autoload/core-settings.jar"
org.openide.text.SaveDocumentTest
Breakpoint reached at line 100 in class
org.openide.text.SaveDocumentTest by thread main.
Thread main stopped at org.openide.loaders.DataObject.find line 434.
Thread main stopped at org.openide.loaders.DataObject.find line 438.
Thread main stopped at org.openide.loaders.DataObject.find line 442.
Thread main stopped at org.openide.loaders.DataObjectPool.getPOOL line 68.
Thread main stopped at org.openide.loaders.DataObjectPool.getPOOL line 69.
Fix aborted: No classes were changed.

PS: I've modified the DataObjectPool. 
Comment 3 Milan Kubec 2004-02-25 09:23:56 UTC
Do you use Compile action? You are not supposed to, Fix does the
compilation.
Comment 4 Jaroslav Tulach 2004-02-25 10:37:34 UTC
Ofcourse I use compilation, it is nature to use it to dicover errors
and only then upload the class to debugee. Btw. In release35 I could
use compilation and then the fix feature, I never knew that it is
supposed to compile.
Comment 5 Maros Sandor 2004-02-25 11:19:36 UTC
This behavior is 'as designed'. Previous reports regarding 
Fix&Continue showed that users expect this action to only do 
something when some classes are modified. We therefore invoke compile 
and check if anything changed before we upload new classes to the VM. 
We should definately mention this in the docs as I already suggested 
in other comments in other bug reports.
Comment 6 Milan Kubec 2004-02-25 14:24:08 UTC
What about to change this DEFECT to ENHANCEMENT (and reopen it) to
rename that action to "Compile & Fix".

Please Jano consider this suggestion. This is not the first report of
this "problem".
Comment 7 Maros Sandor 2004-02-25 14:29:02 UTC
HIE: Some people suggested that we modify the Compile action to 
automaticaly fix the code if there is a debugging session running. We 
might then remove the Fix&Continue action and leave only the Compile 
action which would temporarily change to Compile&Fix while debugging.
Comment 8 Roman Ondruska 2005-05-09 16:11:43 UTC
Conception of F&C integration into the IDE should be discussed again. 
Comment 9 Martin Entlicher 2009-11-16 08:40:30 UTC
Compile action must not automaticaly fix the code, due to the fragile implementation of Fix&Continue.

In CoS mode the "Apply Code Changes" should work correctly.
In non-CoS mode we should probably change the name to "Compile and Apply Changes" or something like that...
Comment 10 Martin Entlicher 2013-01-10 16:23:23 UTC
If a new hot-swap is integrated into JDK 8, we can consider a better integration with CoS mode...