From 217749801a48bee0cbf05780905d3078fead1aa6 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Jun 20 2014 07:34:14 +0000 Subject: Add patch for Java 8 --- diff --git a/guava-java8.patch b/guava-java8.patch new file mode 100644 index 0000000..9af882f --- /dev/null +++ b/guava-java8.patch @@ -0,0 +1,48 @@ +From e1cc5f8e84ab071654d31a55f11db207188c7567 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Fri, 20 Jun 2014 09:29:44 +0200 +Subject: [PATCH] Implement reflection methods required by Java 8 + +--- + guava/src/com/google/common/reflect/Types.java | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/guava/src/com/google/common/reflect/Types.java b/guava/src/com/google/common/reflect/Types.java +index 0f05f78..d5bd950 100644 +--- a/guava/src/com/google/common/reflect/Types.java ++++ b/guava/src/com/google/common/reflect/Types.java +@@ -29,6 +29,8 @@ import com.google.common.collect.ImmutableList; + import com.google.common.collect.Iterables; + + import java.io.Serializable; ++import java.lang.annotation.Annotation; ++import java.lang.reflect.AnnotatedType; + import java.lang.reflect.Array; + import java.lang.reflect.GenericArrayType; + import java.lang.reflect.GenericDeclaration; +@@ -368,6 +370,22 @@ final class Types { + return false; + } + } ++ ++ @Override public T getAnnotation(Class annotationClass) { ++ return null; ++ } ++ ++ @Override public Annotation[] getAnnotations() { ++ return new Annotation[0]; ++ } ++ ++ @Override public Annotation[] getDeclaredAnnotations() { ++ return new Annotation[0]; ++ } ++ ++ @Override public AnnotatedType[] getAnnotatedBounds() { ++ return new AnnotatedType[0]; ++ } + } + + static final class WildcardTypeImpl implements WildcardType, Serializable { +-- +1.9.3 + diff --git a/guava.spec b/guava.spec index fa2f284..0261154 100644 --- a/guava.spec +++ b/guava.spec @@ -7,6 +7,7 @@ URL: http://code.google.com/p/guava-libraries # git clone https://code.google.com/p/guava-libraries/ # (cd ./guava-libraries && git archive --format=tar --prefix=guava-%{version}/ v%{version}) | xz >guava-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz +Patch0: %{name}-java8.patch BuildRequires: java-devel >= 0:1.7.0 BuildRequires: maven-local @@ -33,6 +34,7 @@ API documentation for %{name}. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 find . -name '*.jar' -delete %pom_disable_module guava-gwt @@ -60,6 +62,9 @@ find . -name '*.jar' -delete %doc COPYING %changelog +* Fri Jun 20 2014 Mikolaj Izdebski - 17.0-1 +- Add patch for Java 8 + * Tue Jun 17 2014 Roland Grunberg - 15.0-4 - Do not generate uses directive for exports.