You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ethan Killian (JIRA)" <ji...@apache.org> on 2006/09/26 23:11:51 UTC
[jira] Created: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
ClassCastException in AbstractFileObject when using OnCall caching
------------------------------------------------------------------
Key: VFS-82
URL: http://issues.apache.org/jira/browse/VFS-82
Project: Commons VFS
Issue Type: Bug
Affects Versions: Nightly Builds
Environment: Windows XP
Reporter: Ethan Killian
When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
Here is the stack trace in question:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Ethan Killian (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=all ]
Ethan Killian updated VFS-82:
-----------------------------
Attachment: AbstractFileObject.patch
Fix for ClassCastException problem. Since the files that are resolved may not be AbstractFileObject's cannot just call deleteSelf() which is only an AbstractFileObject method. Instead check if it is indeed an AbstractFileObject and call deleteSelf(), otherwise use the FileObject interface to delete a single file.
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=comments#action_12438042 ]
Mario Ivankovits commented on VFS-82:
-------------------------------------
Thanks, just, could you please rework you patch to use
AbstractFileObject afo = FileObjectUtils.getAbstractFileObject(fo);
This will unwrap the decorated file object and you can use the AbstractFileObject as before.
The decorated file object is primary meant to be used outside of VFS, within it should always be possible to unwrap it when required.
Thanks!
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch, LocalFile.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Resolved: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=all ]
Mario Ivankovits resolved VFS-82.
---------------------------------
Resolution: Fixed
Applied.
Thanks for the patches!
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch, AbstractFileObject.patch, LocalFile.patch, LocalFile.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Ethan Killian (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=all ]
Ethan Killian updated VFS-82:
-----------------------------
Attachment: AbstractFileObject.patch
LocalFile.patch
Updated patches to use the more appropriate FileObjectUtils.getAbstractFileObject() method. Using this method cleaned up the code a lot.
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch, AbstractFileObject.patch, LocalFile.patch, LocalFile.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Ethan Killian (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=all ]
Ethan Killian updated VFS-82:
-----------------------------
Attachment: AbstractFileObject.patch
Updated patch to include rename class cast exception as well.
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Commented: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Ethan Killian (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=comments#action_12437969 ]
Ethan Killian commented on VFS-82:
----------------------------------
In addition to the original delete issue with ClassCastException on a DecoratorFileObject there are additional issues with renames. I have only looked at the Local provider and there may be additional issues in all of the other types of providers since for the rename it was an issue with the LocalFile. I have included an updated patch for AbstractFileObject and included a patch for LocalFile.
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch, LocalFile.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (VFS-82) ClassCastException in AbstractFileObject
when using OnCall caching
Posted by "Ethan Killian (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VFS-82?page=all ]
Ethan Killian updated VFS-82:
-----------------------------
Attachment: LocalFile.patch
Patch for LocalFile which also has a class cast issue on a rename when dealing with decorator objects.
> ClassCastException in AbstractFileObject when using OnCall caching
> ------------------------------------------------------------------
>
> Key: VFS-82
> URL: http://issues.apache.org/jira/browse/VFS-82
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: Nightly Builds
> Environment: Windows XP
> Reporter: Ethan Killian
> Attachments: AbstractFileObject.patch, AbstractFileObject.patch, LocalFile.patch
>
>
> When using OnCall caching in the file system, there is a ClassCastException in the AbstractFileObject because it assumes that every child it will encounter will also be an AbstractFileObject as well.
> Here is the stack trace in question:
> Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.commons.vfs.cache.OnCallRefreshFileObject
> at org.apache.commons.vfs.provider.AbstractFileObject.delete(AbstractFileObject.java:748)
> at org.apache.commons.vfs.impl.DecoratedFileObject.delete(DecoratedFileObject.java:79)
> at org.apache.commons.vfs.cache.OnCallRefreshFileObject.delete(OnCallRefreshFileObject.java:74)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org