This is an automated email from the ASF dual-hosted git repository.
pottlinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tamaya.git
The following commit(s) were added to refs/heads/master by this push:
new 759a530 LHF: Fix Eclipse warnings
759a530 is described below
commit 759a5301044e0a72044ca73dc86d22b7d846930a
Author: Hugo Hirsch <[email protected]>
AuthorDate: Fri Jun 28 21:53:00 2019 +0200
LHF: Fix Eclipse warnings
---
code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
b/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
index 7145ad6..4907574 100644
--- a/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
+++ b/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
@@ -114,22 +114,22 @@ public class TypeLiteralTest {
//Create a class hierarchy where B is a subclass of Object and not
// ParameterizedType, but still takes parameters.
class A<T> { };
- class B extends A { };
+ class B<T> extends A<T> { };
TypeLiteral<List<String>> checker = new TypeLiteral<List<String>>() {
};
checker.getDefinedType(B.class);
}
@Test
public void testHashAndEquals(){
- TypeLiteral a = TypeLiteral.of(List.class);
- TypeLiteral b = TypeLiteral.of(List.class);
- TypeLiteral c = TypeLiteral.of(Map.class);
+ TypeLiteral<List<?>> a = TypeLiteral.of(List.class);
+ TypeLiteral<List<?>> b = TypeLiteral.of(List.class);
+ TypeLiteral<Map<?,?>> c = TypeLiteral.of(Map.class);
assertThat(b.hashCode()).isEqualTo(a.hashCode());
assertThat(a.hashCode()).isNotEqualTo(c.hashCode());
assertThat(a.equals(a)).isTrue();
assertThat(a.equals(b)).isTrue();
assertThat(a.equals(null)).isFalse();
- assertThat(a.equals("SomeString")).isFalse();
+ assertThat("SomeString".equals(a)).isFalse();
assertThat(a.equals(c)).isFalse();
}