SHA256
1
0
forked from pool/guava
Fridrich Strba 2022-05-17 07:08:07 +00:00 committed by Git OBS Bridge
parent aba1f26d46
commit 2d8838a4d2
5 changed files with 17 additions and 76 deletions

View File

@ -1,46 +0,0 @@
--- guava-30.1/guava/src/com/google/common/graph/Traverser.java 2021-05-10 16:45:16.248098756 +0200
+++ guava-30.1/guava/src/com/google/common/graph/Traverser.java 2021-05-10 16:53:38.627252038 +0200
@@ -60,9 +60,7 @@
* @since 23.1
*/
@Beta
-@DoNotMock(
- "Call forGraph or forTree, passing a lambda or a Graph with the desired edges (built with"
- + " GraphBuilder)")
+@DoNotMock("Call forGraph or forTree, passing a lambda or a Graph with the desired edges (built with GraphBuilder)")
public abstract class Traverser<N> {
private final SuccessorsFunction<N> successorFunction;
--- guava-30.1/guava/src/com/google/common/util/concurrent/ClosingFuture.java 2021-05-10 16:45:16.256098806 +0200
+++ guava-30.1/guava/src/com/google/common/util/concurrent/ClosingFuture.java 2021-05-10 16:55:44.184040192 +0200
@@ -32,6 +32,7 @@
import static com.google.common.util.concurrent.Futures.immediateFuture;
import static com.google.common.util.concurrent.Futures.nonCancellationPropagating;
import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
+import com.google.errorprone.annotations.DoNotMock;
import static java.util.logging.Level.FINER;
import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;
@@ -1202,8 +1203,7 @@
* }</pre>
*/
// TODO(cpovirk): Use simple name instead of fully qualified after we stop building with JDK 8.
- @com.google.errorprone.annotations.DoNotMock(
- "Use ClosingFuture.whenAllSucceed() or .whenAllComplete() instead.")
+ @DoNotMock("Use ClosingFuture.whenAllSucceed() or .whenAllComplete() instead.")
public static class Combiner {
private final CloseableList closeables = new CloseableList();
--- guava-30.1/guava/src/com/google/common/util/concurrent/ListeningExecutorService.java 2021-05-10 16:45:16.256098806 +0200
+++ guava-30.1/guava/src/com/google/common/util/concurrent/ListeningExecutorService.java 2021-05-10 16:53:54.207349829 +0200
@@ -32,9 +32,7 @@
* @author Chris Povirk
* @since 10.0
*/
-@DoNotMock(
- "Use TestingExecutors.sameThreadScheduledExecutor, or wrap a real Executor from "
- + "java.util.concurrent.Executors with MoreExecutors.listeningDecorator")
+@DoNotMock("Use TestingExecutors.sameThreadScheduledExecutor, or wrap a real Executor from java.util.concurrent.Executors with MoreExecutors.listeningDecorator")
@GwtIncompatible
public interface ListeningExecutorService extends ExecutorService {
/**

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f37f7e4a42abe107bb6916a8bcb172089fb47a70e0cf6b96a17f9a2f60270af
size 2900
oid sha256:b5e46f037b1dafe0e2fe72da1489ee3553b4a529f7e8d5c56932b672f72ec8e6
size 2872

View File

@ -17,7 +17,7 @@
Name: guava
Version: 30.1.1
Version: 31.1
Release: 0
Summary: Google Core Libraries for Java
License: Apache-2.0 AND CC0-1.0
@ -25,13 +25,18 @@ Group: Development/Libraries/Java
URL: https://github.com/google/guava
Source0: https://github.com/google/guava/archive/v%{version}.tar.gz
Source1: %{name}-build.tar.xz
Patch0: donotmock.patch
BuildRequires: ant
BuildRequires: checker-qual
BuildRequires: fdupes
BuildRequires: google-errorprone-annotations
BuildRequires: j2objc-annotations
BuildRequires: javapackages-local
BuildRequires: jsr-305
BuildRequires: junit
Requires: mvn(com.google.code.findbugs:jsr305)
Requires: mvn(com.google.errorprone:error_prone_annotations)
Requires: mvn(com.google.j2objc:j2objc-annotations)
Requires: mvn(org.checkerframework:checker-qual)
BuildArch: noarch
%description
@ -53,15 +58,17 @@ API documentation for %{name}.
Summary: The guava-testlib artifact
Group: Development/Libraries/Java
Requires: mvn(com.google.code.findbugs:jsr305)
Requires: mvn(com.google.guava:guava)
Requires: mvn(com.google.errorprone:error_prone_annotations)
Requires: mvn(com.google.guava:guava) = %{version}
Requires: mvn(com.google.j2objc:j2objc-annotations)
Requires: mvn(junit:junit)
Requires: mvn(org.checkerframework:checker-qual)
%description testlib
guava-testlib provides additional functionality for conveninent unit testing
%prep
%setup -q -a1
%patch0 -p1
find . -name '*.jar' -delete
@ -74,29 +81,9 @@ find . -name '*.jar' -delete
%pom_xpath_inject /pom:project/pom:build/pom:plugins/pom:plugin/pom:configuration/pom:instructions "<_nouses>true</_nouses>" guava/pom.xml
%pom_remove_dep -r :error_prone_annotations
%pom_remove_dep -r :j2objc-annotations
%pom_remove_dep -r org.checkerframework:
%pom_remove_dep -r :listenablefuture
%pom_remove_dep -r :failureaccess
annotations=$(
find -name '*.java' \
| xargs grep -F -h \
-e 'import com.google.j2objc.annotations' \
-e 'import com.google.errorprone.annotation' \
-e 'import org.codehaus.mojo.animal_sniffer' \
-e 'import org.checkerframework' \
| sort -u \
| sed 's/.*\.\([^.]*\);/\1/' \
| paste -sd\|
)
# guava started using quite a few annotation libraries for code quality, which
# we don't have. This ugly regex is supposed to remove their usage from the code
find -name '*.java' | xargs sed -ri \
"s/^import .*\.($annotations);//;s/@($annotations)"'\>\s*(\((("[^"]*")|([^)]*))\))?//g'
for mod in guava guava-testlib futures/failureaccess; do
%pom_remove_parent ${mod}
%pom_xpath_inject pom:project '
@ -108,7 +95,7 @@ done
%build
mkdir -p lib
build-jar-repository -s lib junit jsr-305
build-jar-repository -s lib junit jsr-305 google-errorprone/annotations checker-qual j2objc-annotations
%{ant} -Dtest.skip=true package javadoc
%install

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca7ee32dcb9ed26920910e38b673f267f56033df013aad5c1dba41bfbbda725e
size 5404546

3
v31.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d15ac3b3403642ba239311c842aeda02347621cd4fed5d6821d6487adf32558
size 5583483