Removed warnings

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@114685 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2015-10-19 14:07:16 +00:00
parent 98969f47cf
commit 6742e89e1a
5 changed files with 35 additions and 27 deletions

View File

@@ -18,21 +18,24 @@
*/
package org.alfresco.module.org_alfresco_module_rm.referredmetadata;
import static java.util.Collections.emptyMap;
import static java.util.Arrays.asList;
import static org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.ReferentNodeNotFound;
import static org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.MetadataReferralNotFound;
import static java.util.Collections.emptyMap;
import static org.alfresco.module.org_alfresco_module_rm.test.util.ExceptionUtils.expectedException;
import static org.alfresco.module.org_alfresco_module_rm.test.util.FPUtils.asSet;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.any;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.MetadataReferralNotFound;
import org.alfresco.module.org_alfresco_module_rm.referredmetadata.ReferredMetadataException.ReferentNodeNotFound;
import org.alfresco.service.cmr.dictionary.ClassDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
@@ -47,10 +50,6 @@ import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* Unit tests for {@link ReferredMetadataServiceImpl}.
*
@@ -96,6 +95,7 @@ public class ReferredMetadataServiceImplUnitTest
this.setAspects(asSet(referredAspect1, referredAspect2));
}};
@SuppressWarnings("serial")
@Before public void setUp()
{
MockitoAnnotations.initMocks(this);

View File

@@ -18,7 +18,6 @@
*/
package org.alfresco.module.org_alfresco_module_rm.script.classification;
import static java.util.Collections.emptyMap;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Matchers.any;
@@ -34,8 +33,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.alfresco.module.org_alfresco_module_rm.classification.ClassificationLevel;
import org.alfresco.module.org_alfresco_module_rm.classification.ClearanceLevel;
import org.alfresco.module.org_alfresco_module_rm.classification.SecurityClearance;
@@ -50,7 +47,6 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
@@ -58,6 +54,9 @@ import org.mockito.Spy;
import org.springframework.extensions.webscripts.DeclarativeWebScript;
import org.springframework.extensions.webscripts.WebScriptRequest;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
/**
* Test for get user security clearance API
*

View File

@@ -44,6 +44,7 @@ public class FPUtils
* @param <T> the type of elements in the list.
* @return the list with each element being the first retrieved from a {@code Supplier}.
*/
@SafeVarargs
public static <T> List<T> asListFrom(Supplier<T>... suppliers)
{
if (suppliers == null || suppliers.length == 0)
@@ -66,6 +67,7 @@ public class FPUtils
* @param <T> the type of elements in the set.
* @return the set with each element being the first retrieved from a {@code Supplier} (duplicates removed).
*/
@SafeVarargs
public static <T> Set<T> asSetFrom(Supplier<T>... suppliers)
{
List<T> l = asListFrom(suppliers);
@@ -78,6 +80,7 @@ public class FPUtils
* @param objects the objects to be added to the set
* @return a Set of objects (any equal objects will of course not be duplicated)
*/
@SafeVarargs
public static <T> Set<T> asSet(T... objects)
{
return new HashSet<>(asList(objects));