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 18101 - ClassCastException on org.netbeans.modules.javacvs.caching.CvsCacheFile
Summary: ClassCastException on org.netbeans.modules.javacvs.caching.CvsCacheFile
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: Milos Kleint
: 19697 (view as bug list)
Depends on:
Reported: 2001-11-26 22:16 UTC by _ gtzabari
Modified: 2007-01-04 17:14 UTC (History)
1 user (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 _ gtzabari 2001-11-26 22:16:57 UTC
dev build 200111210100
Sun JDK 1.3.1

When using CVS | UPDATE I get:

Mon Nov 26 17:14:31 EST 2001: java.lang.ClassCastException: 
java.lang.ClassCastException: org.netbeans.modules.javacvs.caching.CvsCacheFile
        at org.netbeans.modules.javacvs.commands.CvsUpdate.fireUpdateCache
        at org.netbeans.modules.javacvs.commands.CvsUpdate.executeFailed
[catch] at
Comment 1 Milos Kleint 2001-11-27 07:14:47 UTC
can you provide more details?
 does that happen regularly or just once?

having a file and directory with the same name by any accident?
Comment 2 _ gtzabari 2001-11-27 14:42:36 UTC
This happened consistently. I don't believe the filename/directory
were identical. Beyond that, I don't recall many more details. I know
that CVS | CHECKOUT worked while CVS | UPDATE gave the error above.
Comment 3 Milos Kleint 2001-11-27 21:52:27 UTC
I wonder if you're able to locate the directory where this happens and
send me the list of files/dirs in this directory + the
CVS/netbeans.cache file's content in this directory. thanks.
Comment 4 Milos Kleint 2002-01-23 16:42:08 UTC
*** Issue 19697 has been marked as a duplicate of this issue. ***
Comment 5 Milos Kleint 2002-01-23 21:56:50 UTC
fixed in main trunk. (appears in dev build on 24/Jan/2002)

Comment 6 Milos Kleint 2002-01-24 18:12:41 UTC
I think this fix should be included in the 3.3.1 branch as well.

Jirka, Dan? 

The diff is quite straightforward and I think it's safe. And not
fixing the bug has annoying consequences. (Even though no data are
lost, just the annotations cache is not updated correctly)

Index: org/netbeans/modules/javacvs/commands/
RCS file:
retrieving revision 1.27
retrieving revision 1.26
diff -r1.27 -r1.26
<                 if (files[i].isDirectory()) {
<                     dir = files[i];
<                 } else {
>                 if (files[i].isFile()) {
>                 } else {
>                     dir = files[i];
<             CacheFile originalFile = handler.getCacheFile(dir,
CacheHandler.STRAT_NONE, JavaCvsCache.JAVA_CACHE_NAME);
<             if (originalFile != null && originalFile instanceof
CvsCacheDir) {
<                 CvsCacheDir originalDir = (CvsCacheDir)originalFile;
>             CvsCacheDir originalDir =
(CvsCacheDir)handler.getCacheFile(dir, CacheHandler.STRAT_NONE,
>             if (originalDir != null) {
Comment 7 Jiri Kovalsky 2002-01-25 09:36:20 UTC
I recommend to integrate the fix also into NetBeans 3.3.1 because
above mentioned exception is 100% reproducable and I have successfully
fied the fix in trunk. On the other hand I must admit that this kind
of scenario is not so frequent.

Steps to reproduce:
1. Mount CVS filesystem using Built-in Client.
2. Select some [Up-to-date] file with at least two branches.
3. Right click the file, hold down CTRL key and choose "CVS|Update...".
4. Check "Revision/Tag", type name of the first branch and push "OK".
5. "Delete" this file and wait until it gets [NCheckout] status.
6. Repeat steps 3 and 4 for the second branch.
7. After "OK" button is pressed the exception is thrown.
Comment 8 Milos Kleint 2002-01-25 09:41:08 UTC
I'm not sure it's still possible to integrate into the 3.3.1 branch.
If it is possible, please consider this bug for integration..
Comment 9 Jiri Kovalsky 2002-01-25 10:22:51 UTC
It works perfectly in development build #200201250100 of NetBeans 3.4.
Comment 10 eadams 2002-01-25 11:59:12 UTC
Ian, Honzo and I discussed this.
We do not approve this fix at this time because
it is too late in the release cycle and this is
a P3 problem.

This bug should be fixed immediately after NB 3.3.1
is final and made available via AutoUpdate.
Comment 11 Jiri Kovalsky 2002-01-25 15:19:35 UTC
Okay, in such a case I am exchanging the keywords. I think this bug is
at least worth documenting.
Comment 12 Jiri Kovalsky 2002-02-22 17:47:08 UTC
Good candidate for 3.3.2 release.
Comment 13 Jiri Kovalsky 2002-03-22 14:31:02 UTC
We have changed our mind. This is not required for NetBeans 3.3.2
release since it's not probable to happen very often.
Comment 14 Quality Engineering 2003-07-01 12:49:00 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.