From edd69cf613fa731ef84c7057d9b89a8bf6cd5d48 Mon Sep 17 00:00:00 2001
From: Oleksandr Porunov <alexandr.porunov@gmail.com>
Date: Fri, 6 Mar 2020 14:26:07 -0800
Subject: [PATCH] Fix: Downgrade reflections to 0.9.11 (fixes #60)

---
 CHANGELOG.md                                  |  4 +++
 CONTRIBUTORS.md                               |  1 +
 pom.xml                                       |  2 +-
 .../syncleus/ferma/ReflectionCacheTest.java   | 25 +++++++++++++------
 4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7389f50e..5deb0f47 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## 3.3.2
 
+* Updated the following dependencies
+  * org.reflections:reflections 0.9.12 -> 0.9.11
+
+
 ## 3.3.1
 
 * Updated the following dependencies
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 9bfe7cca..48cb5e81 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -11,6 +11,7 @@
 * Evan Thompson
 * Joshua Shinavier <josh@fortytwo.net>
 * Veselin Yordanov <vesko935@gmail.com>
+* Oleksandr Porunov <alexandr.porunov@gmail.com>
 
 ## Special Thanks
 
diff --git a/pom.xml b/pom.xml
index fe2ab9a8..fc791604 100644
--- a/pom.xml
+++ b/pom.xml
@@ -182,7 +182,7 @@
         <dependency>
             <groupId>org.reflections</groupId>
             <artifactId>reflections</artifactId>
-            <version>0.9.12</version>
+            <version>0.9.11</version>
         </dependency>
     </dependencies>
 
diff --git a/src/test/java/com/syncleus/ferma/ReflectionCacheTest.java b/src/test/java/com/syncleus/ferma/ReflectionCacheTest.java
index 60538e5a..5835e4f8 100644
--- a/src/test/java/com/syncleus/ferma/ReflectionCacheTest.java
+++ b/src/test/java/com/syncleus/ferma/ReflectionCacheTest.java
@@ -15,15 +15,15 @@
  */
 package com.syncleus.ferma;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
 import org.junit.Assert;
 import org.junit.Test;
 
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.util.*;
+
 /**
  *
  * @author rqpa
@@ -64,8 +64,19 @@ public class ReflectionCacheTest {
     public void testBadConstructorCall() {
         createCache(null);
     }
-    
+
+    @Test
+    public void testTypesAnnotatedWithUnusedAnnotation() {
+        new ReflectionCache(Collections.emptySet()).getTypesAnnotatedWith(UnusedTestAnnotation.class);
+    }
+
     private ReflectionCache createCache(Collection<? extends Class<?>> annotatedTypes) {
         return new ReflectionCache(annotatedTypes);
     }
+
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.TYPE)
+    public @interface UnusedTestAnnotation {
+
+    }
 }
-- 
GitLab