-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Set `-source 8 -target 8`. We already have a depencdency on `guava-android`, which began requiring Java 8 a while back, so we might as well unlock the ability to use Java 8 language features ourselves. (I also found I had to set `-source 8` in `maven-javadoc-plugin` to prevent it from trying to pass a `--module-path`, which leads to problems with our usages of `@NullableDecl`, which isn't in a module. That's probably unrelated: We probably just haven't run Javadoc since some `maven-javadoc-plugin` upgrade.) Work toward #240, and fixes #229 - Don't refer to Java 9+ `ByteBuffer` methods, and set up Error Prone enforcement of future such mistakes. Compare google/guava#6334. Fixes #113 RELNOTES=Officially dropped support for Java 7, and restored accidentally dropped support for Java 8. PiperOrigin-RevId: 536468340
- Loading branch information
Showing
4 changed files
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
jimfs/src/main/java/com/google/common/jimfs/Java8Compatibility.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright 2020 Google Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License | ||
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
* or implied. See the License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package com.google.common.jimfs; | ||
|
||
import java.nio.Buffer; | ||
|
||
/** | ||
* Wrappers around {@link Buffer} methods that are covariantly overridden in Java 9+. See | ||
* https://github.com/google/guava/issues/3990 | ||
*/ | ||
final class Java8Compatibility { | ||
static void clear(Buffer b) { | ||
b.clear(); | ||
} | ||
|
||
private Java8Compatibility() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters