[ACE-3691] solr and solr4 do not compile in Java 8 Created: 16-Dec-14  Updated: 03-Mar-16  Resolved: 17-Dec-14

Status: Closed
Project: Alfresco One Platform
Component/s: Search and Indexing (non-UI)
Affects Version/s: 5.1
Fix Version/s: Community Edition 201508 EA, 5.1

Type: Bug Priority: Blocker
Reporter: Samuel Langlois [X] (Inactive) Assignee: Closed Issues
Resolution: Fixed Votes: 0
Labels: JDK8
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Requires
is required by ACE-3693 Need to have support for Java 8 Closed
Build Location: https://bamboo.alfresco.com/bamboo/browse/ALF-ENT0-389/log
Build Number: 389

 Description   

When switching to JDK8, one gets the following compilation error (see ALF-ENT0-383):

solr:

[ERROR] /xml-data/build-dir/ALF-ENT0-JOB1/projects/solr/source/java/org/alfresco/solr/AlfrescoSolrEventListener.java:[572,36] reference to sort is ambiguous
[ERROR] both method sort(java.util.Comparator<? super E>) in java.util.List and method <T>sort(java.util.Comparator<T>) in org.alfresco.solr.ResizeableArrayList match
[ERROR] /xml-data/build-dir/ALF-ENT0-JOB1/projects/solr/source/java/org/alfresco/solr/AlfrescoSolrEventListener.java:[659,38] reference to sort is ambiguous
[ERROR] both method sort(java.util.Comparator<? super E>) in java.util.List and method <T>sort(java.util.Comparator<T>) in org.alfresco.solr.ResizeableArrayList match
[ERROR] /xml-data/build-dir/ALF-ENT0-JOB1/projects/solr/source/java/org/alfresco/solr/ResizeableArrayList.java:[164,21] name clash: <T>sort(java.util.Comparator<T>) in org.alfresco.solr.ResizeableArrayList and sort(java.util.Comparator<? super E>) in java.util.List have the same erasure, yet neither overrides the other

solr4:

[ERROR] /xml-data/build-dir/ALF-ENT0-JOB1/projects/solr4/source/java/org/alfresco/solr/ResizeableArrayList.java:[164,21] name clash: <T>sort(java.util.Comparator<T>) in org.alfresco.solr.ResizeableArrayList and sort(java.util.Comparator<? super E>) in java.util.List have the same erasure, yet neither overrides the other


 Comments   
Comment by Samuel Langlois [X] (Inactive) [ 16-Dec-14 ]

Committed fix in r92441 on HEAD-BUG-FIX - courtesy of Neil McErlean [X]!

Comment by Samuel Langlois [X] (Inactive) [ 17-Dec-14 ]

The compilation is OK now.
Still 66 failures to fix, of course...

Generated at Tue Dec 10 17:32:15 GMT 2019 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.