Exception using ILoadFilter
I have a simple ILoadFilter implemention (see below) that I'm trying to use with an ILoadOperation. Here's the exception that's being raised when I try to use it:
java.lang.ClassCastException: com.ibm.mrbuild.rtc.applications.ExtractSnapshot$ExtractFilter incompatible with com.ibm.team.filesystem.client.internal.load.LoadFilter Here's the filter code: private static class ExtractFilter implements ILoadFilter { Any suggestions on what I can do to work around this? Seems like a bug to me. |
One answer
Hi,
Thanks to the code, you can't "simply" implement the java interface :-( You can do it this way : ILoadFilter myFilter = new LoadFilter(new String[0]) { public boolean include(String name) { // Your code here return false; } }; Comments
Jeff Care
commented Jun 15 '12, 10:00 a.m.
I can see how that would work but the LoadFilter class that you refer to is internal. I still say this is a bug: the interface specifies ILoadFilter so ANY ILoadFilter should work. Off course it's a bug, I totally agree. There is another internal class I use to load a workspace on disk from API : com.ibm.team.filesystem.client.internal.PathLocation org.eclipse.core.runtime.IPath rootPath = .... ISandbox sandbox = FileSystemCore.getSharingManager().getSandbox(new PathLocation(rootPath), false); |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
@carej You should raise a bug.