[ https://issues.apache.org/jira/browse/CASSANDRA-3796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Schuller updated CASSANDRA-3796: -------------------------------------- Attachment: CASSANDRA-3796-trunk-v1.txt Attaching patch. It would be great if someone from CASSANDRA-2392 could review and make sure I am not introducing a subtle bug by implementing the Comparator at the RowPosition level. > post-2392 trunk does not build with java 7 > ------------------------------------------ > > Key: CASSANDRA-3796 > URL: https://issues.apache.org/jira/browse/CASSANDRA-3796 > Project: Cassandra > Issue Type: Bug > Reporter: Peter Schuller > Assignee: Peter Schuller > Priority: Minor > Attachments: CASSANDRA-3796-trunk-v1.txt > > > See below, on a fresh clone. Builds w/ java 6. > {code} > [javac] > /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:419: > error: no suitable method found for > binarySearch(List<DecoratedKey>,RowPosition) > [javac] int index = > Collections.binarySearch(indexSummary.getKeys(), key); > [javac] ^ > [javac] method Collections.<T#1>binarySearch(List<? extends > T#1>,T#1,Comparator<? super T#1>) is not applicable > [javac] (cannot instantiate from arguments because actual and > formal argument lists differ in length) > [javac] method Collections.<T#2>binarySearch(List<? extends > Comparable<? super T#2>>,T#2) is not applicable > [javac] (no instance(s) of type variable(s) T#2 exist so that > argument type List<DecoratedKey> conforms to formal parameter type List<? > extends Comparable<? super T#2>>) > [javac] where T#1,T#2 are type-variables: > [javac] T#1 extends Object declared in method > <T#1>binarySearch(List<? extends T#1>,T#1,Comparator<? super T#1>) > [javac] T#2 extends Object declared in method > <T#2>binarySearch(List<? extends Comparable<? super T#2>>,T#2) > [javac] > /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:509: > error: no suitable method found for > binarySearch(List<DecoratedKey>,RowPosition) > [javac] int left = Collections.binarySearch(samples, > leftPosition); > [javac] ^ > [javac] method Collections.<T#1>binarySearch(List<? extends > T#1>,T#1,Comparator<? super T#1>) is not applicable > [javac] (cannot instantiate from arguments because actual and > formal argument lists differ in length) > [javac] method Collections.<T#2>binarySearch(List<? extends > Comparable<? super T#2>>,T#2) is not applicable > [javac] (no instance(s) of type variable(s) T#2 exist so that > argument type List<DecoratedKey> conforms to formal parameter type List<? > extends Comparable<? super T#2>>) > [javac] where T#1,T#2 are type-variables: > [javac] T#1 extends Object declared in method > <T#1>binarySearch(List<? extends T#1>,T#1,Comparator<? super T#1>) > [javac] T#2 extends Object declared in method > <T#2>binarySearch(List<? extends Comparable<? super T#2>>,T#2) > [javac] > /tmp/c2/cassandra/src/java/org/apache/cassandra/io/sstable/SSTableReader.java:521: > error: no suitable method found for > binarySearch(List<DecoratedKey>,RowPosition) > [javac] : Collections.binarySearch(samples, > rightPosition); > [javac] ^ > [javac] method Collections.<T#1>binarySearch(List<? extends > T#1>,T#1,Comparator<? super T#1>) is not applicable > [javac] (cannot instantiate from arguments because actual and > formal argument lists differ in length) > [javac] method Collections.<T#2>binarySearch(List<? extends > Comparable<? super T#2>>,T#2) is not applicable > [javac] (no instance(s) of type variable(s) T#2 exist so that > argument type List<DecoratedKey> conforms to formal parameter type List<? > extends Comparable<? super T#2>>) > [javac] where T#1,T#2 are type-variables: > [javac] T#1 extends Object declared in method > <T#1>binarySearch(List<? extends T#1>,T#1,Comparator<? super T#1>) > [javac] T#2 extends Object declared in method > <T#2>binarySearch(List<? extends Comparable<? super T#2>>,T#2) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira