uncommitted - libjtype-java

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/.pc/.quilt_patches b/.pc/.quilt_patches
new file mode 100644
index 0000000..6857a8d
--- /dev/null
+++ b/.pc/.quilt_patches
@@ -0,0 +1 @@
+debian/patches
diff --git a/.pc/.quilt_series b/.pc/.quilt_series
new file mode 100644
index 0000000..c206706
--- /dev/null
+++ b/.pc/.quilt_series
@@ -0,0 +1 @@
+series
diff --git a/.pc/.version b/.pc/.version
new file mode 100644
index 0000000..0cfbf08
--- /dev/null
+++ b/.pc/.version
@@ -0,0 +1 @@
+2
diff --git a/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/DefaultTypeVariable.java b/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/DefaultTypeVariable.java
new file mode 100644
index 0000000..1f31bf2
--- /dev/null
+++ b/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/DefaultTypeVariable.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2009 IIZUKA Software Technologies Ltd
+ * 
+ * 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.googlecode.jtype;
+
+import static com.googlecode.jtype.Utils.checkNotNull;
+import static com.googlecode.jtype.Utils.checkTrue;
+
+import java.io.Serializable;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.Arrays;
+
+/**
+ * Default implementation of a type variable.
+ * 
+ * @author Mark Hobson
+ * @version $Id: DefaultTypeVariable.java 110 2011-11-23 17:19:43Z markhobson $
+ * @param <D>
+ *            the type of generic declaration that declared the type variable
+ * @see TypeVariable
+ */
+class DefaultTypeVariable<D extends GenericDeclaration> implements TypeVariable<D>, Serializable
+{
+	// constants --------------------------------------------------------------
+	
+	private static final Type[] DEFAULT_BOUNDS = new Type[] {Object.class};
+	
+	private static final long serialVersionUID = 1L;
+	
+	// fields -----------------------------------------------------------------
+	
+	/**
+	 * The generic declaration that declared this type variable.
+	 * 
+	 * @serial
+	 */
+	private final D declaration;
+	
+	/**
+	 * The name of this type variable, as it occurs in the source code.
+	 * 
+	 * @serial
+	 */
+	private final String name;
+	
+	/**
+	 * The upper bound(s) of this type variable.
+	 * 
+	 * @serial
+	 */
+	private final Type[] bounds;
+	
+	// constructors -----------------------------------------------------------
+	
+	public DefaultTypeVariable(D declaration, String name, Type[] bounds)
+	{
+		if (bounds == null || bounds.length == 0)
+		{
+			bounds = DEFAULT_BOUNDS;
+		}
+		
+		// initial bound must be either a class type, an interface type or a type variable
+		
+		checkTrue(isValidFirstBound(bounds[0]), "First bound must be either a class type, an interface type or a type "
+			+ "variable", bounds[0]);
+		
+		// subsequent bounds must be an interface type
+		
+		for (int i = 1; i < bounds.length; i++)
+		{
+			checkTrue(isValidSecondaryBound(bounds[i]), "Secondary bounds must be an interface type: ", bounds[i]);
+		}
+		
+		// TODO: the erasures of all constituent types of a bound must be pairwise different
+		
+		// TODO: type variable may not be a subtype of two interface types which are different parameterizations of the
+		// same generic interface
+		
+		this.declaration = checkNotNull(declaration, "declaration");
+		this.name = checkNotNull(name, "name");
+		this.bounds = bounds.clone();
+	}
+	
+	// TypeVariable methods ---------------------------------------------------
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public D getGenericDeclaration()
+	{
+		return declaration;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public String getName()
+	{
+		return name;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	public Type[] getBounds()
+	{
+		return bounds.clone();
+	}
+	
+	// Object methods ---------------------------------------------------------
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public int hashCode()
+	{
+		int hashCode = declaration.hashCode();
+		hashCode = (hashCode * 37) + name.hashCode();
+		hashCode = (hashCode * 37) + Arrays.hashCode(bounds);
+		
+		return hashCode;
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public boolean equals(Object object)
+	{
+		if (!(object instanceof TypeVariable<?>))
+		{
+			return false;
+		}
+		
+		TypeVariable<?> typeVariable = (TypeVariable<?>) object;
+		
+		return declaration.equals(typeVariable.getGenericDeclaration())
+			&& name.equals(typeVariable.getName())
+			&& Arrays.equals(bounds, typeVariable.getBounds());
+	}
+	
+	/**
+	 * {@inheritDoc}
+	 */
+	@Override
+	public String toString()
+	{
+		return TypeUtils.toString(this);
+	}
+	
+	// private methods --------------------------------------------------------
+	
+	private static boolean isValidFirstBound(Type bound)
+	{
+		return (bound instanceof Class<?> && !((Class<?>) bound).isArray())
+			|| (bound instanceof ParameterizedType)
+			|| (bound instanceof TypeVariable<?>);
+	}
+	
+	private static boolean isValidSecondaryBound(Type bound)
+	{
+		if (bound instanceof Class<?>)
+		{
+			return ((Class<?>) bound).isInterface();
+		}
+		
+		if (bound instanceof ParameterizedType)
+		{
+			Type rawType = ((ParameterizedType) bound).getRawType();
+			
+			return (rawType instanceof Class<?>) && ((Class<?>) rawType).isInterface();
+		}
+		
+		return false;
+	}
+}
diff --git a/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/Types.java b/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/Types.java
new file mode 100644
index 0000000..2c718cc
--- /dev/null
+++ b/.pc/01-compile-on-java8-proxy.patch/src/main/java/com/googlecode/jtype/Types.java
@@ -0,0 +1,350 @@
+/*
+ * Copyright 2009 IIZUKA Software Technologies Ltd
+ * 
+ * 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.googlecode.jtype;
+
+import static com.googlecode.jtype.Utils.checkNotNull;
+
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.MalformedParameterizedTypeException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.lang.reflect.WildcardType;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Factory for creating types.
+ * 
+ * @author Mark Hobson
+ * @version $Id: Types.java 110 2011-11-23 17:19:43Z markhobson $
+ * @see Type
+ */
+public final class Types
+{
+	// constants --------------------------------------------------------------
+	
+	private static final WildcardType UNBOUNDED_WILDCARD_TYPE = wildcardType(null, null);
+	
+	private static final Pattern ARRAY_PATTERN = Pattern.compile("\\[\\s*\\]$");
+
+	private static final Pattern UPPER_BOUND_PATTERN = Pattern.compile("^\\?\\s+extends\\s+");
+	
+	private static final Pattern LOWER_BOUND_PATTERN = Pattern.compile("^\\?\\s+super\\s+");
+	
+	// constructors -----------------------------------------------------------
+	
+	private Types()
+	{
+		throw new AssertionError();
+	}
+	
+	// public methods ---------------------------------------------------------
+	
+	/**
+	 * Creates a type variable for the specified declaration, name and bounds.
+	 * 
+	 * @param <D>
+	 *            the type of generic declaration that declared the type variable
+	 * @param declaration
+	 *            the generic declaration that declared the type variable
+	 * @param name
+	 *            the name of the type variable
+	 * @param bounds
+	 *            the upper bounds of the type variable
+	 * @return the type variable
+	 */
+	public static <D extends GenericDeclaration> TypeVariable<D> typeVariable(D declaration, String name,
+		Type... bounds)
+	{
+		return new DefaultTypeVariable<D>(declaration, name, bounds);
+	}
+	
+	/**
+	 * Creates a generic array type for the specified component type.
+	 * 
+	 * @param componentType
+	 *            the component type
+	 * @return the generic array type
+	 */
+	public static GenericArrayType genericArrayType(Type componentType)
+	{
+		return new DefaultGenericArrayType(componentType);
+	}
+	
+	/**
+	 * Creates a parameterized type for the specified raw type and actual type arguments.
+	 * 
+	 * @param rawType
+	 *            the raw type
+	 * @param actualTypeArguments
+	 *            the actual type arguments
+	 * @return the parameterized type
+	 * @throws MalformedParameterizedTypeException
+	 *             if the raw type is not a parameterized type or the number of actual type arguments differs from those
+	 *             defined on the raw type
+	 */
+	public static ParameterizedType parameterizedType(Class<?> rawType, Type... actualTypeArguments)
+	{
+		return new DefaultParameterizedType(null, rawType, actualTypeArguments);
+	}
+	
+	/**
+	 * Creates a parameterized type for the specified raw type with unbounded wildcard actual type arguments.
+	 * 
+	 * @param rawType
+	 *            the raw type
+	 * @return the parameterized type
+	 * @throws MalformedParameterizedTypeException
+	 *             if the raw type is not a parameterized type
+	 */
+	public static ParameterizedType unboundedParameterizedType(Class<?> rawType)
+	{
+		checkNotNull(rawType, "rawType");
+		
+		int typeParameterCount = rawType.getTypeParameters().length;
+		
+		Type[] actualTypeArguments = new Type[typeParameterCount];
+		Arrays.fill(actualTypeArguments, unboundedWildcardType());
+		
+		return parameterizedType(rawType, actualTypeArguments);
+	}
+
+	/**
+	 * Creates an unbounded wildcard type.
+	 * 
+	 * @return the wildcard type
+	 */
+	public static WildcardType unboundedWildcardType()
+	{
+		return UNBOUNDED_WILDCARD_TYPE;
+	}
+	
+	/**
+	 * Creates a wildcard type with the specified upper bound.
+	 * 
+	 * @param upperBound
+	 *            the upper bound type
+	 * @return the wildcard type
+	 */
+	public static WildcardType upperBoundedWildcardType(Type upperBound)
+	{
+		checkNotNull(upperBound, "upperBound");
+		
+		return wildcardType(new Type[] {upperBound}, null);
+	}
+	
+	/**
+	 * Creates a wildcard type with the specified lower bound.
+	 * 
+	 * @param lowerBound
+	 *            the lower bound type
+	 * @return the wildcard type
+	 */
+	public static WildcardType lowerBoundedWildcardType(Type lowerBound)
+	{
+		checkNotNull(lowerBound, "lowerBound");
+		
+		return wildcardType(null, new Type[] {lowerBound});
+	}
+	
+	/**
+	 * Returns a type that corresponds to the specified string.
+	 * 
+	 * @param typeName
+	 *            the string to be parsed
+	 * @return the type
+	 */
+	public static Type valueOf(String typeName)
+	{
+		return valueOf(typeName, (Set<String>) null);
+	}
+	
+	/**
+	 * Returns a type that corresponds to the specified string using the specified import context.
+	 * 
+	 * @param typeName
+	 *            the string to be parsed
+	 * @param imports
+	 *            the fully qualified class names to use when an unqualified class name is encountered
+	 * @return the type
+	 * @throws IllegalArgumentException
+	 *             if the import context contains duplicate entries for an unqualified class name
+	 */
+	public static Type valueOf(String typeName, Set<String> imports)
+	{
+		checkNotNull(typeName, "typeName");
+		
+		Map<String, String> importMap = createImportMap(imports);
+		
+		return valueOf(typeName, importMap);
+	}
+	
+	// private methods --------------------------------------------------------
+	
+	private static WildcardType wildcardType(Type[] upperBounds, Type[] lowerBounds)
+	{
+		return new DefaultWildcardType(upperBounds, lowerBounds);
+	}
+	
+	private static Map<String, String> createImportMap(Set<String> imports)
+	{
+		if (imports == null)
+		{
+			return Collections.emptyMap();
+		}
+		
+		Map<String, String> importMap = new HashMap<String, String>();
+		
+		for (String className : imports)
+		{
+			String simpleClassName = ClassUtils.getSimpleClassName(className);
+			
+			if (importMap.containsKey(simpleClassName))
+			{
+				throw new IllegalArgumentException("Duplicate imports: " + importMap.get(simpleClassName) + " and "
+					+ className);
+			}
+			
+			importMap.put(simpleClassName, className);
+		}
+		
+		return importMap;
+	}
+	
+	private static Type valueOf(String typeName, Map<String, String> imports)
+	{
+		typeName = typeName.trim();
+		
+		// handle arrays
+		
+		Matcher arrayMatcher = ARRAY_PATTERN.matcher(typeName);
+		
+		if (arrayMatcher.find())
+		{
+			String componentName = typeName.substring(0, arrayMatcher.start());
+			
+			Type componentType = valueOf(componentName, imports);
+			
+			return TypeUtils.getArrayType(componentType);
+		}
+		
+		// handle wildcards
+		
+		if (typeName.startsWith("?"))
+		{
+			return parseWildcardType(typeName, imports);
+		}
+		
+		// handle classes
+		
+		int argStart = typeName.indexOf('<');
+		
+		if (argStart == -1)
+		{
+			return parseClass(typeName, imports);
+		}
+		
+		// handle parameterized types
+		
+		int argEnd = typeName.lastIndexOf('>');
+		
+		if (argEnd == -1)
+		{
+			throw new IllegalArgumentException("Mismatched type argument delimiters: " + typeName);
+		}
+		
+		String rawTypeName = typeName.substring(0, argStart).trim();
+		Class<?> rawType = parseClass(rawTypeName, imports);
+		
+		String[] actualTypeArgumentNames = typeName.substring(argStart + 1, argEnd).split(",");
+		Type[] actualTypeArguments = new Type[actualTypeArgumentNames.length];
+		
+		for (int i = 0; i < actualTypeArgumentNames.length; i++)
+		{
+			actualTypeArguments[i] = valueOf(actualTypeArgumentNames[i], imports);
+		}
+		
+		return parameterizedType(rawType, actualTypeArguments);
+	}
+	
+	private static Class<?> parseClass(String className, Map<String, String> imports)
+	{
+		Class<?> klass = ClassUtils.valueOf(className);
+		
+		if (klass != null)
+		{
+			return klass;
+		}
+		
+		if (!className.contains(".") && imports.containsKey(className))
+		{
+			String qualifiedClassName = imports.get(className);
+			
+			klass = ClassUtils.valueOf(qualifiedClassName);
+			
+			if (klass != null)
+			{
+				return klass;
+			}
+		}
+		
+		throw new IllegalArgumentException("Class not found: " + className);
+	}
+	
+	private static WildcardType parseWildcardType(String typeName, Map<String, String> imports)
+	{
+		Type[] upperBounds;
+		Type[] lowerBounds;
+		
+		Matcher upperBoundMatcher;
+		Matcher lowerBoundMatcher;
+		
+		if ("?".equals(typeName))
+		{
+			upperBounds = null;
+			lowerBounds = null;
+		}
+		else if ((upperBoundMatcher = UPPER_BOUND_PATTERN.matcher(typeName)).find())
+		{
+			String upperBoundName = typeName.substring(upperBoundMatcher.end());
+			Type upperBound = valueOf(upperBoundName, imports);
+			
+			upperBounds = new Type[] {upperBound};
+			lowerBounds = null;
+		}
+		else if ((lowerBoundMatcher = LOWER_BOUND_PATTERN.matcher(typeName)).find())
+		{
+			String lowerBoundName = typeName.substring(lowerBoundMatcher.end());
+			Type lowerBound = valueOf(lowerBoundName, imports);
+			
+			upperBounds = null;
+			lowerBounds = new Type[] {lowerBound};
+		}
+		else
+		{
+			throw new IllegalArgumentException("Invalid wildcard type: " + typeName);
+		}
+		
+		return wildcardType(upperBounds, lowerBounds);
+	}
+}
diff --git a/.pc/01-compile-on-java8-proxy.patch/src/test/java/com/googlecode/jtype/DefaultTypeVariableTest.java b/.pc/01-compile-on-java8-proxy.patch/src/test/java/com/googlecode/jtype/DefaultTypeVariableTest.java
new file mode 100644
index 0000000..253ba2f
--- /dev/null
+++ b/.pc/01-compile-on-java8-proxy.patch/src/test/java/com/googlecode/jtype/DefaultTypeVariableTest.java
@@ -0,0 +1,308 @@
+/*
+ * Copyright 2009 IIZUKA Software Technologies Ltd
+ * 
+ * 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.googlecode.jtype;
+
+import static com.googlecode.jtype.test.SerializableAssert.assertSerializable;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.GenericDeclaration;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests {@code DefaultTypeVariable}.
+ * 
+ * @author Mark Hobson
+ * @version $Id: DefaultTypeVariableTest.java 115 2011-11-25 18:17:40Z markhobson@gmail.com $
+ * @see DefaultTypeVariable
+ */
+public class DefaultTypeVariableTest
+{
+	// fields -----------------------------------------------------------------
+	
+	private Constructor<?> constructor;
+	
+	// public methods ---------------------------------------------------------
+	
+	@Before
+	public void setUp() throws NoSuchMethodException
+	{
+		constructor = getClass().getConstructor();
+	}
+	
+	// tests ------------------------------------------------------------------
+	
+	@Test(expected = NullPointerException.class)
+	public void constructorWithNullDeclaration()
+	{
+		try
+		{
+			new DefaultTypeVariable<Constructor<?>>(null, "T", new Type[] {Number.class});
+		}
+		catch (NullPointerException exception)
+		{
+			assertEquals("declaration cannot be null", exception.getMessage());
+			
+			throw exception;
+		}
+	}
+	
+	@Test(expected = NullPointerException.class)
+	public void constructorWithNullName()
+	{
+		try
+		{
+			new DefaultTypeVariable<Constructor<?>>(constructor, null, new Type[] {Number.class});
+		}
+		catch (NullPointerException exception)
+		{
+			assertEquals("name cannot be null", exception.getMessage());
+			
+			throw exception;
+		}
+	}
+	
+	@Test
+	public void constructorWithClassFirstBound()
+	{
+		assertConstructor(constructor, "T", Number.class);
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithArrayClassFirstBound()
+	{
+		assertConstructor(constructor, "T", Number[].class);
+	}
+	
+	@Test
+	public void constructorWithInterfaceFirstBound()
+	{
+		assertConstructor(constructor, "T", Serializable.class);
+	}
+	
+	@Test
+	public void constructorWithTypeVariableFirstBound()
+	{
+		assertConstructor(constructor, "T", Types.typeVariable(constructor, "U"));
+	}
+	
+	@Test
+	public void constructorWithInterfaceParameterizedTypeFirstBound()
+	{
+		assertConstructor(constructor, "T", Types.parameterizedType(List.class, Number.class));
+	}
+	
+	@Test
+	public void constructorWithClassParameterizedTypeFirstBound()
+	{
+		assertConstructor(constructor, "T", Types.parameterizedType(ArrayList.class, Number.class));
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithWildcardTypeFirstBound()
+	{
+		assertConstructor(constructor, "T", Types.unboundedWildcardType());
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithClassSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Number.class);
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithArrayClassSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Number[].class);
+	}
+	
+	@Test
+	public void constructorWithInterfaceSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Serializable.class);
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithTypeVariableSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Types.typeVariable(constructor, "U"));
+	}
+	
+	@Test
+	public void constructorWithInterfaceParameterizedTypeSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Types.parameterizedType(List.class, Number.class));
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithClassParameterizedTypeSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Types.parameterizedType(ArrayList.class, Number.class));
+	}
+	
+	@Test(expected = IllegalArgumentException.class)
+	public void constructorWithWildcardTypeSecondBound()
+	{
+		assertConstructor(constructor, "T", Object.class, Types.unboundedWildcardType());
+	}
+	
+	@Test
+	public void constructorWithNullBounds()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", null);
+		
+		assertEquals(constructor, typeVariable.getGenericDeclaration());
+		assertEquals("T", typeVariable.getName());
+		assertArrayEquals(new Type[] {Object.class}, typeVariable.getBounds());
+	}
+	
+	@Test
+	public void constructorWithEmptyBounds()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[0]);
+		
+		assertEquals(constructor, typeVariable.getGenericDeclaration());
+		assertEquals("T", typeVariable.getName());
+		assertArrayEquals(new Type[] {Object.class}, typeVariable.getBounds());
+	}
+	
+	@Test
+	public void hashCodeTest()
+	{
+		TypeVariable<Constructor<?>> typeVariable1 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		TypeVariable<Constructor<?>> typeVariable2 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		assertEquals(typeVariable1.hashCode(), typeVariable2.hashCode());
+	}
+	
+	@Test
+	public void equalsWhenEqual()
+	{
+		TypeVariable<Constructor<?>> typeVariable1 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		TypeVariable<Constructor<?>> typeVariable2 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		assertEquals(typeVariable1, typeVariable2);
+	}
+	
+	@Test
+	public void equalsWithDifferentClass()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", null);
+		
+		assertFalse(typeVariable.equals(new Object()));
+	}
+	
+	@Test
+	public void equalsWithDifferentDeclarations() throws NoSuchMethodException
+	{
+		TypeVariable<Constructor<?>> typeVariable1 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class});
+		
+		Method method = getClass().getDeclaredMethod("equalsWithDifferentDeclarations");
+		
+		TypeVariable<Method> typeVariable2 = new DefaultTypeVariable<Method>(method, "T", new Type[] {Number.class});
+		
+		assertFalse(typeVariable1.equals(typeVariable2));
+	}
+	
+	@Test
+	public void equalsWithDifferentNames()
+	{
+		TypeVariable<Constructor<?>> typeVariable1 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class});
+		
+		TypeVariable<Constructor<?>> typeVariable2 = new DefaultTypeVariable<Constructor<?>>(constructor, "U",
+			new Type[] {Number.class});
+		
+		assertFalse(typeVariable1.equals(typeVariable2));
+	}
+	
+	@Test
+	public void equalsWithDifferentBounds()
+	{
+		TypeVariable<Constructor<?>> typeVariable1 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class});
+		
+		TypeVariable<Constructor<?>> typeVariable2 = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Integer.class});
+		
+		assertFalse(typeVariable1.equals(typeVariable2));
+	}
+	
+	@Test
+	public void toStringWithNoBounds()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T", null);
+		
+		assertEquals("T", typeVariable.toString());
+	}
+	
+	@Test
+	public void toStringWithSingleBound()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class});
+		
+		assertEquals("T extends java.lang.Number", typeVariable.toString());
+	}
+	
+	@Test
+	public void toStringWithMultipleBounds()
+	{
+		TypeVariable<Constructor<?>> typeVariable = new DefaultTypeVariable<Constructor<?>>(constructor, "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		assertEquals("T extends java.lang.Number & java.lang.Comparable", typeVariable.toString());
+	}
+	
+	@Test
+	public void serializable() throws IOException, ClassNotFoundException
+	{
+		TypeVariable<Class<?>> type = new DefaultTypeVariable<Class<?>>(getClass(), "T",
+			new Type[] {Number.class, Comparable.class});
+		
+		assertSerializable(type);
+	}
+
+	// private methods --------------------------------------------------------
+	
+	private static <D extends GenericDeclaration> void assertConstructor(D declaration, String name, Type... bounds)
+	{
+		TypeVariable<D> typeVariable = new DefaultTypeVariable<D>(declaration, name, bounds);
+		
+		assertEquals("Generic declaration", declaration, typeVariable.getGenericDeclaration());
+		assertEquals("Name", name, typeVariable.getName());
+		assertArrayEquals("Bounds", bounds, typeVariable.getBounds());
+	}
+}
diff --git a/.pc/applied-patches b/.pc/applied-patches
new file mode 100644
index 0000000..e278ea6
--- /dev/null
+++ b/.pc/applied-patches
@@ -0,0 +1 @@
+01-compile-on-java8-proxy.patch
diff --git a/debian/changelog b/debian/changelog
index 6e1df0e..66a3fa6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libjtype-java (0.1.3-4.1) unstable; urgency=medium
+
+  * Non maintainer upload by the Reproducible Builds team.
+  * No source change upload to rebuild on buildd with .buildinfo files.
+
+ -- Holger Levsen <holger@debian.org>  Tue, 29 Dec 2020 03:45:27 +0100
+
 libjtype-java (0.1.3-4) unstable; urgency=medium
 
   * Team upload.

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

Run locally

More details

Full run details