You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael Dodsworth (JIRA)" <ji...@apache.org> on 2014/08/30 20:18:53 UTC

[jira] [Updated] (SOLR-6455) Ambiguous reference to Base64 in ClientUtils causes the Java 8 build to fail

     [ https://issues.apache.org/jira/browse/SOLR-6455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Dodsworth updated SOLR-6455:
------------------------------------

    Attachment: SOLR-6455.patch

Using fully-qualified class name to disambiguate. The alternative would be to avoid the wildcard import (or include an import for the solr version of Base64) but seems likely an (auto-)import reorganise done by someone using java 7 would break it again. 

> Ambiguous reference to Base64 in ClientUtils causes the Java 8 build to fail
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-6455
>                 URL: https://issues.apache.org/jira/browse/SOLR-6455
>             Project: Solr
>          Issue Type: Bug
>         Environment: Oracle JDK 1.8.0_20-b26
> Mac OSX 10.9.4
>            Reporter: Michael Dodsworth
>            Priority: Blocker
>         Attachments: SOLR-6455.patch
>
>
> Compilation fails with:
> {code}
> common.compile-core:
>     [mkdir] Created dir: /Users/mdodsworth/dev/lucene-solr/solr/build/solr-solrj/classes/java
>     [javac] Compiling 122 source files to /Users/mdodsworth/dev/lucene-solr/solr/build/solr-solrj/classes/java
>     [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
>     [javac] /Users/mdodsworth/dev/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java:116: error: reference to Base64 is ambiguous
>     [javac]           v = Base64.byteArrayToBase64(bytes, 0,bytes.length);
>     [javac]               ^
>     [javac]   both class org.apache.solr.common.util.Base64 in org.apache.solr.common.util and class java.util.Base64 in java.util match
>     [javac] /Users/mdodsworth/dev/lucene-solr/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java:119: error: reference to Base64 is ambiguous
>     [javac]           v = Base64.byteArrayToBase64(bytes.array(), bytes.position(),bytes.limit() - bytes.position());
>     [javac]               ^
>     [javac]   both class org.apache.solr.common.util.Base64 in org.apache.solr.common.util and class java.util.Base64 in java.util match
>     [javac] Note: Some input files use unchecked or unsafe operations.
>     [javac] Note: Recompile with -Xlint:unchecked for details.
>     [javac] 2 errors
>     [javac] 1 warning
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org