mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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);
|
||||
|
@@ -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
|
||||
*
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user