[guava-libraries] 02/07: Refreshed the patches
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Fri Dec 18 00:32:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository guava-libraries.
commit e824543e87b7691a363e145845ba2b2a202e3a62
Author: Emmanuel Bourg <ebourg at apache.org>
Date: Fri Dec 18 00:22:45 2015 +0100
Refreshed the patches
---
debian/changelog | 5 +-
debian/patches/01-maven2-compatibility.patch | 4 +-
debian/patches/02-remove-source-in-javadoc.patch | 2 +-
debian/patches/03-openjdk-inference.patch | 8 +-
debian/patches/04-source-encoding.patch | 2 +-
.../05-preserve-mapmaker-makecomputingmap.patch | 8 +-
.../patches/06-preserve-pre-guava18-methods.patch | 22 ++--
debian/patches/07-java8-compatibility.patch | 146 ---------------------
debian/patches/08-preserve-enums-methods.patch | 2 +-
debian/patches/09-preserve-stopwatch-methods.patch | 22 ++--
.../patches/11-preserve-charset-less-methods.patch | 32 ++---
debian/patches/series | 1 -
12 files changed, 52 insertions(+), 202 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index e4c0095..2f8f67e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
-guava-libraries (18.0-5) UNRELEASED; urgency=medium
+guava-libraries (19.0-1) UNRELEASED; urgency=medium
+ * New upstream release
+ - Refreshed the patches
+ - Removed 07-java8-compatibility.patch (fixed upstream)
* Build with the DH sequencer instead of CDBS
* Updated the URL of the homepage
* Watch and download the releases from GitHub
diff --git a/debian/patches/01-maven2-compatibility.patch b/debian/patches/01-maven2-compatibility.patch
index d7680da..1313c61 100644
--- a/debian/patches/01-maven2-compatibility.patch
+++ b/debian/patches/01-maven2-compatibility.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/pom.xml
+++ b/pom.xml
-@@ -34,7 +34,7 @@
+@@ -35,7 +35,7 @@
</license>
</licenses>
<prerequisites>
@@ -11,4 +11,4 @@ Forwarded: not-needed
+ <maven>2.2.1</maven>
</prerequisites>
<scm>
- <connection>scm:git:https://code.google.com/p/guava-libraries/</connection>
+ <connection>scm:git:https://github.com/google/guava.git</connection>
diff --git a/debian/patches/02-remove-source-in-javadoc.patch b/debian/patches/02-remove-source-in-javadoc.patch
index 601e0e1..93248c6 100644
--- a/debian/patches/02-remove-source-in-javadoc.patch
+++ b/debian/patches/02-remove-source-in-javadoc.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/guava/pom.xml
+++ b/guava/pom.xml
-@@ -89,7 +89,7 @@
+@@ -105,7 +105,7 @@
<charset>UTF-8</charset>
<additionalparam>-XDignore.symbol.file</additionalparam>
<excludePackageNames>com.google.common.base.internal</excludePackageNames>
diff --git a/debian/patches/03-openjdk-inference.patch b/debian/patches/03-openjdk-inference.patch
index 4f19d8d..342c142 100644
--- a/debian/patches/03-openjdk-inference.patch
+++ b/debian/patches/03-openjdk-inference.patch
@@ -5,14 +5,12 @@ Bug: http://code.google.com/p/guava-libraries/issues/detail?id=635
--- a/guava/src/com/google/common/collect/Maps.java
+++ b/guava/src/com/google/common/collect/Maps.java
-@@ -317,8 +317,8 @@
+@@ -323,7 +323,7 @@
* @param comparator the comparator to sort the keys with
* @return a new, empty {@code TreeMap}
*/
-- public static <C, K extends C, V> TreeMap<K, V> newTreeMap(
-- @Nullable Comparator<C> comparator) {
-+ public static <K, V> TreeMap<K, V> newTreeMap(
-+ @Nullable Comparator<? super K> comparator) {
+- public static <C, K extends C, V> TreeMap<K, V> newTreeMap(@Nullable Comparator<C> comparator) {
++ public static <K, V> TreeMap<K, V> newTreeMap(@Nullable Comparator<? super K> comparator) {
// Ideally, the extra type parameter "C" shouldn't be necessary. It is a
// work-around of a compiler type inference quirk that prevents the
// following code from being compiled:
diff --git a/debian/patches/04-source-encoding.patch b/debian/patches/04-source-encoding.patch
index 0334b25..3b0ca35 100644
--- a/debian/patches/04-source-encoding.patch
+++ b/debian/patches/04-source-encoding.patch
@@ -5,7 +5,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: no
--- a/pom.xml
+++ b/pom.xml
-@@ -103,6 +103,7 @@
+@@ -108,6 +108,7 @@
<configuration>
<source>1.6</source>
<target>1.6</target>
diff --git a/debian/patches/05-preserve-mapmaker-makecomputingmap.patch b/debian/patches/05-preserve-mapmaker-makecomputingmap.patch
index e27e3c0..746afb0 100644
--- a/debian/patches/05-preserve-mapmaker-makecomputingmap.patch
+++ b/debian/patches/05-preserve-mapmaker-makecomputingmap.patch
@@ -10,12 +10,12 @@ Bug-Stapler: https://github.com/stapler/stapler/pull/27
Bug-Jython: http://bugs.jython.org/issue2087
--- a/guava/src/com/google/common/collect/MapMaker.java
+++ b/guava/src/com/google/common/collect/MapMaker.java
-@@ -580,7 +580,7 @@
+@@ -588,7 +588,7 @@
*/
@Deprecated
@Override
-- <K, V> ConcurrentMap<K, V> makeComputingMap(
-+ public <K, V> ConcurrentMap<K, V> makeComputingMap(
- Function<? super K, ? extends V> computingFunction) {
+- <K, V> ConcurrentMap<K, V> makeComputingMap(Function<? super K, ? extends V> computingFunction) {
++ public <K, V> ConcurrentMap<K, V> makeComputingMap(Function<? super K, ? extends V> computingFunction) {
return (nullRemovalCause == null)
? new MapMaker.ComputingMapAdapter<K, V>(this, computingFunction)
+ : new NullComputingConcurrentMap<K, V>(this, computingFunction);
diff --git a/debian/patches/06-preserve-pre-guava18-methods.patch b/debian/patches/06-preserve-pre-guava18-methods.patch
index 12079ec..d27aa66 100644
--- a/debian/patches/06-preserve-pre-guava18-methods.patch
+++ b/debian/patches/06-preserve-pre-guava18-methods.patch
@@ -5,7 +5,7 @@ Author: Emmanuel Bourg <ebourg at pache.org>
Forwarded: not-needed
--- a/guava/src/com/google/common/io/Files.java
+++ b/guava/src/com/google/common/io/Files.java
-@@ -231,6 +231,54 @@
+@@ -241,6 +241,54 @@
return asByteSink(file, modes).asCharSink(charset);
}
@@ -60,7 +60,7 @@ Forwarded: not-needed
private static FileWriteMode[] modes(boolean append) {
return append
? new FileWriteMode[]{ FileWriteMode.APPEND }
-@@ -238,6 +286,60 @@
+@@ -248,6 +296,60 @@
}
/**
@@ -132,7 +132,7 @@ Forwarded: not-needed
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-@@ -52,6 +54,38 @@
+@@ -92,6 +94,38 @@
private ByteStreams() {}
/**
@@ -171,7 +171,7 @@ Forwarded: not-needed
* Copies all bytes from the input stream to the output stream.
* Does not close or flush either stream.
*
-@@ -738,4 +772,141 @@
+@@ -827,4 +861,141 @@
}
return total;
}
@@ -439,7 +439,7 @@ Forwarded: not-needed
* Reads all of the lines from a {@link Readable} object. The lines do
* not include line-termination characters, but do include other
* leading and trailing whitespace.
-@@ -286,4 +386,76 @@
+@@ -281,4 +381,76 @@
}
};
}
@@ -518,16 +518,16 @@ Forwarded: not-needed
}
--- a/guava/src/com/google/common/io/ByteSource.java
+++ b/guava/src/com/google/common/io/ByteSource.java
-@@ -56,7 +56,7 @@
+@@ -59,7 +59,7 @@
* @since 14.0
* @author Colin Decker
*/
-public abstract class ByteSource {
+public abstract class ByteSource implements InputSupplier<InputStream> {
- private static final int BUF_SIZE = 0x1000; // 4K
-
-@@ -84,6 +84,21 @@
+ /**
+ * Constructor for use by subclasses.
+@@ -85,6 +85,21 @@
public abstract InputStream openStream() throws IOException;
/**
@@ -617,7 +617,7 @@ Forwarded: not-needed
* to {@link #openStream()} when the stream returned by that method does not benefit from
--- a/guava/src/com/google/common/io/CharSource.java
+++ b/guava/src/com/google/common/io/CharSource.java
-@@ -62,7 +62,7 @@
+@@ -63,7 +63,7 @@
* @since 14.0
* @author Colin Decker
*/
@@ -626,7 +626,7 @@ Forwarded: not-needed
/**
* Constructor for use by subclasses.
-@@ -80,6 +80,21 @@
+@@ -81,6 +81,21 @@
public abstract Reader openStream() throws IOException;
/**
diff --git a/debian/patches/07-java8-compatibility.patch b/debian/patches/07-java8-compatibility.patch
deleted file mode 100644
index f72aeee..0000000
--- a/debian/patches/07-java8-compatibility.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-Description: Fixes a compatibility problem introduced by Java 8
-Origin: backport, https://github.com/google/guava/commit/f4aa25e
-Bug: https://github.com/google/guava/issues/1738
-Bug-Debian: https://bugs.debian.org/751544
---- a/guava/src/com/google/common/reflect/Types.java
-+++ b/guava/src/com/google/common/reflect/Types.java
-@@ -26,6 +26,7 @@
- import com.google.common.base.Objects;
- import com.google.common.base.Predicates;
- import com.google.common.collect.ImmutableList;
-+import com.google.common.collect.ImmutableMap;
- import com.google.common.collect.Iterables;
-
- import java.io.Serializable;
-@@ -33,9 +34,11 @@
- import java.lang.reflect.Array;
- import java.lang.reflect.GenericArrayType;
- import java.lang.reflect.GenericDeclaration;
-+import java.lang.reflect.InvocationHandler;
- import java.lang.reflect.InvocationTargetException;
- import java.lang.reflect.Method;
- import java.lang.reflect.ParameterizedType;
-+import java.lang.reflect.Proxy;
- import java.lang.reflect.Type;
- import java.lang.reflect.TypeVariable;
- import java.lang.reflect.WildcardType;
-@@ -149,7 +152,7 @@
- */
- static <D extends GenericDeclaration> TypeVariable<D> newArtificialTypeVariable(
- D declaration, String name, Type... bounds) {
-- return new TypeVariableImpl<D>(
-+ return newTypeVariableImpl(
- declaration,
- name,
- (bounds.length == 0)
-@@ -317,8 +320,70 @@
- private static final long serialVersionUID = 0;
- }
-
-- private static final class TypeVariableImpl<D extends GenericDeclaration>
-- implements TypeVariable<D> {
-+ private static <D extends GenericDeclaration> TypeVariable<D> newTypeVariableImpl(
-+ D genericDeclaration, String name, Type[] bounds) {
-+ TypeVariableImpl<D> typeVariableImpl =
-+ new TypeVariableImpl<D>(genericDeclaration, name, bounds);
-+ @SuppressWarnings("unchecked")
-+ TypeVariable<D> typeVariable = Reflection.newProxy(
-+ TypeVariable.class, new TypeVariableInvocationHandler(typeVariableImpl));
-+ return typeVariable;
-+ }
-+
-+ /**
-+ * Invocation handler to work around a compatibility problem between Java 7 and Java 8.
-+ *
-+ * <p>Java 8 introduced a new method {@code getAnnotatedBounds()} in the {@link TypeVariable}
-+ * interface, whose return type {@code AnnotatedType[]} is also new in Java 8. That means that we
-+ * cannot implement that interface in source code in a way that will compile on both Java 7 and
-+ * Java 8. If we include the {@code getAnnotatedBounds()} method then its return type means
-+ * it won't compile on Java 7, while if we don't include the method then the compiler will
-+ * complain that an abstract method is unimplemented. So instead we use a dynamic proxy to
-+ * get an implementation. If the method being called on the {@code TypeVariable} instance has
-+ * the same name as one of the public methods of {@link TypeVariableImpl}, the proxy calls
-+ * the same method on its instance of {@code TypeVariableImpl}. Otherwise it throws {@link
-+ * UnsupportedOperationException}; this should only apply to {@code getAnnotatedBounds()}. This
-+ * does mean that users on Java 8 who obtain an instance of {@code TypeVariable} from {@link
-+ * TypeResolver#resolveType} will not be able to call {@code getAnnotatedBounds()} on it, but that
-+ * should hopefully be rare.
-+ *
-+ * <p>This workaround should be removed at a distant future time when we no longer support Java
-+ * versions earlier than 8.
-+ */
-+ private static final class TypeVariableInvocationHandler implements InvocationHandler {
-+ private static final ImmutableMap<String, Method> typeVariableMethods;
-+ static {
-+ ImmutableMap.Builder<String, Method> builder = ImmutableMap.builder();
-+ for (Method method : TypeVariableImpl.class.getMethods()) {
-+ if (method.getDeclaringClass().equals(TypeVariableImpl.class)) {
-+ builder.put(method.getName(), method);
-+ }
-+ }
-+ typeVariableMethods = builder.build();
-+ }
-+
-+ private final TypeVariableImpl<?> typeVariableImpl;
-+
-+ TypeVariableInvocationHandler(TypeVariableImpl<?> typeVariableImpl) {
-+ this.typeVariableImpl = typeVariableImpl;
-+ }
-+
-+ @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
-+ String methodName = method.getName();
-+ Method typeVariableMethod = typeVariableMethods.get(methodName);
-+ if (typeVariableMethod == null) {
-+ throw new UnsupportedOperationException(methodName);
-+ } else {
-+ try {
-+ return typeVariableMethod.invoke(typeVariableImpl, args);
-+ } catch (InvocationTargetException e) {
-+ throw e.getCause();
-+ }
-+ }
-+ }
-+ }
-+
-+ private static final class TypeVariableImpl<D extends GenericDeclaration> {
-
- private final D genericDeclaration;
- private final String name;
-@@ -331,15 +396,19 @@
- this.bounds = ImmutableList.copyOf(bounds);
- }
-
-- @Override public Type[] getBounds() {
-+ public Type[] getBounds() {
- return toArray(bounds);
- }
-
-- @Override public D getGenericDeclaration() {
-+ public D getGenericDeclaration() {
- return genericDeclaration;
- }
-
-- @Override public String getName() {
-+ public String getName() {
-+ return name;
-+ }
-+
-+ public String getTypeName() {
- return name;
- }
-
-@@ -354,8 +423,12 @@
- @Override public boolean equals(Object obj) {
- if (NativeTypeVariableEquals.NATIVE_TYPE_VARIABLE_ONLY) {
- // equal only to our TypeVariable implementation with identical bounds
-- if (obj instanceof TypeVariableImpl) {
-- TypeVariableImpl<?> that = (TypeVariableImpl<?>) obj;
-+ if (obj != null
-+ && Proxy.isProxyClass(obj.getClass())
-+ && Proxy.getInvocationHandler(obj) instanceof TypeVariableInvocationHandler) {
-+ TypeVariableInvocationHandler typeVariableInvocationHandler =
-+ (TypeVariableInvocationHandler) Proxy.getInvocationHandler(obj);
-+ TypeVariableImpl<?> that = typeVariableInvocationHandler.typeVariableImpl;
- return name.equals(that.getName())
- && genericDeclaration.equals(that.getGenericDeclaration())
- && bounds.equals(that.bounds);
diff --git a/debian/patches/08-preserve-enums-methods.patch b/debian/patches/08-preserve-enums-methods.patch
index 1c896ba..faa9153 100644
--- a/debian/patches/08-preserve-enums-methods.patch
+++ b/debian/patches/08-preserve-enums-methods.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/guava/src/com/google/common/base/Enums.java
+++ b/guava/src/com/google/common/base/Enums.java
-@@ -62,6 +62,62 @@
+@@ -64,6 +64,62 @@
}
}
diff --git a/debian/patches/09-preserve-stopwatch-methods.patch b/debian/patches/09-preserve-stopwatch-methods.patch
index e1c757e..421e4e9 100644
--- a/debian/patches/09-preserve-stopwatch-methods.patch
+++ b/debian/patches/09-preserve-stopwatch-methods.patch
@@ -3,7 +3,7 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/guava/src/com/google/common/base/Stopwatch.java
+++ b/guava/src/com/google/common/base/Stopwatch.java
-@@ -79,6 +79,8 @@
+@@ -80,6 +80,8 @@
private long elapsedNanos;
private long startTick;
@@ -12,25 +12,21 @@ Forwarded: not-needed
/**
* Creates (but does not start) a new stopwatch using {@link System#nanoTime}
* as its time source.
-@@ -126,7 +128,7 @@
- * @deprecated Use {@link Stopwatch#createUnstarted()} instead.
- */
- @Deprecated
+@@ -124,11 +126,11 @@
+ return new Stopwatch(ticker).start();
+ }
+
- Stopwatch() {
+ public Stopwatch() {
- this(Ticker.systemTicker());
+ this.ticker = Ticker.systemTicker();
}
-@@ -137,7 +139,7 @@
- * @deprecated Use {@link Stopwatch#createUnstarted(Ticker)} instead.
- */
- @Deprecated
- Stopwatch(Ticker ticker) {
+ public Stopwatch(Ticker ticker) {
this.ticker = checkNotNull(ticker, "ticker");
}
-@@ -209,6 +211,35 @@
+@@ -202,6 +204,35 @@
}
/**
@@ -66,8 +62,8 @@ Forwarded: not-needed
* Returns a string representation of the current elapsed time.
*/
@GwtIncompatible("String.format()")
-@@ -222,6 +253,28 @@
- return String.format("%.4g %s", value, abbreviate(unit));
+@@ -216,6 +247,28 @@
+ return String.format(Locale.ROOT, "%.4g %s", value, abbreviate(unit));
}
+ /**
diff --git a/debian/patches/11-preserve-charset-less-methods.patch b/debian/patches/11-preserve-charset-less-methods.patch
index c020f5b..8b4a864 100644
--- a/debian/patches/11-preserve-charset-less-methods.patch
+++ b/debian/patches/11-preserve-charset-less-methods.patch
@@ -6,8 +6,8 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/guava/src/com/google/common/hash/Hasher.java
+++ b/guava/src/com/google/common/hash/Hasher.java
-@@ -83,6 +83,16 @@
- @Override Hasher putUnencodedChars(CharSequence charSequence);
+@@ -102,6 +102,16 @@
+ Hasher putUnencodedChars(CharSequence charSequence);
/**
+ * Equivalent to processing each {@code char} value in the {@code CharSequence}, in order.
@@ -22,7 +22,7 @@ Forwarded: not-needed
+ /**
* Equivalent to {@code putBytes(charSequence.toString().getBytes(charset))}.
*/
- @Override Hasher putString(CharSequence charSequence, Charset charset);
+ @Override
--- a/guava/src/com/google/common/hash/PrimitiveSink.java
+++ b/guava/src/com/google/common/hash/PrimitiveSink.java
@@ -91,6 +91,15 @@
@@ -43,7 +43,7 @@ Forwarded: not-needed
* @since 15.0 (since 11.0 as putString(CharSequence))
--- a/guava/src/com/google/common/hash/AbstractHasher.java
+++ b/guava/src/com/google/common/hash/AbstractHasher.java
-@@ -36,6 +36,14 @@
+@@ -39,6 +39,14 @@
return putInt(Float.floatToRawIntBits(f));
}
@@ -55,12 +55,12 @@ Forwarded: not-needed
+ return putUnencodedChars(charSequence);
+ }
+
- @Override public Hasher putUnencodedChars(CharSequence charSequence) {
+ @Override
+ public Hasher putUnencodedChars(CharSequence charSequence) {
for (int i = 0, len = charSequence.length(); i < len; i++) {
- putChar(charSequence.charAt(i));
--- a/guava/src/com/google/common/hash/Funnels.java
+++ b/guava/src/com/google/common/hash/Funnels.java
-@@ -63,6 +63,17 @@
+@@ -66,6 +66,17 @@
return UnencodedCharsFunnel.INSTANCE;
}
@@ -101,7 +101,7 @@ Forwarded: not-needed
* longhand equivalent, but should not perform worse.
--- a/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
+++ b/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
-@@ -45,6 +45,14 @@
+@@ -46,6 +46,14 @@
return newHasher().putObject(instance, funnel).hash();
}
@@ -113,12 +113,12 @@ Forwarded: not-needed
+ return hashUnencodedChars(input);
+ }
+
- @Override public HashCode hashUnencodedChars(CharSequence input) {
+ @Override
+ public HashCode hashUnencodedChars(CharSequence input) {
int len = input.length();
- Hasher hasher = newHasher(len * 2);
--- a/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
+++ b/guava/src/com/google/common/hash/AbstractStreamingHashFunction.java
-@@ -37,6 +37,14 @@
+@@ -38,6 +38,14 @@
return newHasher().putObject(instance, funnel).hash();
}
@@ -130,12 +130,12 @@ Forwarded: not-needed
+ return hashUnencodedChars(input);
+ }
+
- @Override public HashCode hashUnencodedChars(CharSequence input) {
+ @Override
+ public HashCode hashUnencodedChars(CharSequence input) {
return newHasher().putUnencodedChars(input).hash();
- }
--- a/guava/src/com/google/common/hash/AbstractCompositeHashFunction.java
+++ b/guava/src/com/google/common/hash/AbstractCompositeHashFunction.java
-@@ -122,6 +122,14 @@
+@@ -132,6 +132,14 @@
return this;
}
@@ -147,6 +147,6 @@ Forwarded: not-needed
+ return putUnencodedChars(chars);
+ }
+
- @Override public Hasher putUnencodedChars(CharSequence chars) {
+ @Override
+ public Hasher putUnencodedChars(CharSequence chars) {
for (Hasher hasher : hashers) {
- hasher.putUnencodedChars(chars);
diff --git a/debian/patches/series b/debian/patches/series
index 8cae32f..2a64caf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,7 +4,6 @@
04-source-encoding.patch
05-preserve-mapmaker-makecomputingmap.patch
06-preserve-pre-guava18-methods.patch
-07-java8-compatibility.patch
08-preserve-enums-methods.patch
09-preserve-stopwatch-methods.patch
10-preserve-ranges-class.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/guava-libraries.git
More information about the pkg-java-commits
mailing list