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 78983 - NPE when switching to command-line diff
Summary: NPE when switching to command-line diff
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Diff (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: diff-issues@utilities
URL:
Keywords:
: 82038 96169 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-23 15:07 UTC by Jiri Prox
Modified: 2007-03-21 13:39 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (817 bytes, text/plain)
2006-06-23 15:07 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2006-06-23 15:07:31 UTC
NB Dev 200606221800
JDK 1.6.0 b86

NPE is thrown when switching diff engine to command-line. At the first the
dialog "No difference were found ... " is opened, although there are some. After
closing the dialog the NPE is thrown. From this moment it's impossible to open
diff view, every time Tools -> Diff is called only the dialog "No difference
were found ... " is shown.

Steps to reproduce:
1) create new j2se project (with class Main)
2) create NewClass
3) select both classes and call Diff
4) in diff view select Command-line diff
-> "No difference were found ... " dialog is shown
5) close the dialog
->
java.lang.NullPointerException
	at
org.netbeans.modules.diff.builtin.DiffPresenter.viewVisualizer(DiffPresenter.java:418)
	at
org.netbeans.modules.diff.builtin.DiffPresenter.access$300(DiffPresenter.java:55)
Comment 1 Jiri Prox 2006-06-23 15:07:55 UTC
Created attachment 31339 [details]
NPE
Comment 2 Maros Sandor 2006-09-11 11:49:15 UTC
*** Issue 82038 has been marked as a duplicate of this issue. ***
Comment 3 Maros Sandor 2006-09-11 13:19:29 UTC
I am not able to reproduce it on Windows or Linux. Please reopen if it still
does not work for you, preferably with more details about your configuration
(diff command works from command line? etc.) and steps you do.
Comment 4 Jiri Prox 2006-09-11 13:58:47 UTC
Reproducible in:
NetBeans IDE Dev (Build 200609101800)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b98
Linux version 2.6.5-1.358 running on i386
en_US (nb); UTF-8

I've tried it also on solaris and it behaves exactly the same. The commandline
diff is working and shows differences between given files.

Steps to reproduce:
1) select two java classes
2) call diff (from context menu in project view)
3) switch the engine to Command-line
-> No difference found
-> NPE

Comment 5 Maros Sandor 2006-09-11 14:57:58 UTC
Diff window is now shown regardless of number of differences found.

/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffComponent.java,v
 <--  DiffComponent.java
new revision: 1.20; previous revision: 1.19
/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/visualizer/GraphicalDiffVisualizer.java,v
 <--  GraphicalDiffVisualizer.java
new revision: 1.13; previous revision: 1.12
/shared/data/ccvs/repository/diff/src/org/netbeans/modules/diff/builtin/DefaultDiff.java,v
 <--  DefaultDiff.java
new revision: 1.16; previous revision: 1.15
Comment 6 Jiri Prox 2006-12-14 10:28:26 UTC
verified
Comment 7 Maros Sandor 2007-03-21 13:39:29 UTC
*** Issue 96169 has been marked as a duplicate of this issue. ***