Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Factory#createQuery(Iterable) #1777

Merged
merged 2 commits into from
Dec 7, 2017

Conversation

pvojtechovsky
Copy link
Collaborator

Possibility to create query on Collection of elements. No need to create helper array, just to convert collection to format acceptable by API.

@spoon-bot
Copy link
Collaborator

Detected changes by Revapi: 1.

Old API: fr.inria.gforge.spoon:spoon-core:jar:6.1.0-20171205.234706-32

New API: fr.inria.gforge.spoon:spoon-core:jar:6.1.0-SNAPSHOT

Name Change 1
Old none
New method Factory::createQuery(Iterable)
Code java.method.addedToInterface
Description Method was added to an interface.
Breaking binary: non_breaking

@@ -865,16 +872,16 @@ public void testEmptyQuery() throws Exception {

//contract: empty query returns no element
assertEquals(0, launcher.getFactory().createQuery().list().size());
assertEquals(0, launcher.getFactory().createQuery(null).list().size());
assertEquals(0, launcher.getFactory().createQuery((Object) null).list().size());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a cast to null is not elegant IMHO. One alternative solution would be to replace createQuery(null) by createQuery()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createQuery() is already used on the line 867, the purpose of this test is to check handling of null values. I guess that cast is OK for the test. Or optionally I can use new API and call createQuery(Arrays.asList(null)). WDYT?

@monperrus monperrus merged commit 7d74678 into INRIA:master Dec 7, 2017
@monperrus
Copy link
Collaborator

you're right. Thanks.

@pvojtechovsky pvojtechovsky deleted the feaCreateQueryByIterable branch September 1, 2018 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants