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 9362 - "Diff" on [LRemoved] file in "Revision Explorer" throws ArithmeticException.
Summary: "Diff" on [LRemoved] file in "Revision Explorer" throws ArithmeticException.
Status: CLOSED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: All Windows ME/2000
: P1 normal (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-02-02 14:02 UTC by Jiri Kovalsky
Modified: 2007-01-04 17:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attachment for bug #9362. (832 bytes, text/plain)
2001-07-20 20:47 UTC, Jiri Kovalsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2001-02-02 14:02:09 UTC
Development build of NetBeans #117 (2001-02-02) on Windows 2000 with JDK 1.3.

Description:
============
It is not possible to compare two arbitrary revisions of a file that has status
[LRemoved]. Each attempt throws really interesting java.lang.ArithmeticException
because of division by zero :-) If you want have a look at the attachment.

Steps to reproduce:
===================
1. Mount JavaCVS filesystem and select arbitrary [Up-to-date] file with at least
   two revisions.
2. Invoke "Remove" action from its popup JavaCvs submenu, check the second
   checkbox "Delete file(s) before removing." and run the command.
3. The file will change to [LRemoved] status. Launch "Revision Explorer" on it.
4. Expand fileobject and select two revisions say 1.1 and 1.2 and try to view
   their "Diff".
5. Verify that above mentioned exception is thrown and window contains trash.
Comment 1 Jiri Kovalsky 2001-02-02 14:03:59 UTC
Created attachment 546 [details]
Attachment for bug #9362.
Comment 2 Jan Chalupa 2001-03-12 10:48:30 UTC
Version: 'Dev' -> 3.2
Comment 3 Milos Kleint 2001-03-26 12:32:19 UTC
sould be fixed in release32 build 13 and dev build 154
Comment 4 Jiri Kovalsky 2001-06-01 14:19:29 UTC
[REGRESSION]
The fix was either not successfull or not integrated into release32 branch beca-
use the bug is 100% reproducable in build #010531_1 of Forte for Java CE using 
exactly the same procedure that is mentioned above. According to new QA rules 
concerning regressions I am forced to reopen the bug and apply the highest P1 
priority in order to fix it as soon as possible.
Comment 5 Milos Kleint 2001-06-05 15:11:59 UTC
it is fixed in the main trunk. (got fixed by code refactoring)
the fix for 3.2.1 is trivial and is included here:


Index: org/netbeans/modules/cvsclient/commands/diff/CvsDiff.java
===================================================================
RCS 
file: /cvs/javacvs/src/org/netbeans/modules/cvsclient/commands/diff/Attic/CvsDif
f.java,v
retrieving revision 1.18.2.1
diff -r1.18.2.1 CvsDiff.java
84c84
<                  && !isFixedDisplayType()) {
---
>                  || isFixedDisplayType()) {
Comment 6 Jiri Kovalsky 2001-06-07 15:17:50 UTC
Yes, it works finally well. Verified in development build of NetBeans #205.
Comment 7 Quality Engineering 2003-07-01 12:50:13 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.