Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set -source 8 -target 8 in the open-source build, and remove Java8Usage. #5444

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 0 additions & 36 deletions android/guava/pom.xml
Expand Up @@ -90,42 +90,6 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<!--
The execution named default-compile happens first, regardless
of the order of the executions in the source file. So, because
Java8Usage is a dependency of the main sources, we need to call
its compilation "default-compile," even though it's the special
case.
-->
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<includes>
<include>**/Java8Usage.java</include>
</includes>
<!-- -source 8 -target 8 is a no-op in the mainline but matters in the backport. -->
<source>8</source>
<target>8</target>
</configuration>
</execution>
<execution>
<id>main-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>**/Java8Usage.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
Expand Down
45 changes: 0 additions & 45 deletions android/guava/src/com/google/common/base/Java8Usage.java

This file was deleted.

19 changes: 0 additions & 19 deletions android/guava/src/com/google/common/base/Preconditions.java
Expand Up @@ -15,11 +15,9 @@
package com.google.common.base;

import static com.google.common.base.Strings.lenientFormat;
import static java.util.logging.Level.WARNING;

import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.logging.Logger;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;

Expand Down Expand Up @@ -1490,21 +1488,4 @@ private static String badPositionIndexes(int start, int end, int size) {
// end < start
return lenientFormat("end index (%s) must not be less than start index (%s)", end, start);
}

static {
try {
Java8Usage.performCheck();
} catch (Throwable underlying) {
Exception toLog =
new Exception(
"Guava will drop support for Java 7 in 2021. Please let us know if this will cause"
+ " you problems: https://github.com/google/guava/issues/5269",
underlying);
Logger.getLogger(Preconditions.class.getName())
.log(
WARNING,
"Java 7 compatibility warning: See https://github.com/google/guava/issues/5269",
toLog);
}
}
}
4 changes: 2 additions & 2 deletions android/pom.xml
Expand Up @@ -132,8 +132,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<compilerArgs>
<!--
Make includes/excludes fully work:
Expand Down
36 changes: 0 additions & 36 deletions guava/pom.xml
Expand Up @@ -90,42 +90,6 @@
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<!--
The execution named default-compile happens first, regardless
of the order of the executions in the source file. So, because
Java8Usage is a dependency of the main sources, we need to call
its compilation "default-compile," even though it's the special
case.
-->
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<includes>
<include>**/Java8Usage.java</include>
</includes>
<!-- -source 8 -target 8 is a no-op in the mainline but matters in the backport. -->
<source>8</source>
<target>8</target>
</configuration>
</execution>
<execution>
<id>main-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>**/Java8Usage.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
Expand Down
45 changes: 0 additions & 45 deletions guava/src/com/google/common/base/Java8Usage.java

This file was deleted.

19 changes: 0 additions & 19 deletions guava/src/com/google/common/base/Preconditions.java
Expand Up @@ -15,11 +15,9 @@
package com.google.common.base;

import static com.google.common.base.Strings.lenientFormat;
import static java.util.logging.Level.WARNING;

import com.google.common.annotations.GwtCompatible;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.logging.Logger;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;

Expand Down Expand Up @@ -1433,21 +1431,4 @@ private static String badPositionIndexes(int start, int end, int size) {
// end < start
return lenientFormat("end index (%s) must not be less than start index (%s)", end, start);
}

static {
try {
Java8Usage.performCheck();
} catch (Throwable underlying) {
Exception toLog =
new Exception(
"Guava will drop support for Java 7 in 2021. Please let us know if this will cause"
+ " you problems: https://github.com/google/guava/issues/5269",
underlying);
Logger.getLogger(Preconditions.class.getName())
.log(
WARNING,
"Java 7 compatibility warning: See https://github.com/google/guava/issues/5269",
toLog);
}
}
}