LUCENE-7346: Update forbiddenapis to version 2.2

This commit is contained in:
Uwe Schindler 2016-06-19 21:27:34 +02:00
parent 0aec9dd248
commit 0179b3fb2d
10 changed files with 18 additions and 15 deletions

View File

@ -44,7 +44,7 @@
<specification.version>@spec.version@</specification.version>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<java.compat.version>8</java.compat.version>
<!-- HACK: the enforce and forbiddenapis plugin does not like new versioning: -->
<!-- HACK: the enforce plugin does not like new versioning: -->
<java.legacy-compat.version>1.${java.compat.version}</java.legacy-compat.version>
<jetty.version>9.3.8.v20160314</jetty.version>
@ -161,7 +161,7 @@
<plugin>
<groupId>de.thetaphi</groupId>
<artifactId>forbiddenapis</artifactId>
<version>2.1</version>
<version>2.2</version>
<configuration>
<!--
This is the default setting, we don't support too new Java versions.

View File

@ -124,8 +124,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
<bundledSignature>jdk-non-portable</bundledSignature>
<bundledSignature>jdk-reflection</bundledSignature>
<!--TODO: fix this <bundledSignature>commons-io-unsafe-@commons-io:commons-io.version@</bundledSignature>-->
<bundledSignature>commons-io-unsafe-2.4</bundledSignature>
<bundledSignature>commons-io-unsafe-@commons-io:commons-io.version@</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>
@ -147,8 +146,7 @@
<bundledSignature>jdk-deprecated</bundledSignature>
<bundledSignature>jdk-non-portable</bundledSignature>
<bundledSignature>jdk-reflection</bundledSignature>
<!--TODO: fix this <bundledSignature>commons-io-unsafe-@commons-io:commons-io.version@</bundledSignature>-->
<bundledSignature>commons-io-unsafe-2.4</bundledSignature>
<bundledSignature>commons-io-unsafe-@commons-io:commons-io.version@</bundledSignature>
</bundledSignatures>
<signaturesFiles>
<signaturesFile>${top-level}/lucene/tools/forbiddenApis/base.txt</signaturesFile>

View File

@ -66,6 +66,9 @@ Other
* LUCENE-7334: Update ASM dependency to 5.1. (Uwe Schindler)
* LUCENE-7346: Update forbiddenapis to version 2.2.
(Uwe Schindler)
======================= Lucene 6.1.0 =======================
New Features

View File

@ -2330,7 +2330,7 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
<property name="forbidden-sysout-excludes" value=""/>
<target name="-install-forbidden-apis" unless="forbidden-apis.loaded" depends="ivy-availability-check,ivy-configure">
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="2.1"
<ivy:cachepath organisation="de.thetaphi" module="forbiddenapis" revision="2.2"
inline="true" conf="default" transitive="true" pathid="forbidden-apis.classpath"/>
<taskdef name="forbidden-apis" classname="de.thetaphi.forbiddenapis.ant.AntTask" classpathref="forbidden-apis.classpath"/>
<property name="forbidden-apis.loaded" value="true"/>

View File

@ -504,8 +504,7 @@
<!-- Forbidden API Task, customizations for Solr -->
<target name="-check-forbidden-all" depends="-init-forbidden-apis,compile-core,compile-test">
<!--<property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/>--> <!-- for commons-io version -->
<!-- HACK: --><property name="ivyversions./commons-io/commons-io" value="2.4"/>
<property prefix="ivyversions" file="${common.dir}/ivy-versions.properties"/><!-- for commons-io version -->
<forbidden-apis suppressAnnotation="**.SuppressForbidden" classpathref="forbidden-apis.allclasses.classpath" targetVersion="${javac.release}">
<signatures>
<bundled name="jdk-unsafe"/>

View File

@ -135,7 +135,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
FileUtils.copyDirectory(configDir, tmpConfigDir);
if (oldProps != null) {
FileUtils.write(new File(tmpConfigDir, ConfigSetProperties.DEFAULT_FILENAME),
getConfigSetProps(oldProps));
getConfigSetProps(oldProps), StandardCharsets.UTF_8);
}
solrCluster.uploadConfigDir(tmpConfigDir, baseConfigSetName);
}
@ -242,7 +242,7 @@ public class TestConfigSetsAPI extends SolrTestCaseJ4 {
// Ensure ConfigSet is immutable
FileUtils.copyDirectory(configDir, tmpConfigDir);
FileUtils.write(new File(tmpConfigDir, "configsetprops.json"),
getConfigSetProps(ImmutableMap.<String, String>of("immutable", "true")));
getConfigSetProps(ImmutableMap.<String, String>of("immutable", "true")), StandardCharsets.UTF_8);
solrCluster.uploadConfigDir(tmpConfigDir, "configSet");
// no ConfigSet name

View File

@ -134,7 +134,7 @@ public class TestConfigSetsAPIZkFailure extends SolrTestCaseJ4 {
FileUtils.copyDirectory(configDir, tmpConfigDir);
if (oldProps != null) {
FileUtils.write(new File(tmpConfigDir, ConfigSetProperties.DEFAULT_FILENAME),
getConfigSetProps(oldProps));
getConfigSetProps(oldProps), StandardCharsets.UTF_8);
}
solrCluster.uploadConfigDir(tmpConfigDir, baseConfigSetName);
}

View File

@ -18,6 +18,7 @@ package org.apache.solr.cloud;
import javax.security.auth.login.Configuration;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ -113,7 +114,7 @@ public class TestMiniSolrCloudClusterKerberos extends TestMiniSolrCloudCluster {
javax.security.auth.login.Configuration.setConfiguration(conf);
String jaasFilePath = kdcDir+File.separator + "jaas-client.conf";
FileUtils.write(new File(jaasFilePath), jaas);
FileUtils.write(new File(jaasFilePath), jaas, StandardCharsets.UTF_8);
System.setProperty("java.security.auth.login.config", jaasFilePath);
System.setProperty("solr.kerberos.cookie.domain", "127.0.0.1");
System.setProperty("solr.kerberos.principal", principal);

View File

@ -17,6 +17,7 @@
package org.apache.solr.cloud;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
@ -127,7 +128,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {
Configuration.setConfiguration(conf);
String jaasFilePath = kdcDir+File.separator+"jaas-client.conf";
FileUtils.write(new File(jaasFilePath), jaas);
FileUtils.write(new File(jaasFilePath), jaas, StandardCharsets.UTF_8);
System.setProperty("java.security.auth.login.config", jaasFilePath);
System.setProperty("solr.kerberos.jaas.appname", "SolrClient"); // Get this app name from the jaas file
System.setProperty("solr.kerberos.cookie.domain", "127.0.0.1");

View File

@ -18,6 +18,7 @@ package org.apache.solr.core;
import java.io.File;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import org.apache.commons.io.FileUtils;
@ -46,7 +47,7 @@ public class TestConfigSetImmutable extends RestTestBase {
File tmpConfDir = new File(tmpSolrHome, confDir);
FileUtils.copyDirectory(new File(TEST_HOME()), tmpSolrHome.getAbsoluteFile());
// make the ConfigSet immutable
FileUtils.write(new File(tmpConfDir, "configsetprops.json"), new StringBuilder("{\"immutable\":\"true\"}"));
FileUtils.write(new File(tmpConfDir, "configsetprops.json"), new StringBuilder("{\"immutable\":\"true\"}"), StandardCharsets.UTF_8);
System.setProperty("managed.schema.mutable", "true");