ILocateChangeSetSearchCriteriaFactory.create
![](http://jazz.net/_images/myphoto/7a82a888a7ef16ebc9a85a62ffb818ae.jpg)
ILocateChangeSetSearchCriteriaFactory.create(java.util.List<IChangeSetHandle> changeSets, java.util.List<IWorkspaceHandle> workspaces, java.util.List<IBaselineSetHandle> snapshots)
And now at 4.0.6 my build is broken because this function is no longer in the class. Instead I have:
ILocateChangeSetSearchCriteriaFactory.create(java.util.List changeSets, java.util.List workspaces, java.util.List snapshots, java.util.List baselines)
ILocateChangeSetSearchCriteriaFactory.create(java.util.List changeSets, java.util.List workspaces, java.util.List snapshots, java.util.List baselines, boolean includeCopies)
So my build is broken, and presumably my program won't run against 4.0.6 because it no longer contains the method I coded against.
Moving forwards, though.... the javadoc says "baselines" cannot be null. What should it be set to? What if I don't want to search in baselines, but only in snapshots? Please provide an answer, and clarify the javadoc - thanks!
One answer
![](http://jazz.net/_images/myphoto/7a82a888a7ef16ebc9a85a62ffb818ae.jpg)
Comments
![](http://jazz.net/_images/myphoto/7a82a888a7ef16ebc9a85a62ffb818ae.jpg)
Thanks - OK I can get this code to compile:
criteria = ILocateChangeSetsSearchCriteria.FACTORY.create(
(java.util.List)changeSets,
(java.util.List)locate_workspaces,
(java.util.List)locate_snapshots,
(java.util.List)locate_baselines );
where locate_baselines is just this
private static List<IBaseline> locate_baselines;
The casts from properly-typed Lists are undesirable, but without them I get compile errors.
But although it compiles, it gives me IllegalArgumentException at runtime.
I guess it's down to the casts, but what can I do about that? I need properly-typed lists.
This code worked at 4.0.0.1.
Any ideas why I get the exception?
![](http://jazz.net/_images/myphoto/7a82a888a7ef16ebc9a85a62ffb818ae.jpg)
I have got this working - my "illegal argument" was the 4th argument which I had forgotten to initialise, and so was null.
Oh, and to be correct, when I said "this code worked at 4.0.0.1" I don't mean the code snippet I just posted. I mean my old call to the old method that no longer exists at 4.0.6.
![](http://jazz.net/_images/myphoto/dbae95bdb19ad8361907d9b236827b71.jpg)
Yes, the baselines were added to the query. It was marked experimental before so anybody else using that search should be aware of that.