Issue Details (XML | Word | Printable)

Key: OPENBLUESKY-7
Type: Bug Bug
Status: In Progress In Progress
Priority: Major Major
Assignee: fabriziogiudici
Reporter: fabriziogiudici
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenBlueSky

Finders should clone at each method invocation

Created: 12/Jan/10 01:49 AM   Updated: 25/Mar/11 09:33 AM
Component/s: Utilities
Affects Version/s: 0.4.0
Fix Version/s: None

Time Tracking:
Not Specified

Tags:


 Description  « Hide

Finders support the fluent interface:

List<String> l = foo.findSomething().from(4).max(10).results();

and every method just returns 'this'. But this approach doesn't allow to do:

Finder<String> f1 = foo.findSomething();
List<String> l1 = f1.from(4).max(10).results();
List<String> l2 = f1.from(14).max(10).results();

In fact, a Finder is stateful and the second call to results() would always return the previously computed value. The above code would work if a Finder cloned itself.



fabriziogiudici added a comment - 25/Mar/11 09:33 AM

This has probably been resolved in 0.9.0. Should just check that all finders have been updated.