risdenk commented on code in PR #953:
URL: https://github.com/apache/solr/pull/953#discussion_r999567154
##########
solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java:
##########
@@ -425,22 +424,22 @@ public void testBasicSelect() throws Exception {
tuples = getTuples(sParams, baseUrl);
- assert (tuples.size() == 3);
+ assertEquals(3, tuples.size());
tuple = tuples.get(0);
- assert (tuple.getLong("myId") == 3);
- assert (tuple.getLong("myInt") == 20);
- assert (tuple.get("myString").equals("a"));
+ assertEquals(3, (long) tuple.getLong("myId"));
Review Comment:
I looked at this again this morning - I don't know why auto boxing/unboxing
isn't doing the right thing to compare `Long` with `long`. The explicit cast
just makes the compiler happy. I think it is because `assertEquals` is checking
two `Object`s in this case and doesn't seem to know to simplify to two `long`
comparisons without the `(long)` cast. :(
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]