cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 29 Jun 2020 00:31:50 +0000 (02:31 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 29 Jun 2020 00:31:50 +0000 (02:31 +0200)
eu.etaxonomy.taxeditor.test/src/test/java/eu/etaxonomy/taxeditor/session/CdmEntitySessionAwareTest.java

index cc6eea7..b59a027 100644 (file)
@@ -61,6 +61,7 @@ import eu.etaxonomy.taxeditor.httpinvoker.TestThread;
 @DataSet
 public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
 
+    @SuppressWarnings("unused")
     private static final Logger logger = Logger.getLogger(CdmEntitySessionAwareTest.class);
 
     UUID polytomousKeyUuid = UUID.fromString("0d53ba20-7de4-4baa-bd8a-401048447d66");
@@ -349,16 +350,11 @@ public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
             Assert.fail();
         }
 
-
-
-
         // retrieving subkey shows its null
         subKey = CdmBase.deproxy(polytomousKeyService.find(subKeyUuid),PolytomousKey.class);
         Assert.assertNull(subKey);
 
         pKey = CdmBase.deproxy(polytomousKeyService.find(polytomousKeyUuid),PolytomousKey.class);
-
-
     }
 
 
@@ -434,7 +430,7 @@ public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
 
         try {
                List<Feature> features = termService.list(Feature.class, 100, 0, null, null);
-               List<UUID> updateTerms = new ArrayList<UUID>();
+               List<UUID> updateTerms = new ArrayList<>();
                for (Feature feature:features){
                        if (feature.getLabel().equals("UpdateTest")){
                                updateTerms.add(feature.getUuid());
@@ -518,8 +514,8 @@ public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
     }
 
     @Test
-    public void testThreadLocalActiveSession() throws InterruptedException {
-        MockSessionOwner<CdmBase> so1 = new MockSessionOwner<CdmBase>();
+    public void testThreadLocalActiveSession() {
+        MockSessionOwner<CdmBase> so1 = new MockSessionOwner<>();
         final ICdmEntitySession activeSession = getCdmEntitySessionManager().newSession(so1, true);
         TestThread thread = new TestThread(true) {
             @Override
@@ -529,7 +525,7 @@ public class CdmEntitySessionAwareTest extends RemotingSessionAwareTest {
             }
         };
         invokeThread(thread);
-        MockSessionOwner<CdmBase> so2 = new MockSessionOwner<CdmBase>();
+        MockSessionOwner<CdmBase> so2 = new MockSessionOwner<>();
         ICdmEntitySession newActiveSession = getCdmEntitySessionManager().newSession(so2, true);
         Assert.assertFalse(activeSession.equals(newActiveSession));
         thread.unblock();