mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Reduce number of compilation warnings and re-format where nessesary.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@101538 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -31,6 +31,9 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
|||||||
*/
|
*/
|
||||||
public final class ClassificationLevel implements Serializable
|
public final class ClassificationLevel implements Serializable
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = -3375064867090476422L;
|
||||||
|
|
||||||
private final String id;
|
private final String id;
|
||||||
private final String displayLabelKey;
|
private final String displayLabelKey;
|
||||||
|
|
||||||
|
@@ -28,12 +28,18 @@ import org.alfresco.error.AlfrescoRuntimeException;
|
|||||||
*/
|
*/
|
||||||
public class ClassificationServiceException extends AlfrescoRuntimeException
|
public class ClassificationServiceException extends AlfrescoRuntimeException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = -7097573558438226725L;
|
||||||
|
|
||||||
public ClassificationServiceException(String msgId) { super(msgId); }
|
public ClassificationServiceException(String msgId) { super(msgId); }
|
||||||
public ClassificationServiceException(String msgId, Throwable cause) { super(msgId, cause); }
|
public ClassificationServiceException(String msgId, Throwable cause) { super(msgId, cause); }
|
||||||
|
|
||||||
/** Represents a fatal error due to missing required configuration. */
|
/** Represents a fatal error due to missing required configuration. */
|
||||||
public static class MissingConfiguration extends ClassificationServiceException
|
public static class MissingConfiguration extends ClassificationServiceException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = -750162955179494445L;
|
||||||
|
|
||||||
public MissingConfiguration(String msgId) { super(msgId); }
|
public MissingConfiguration(String msgId) { super(msgId); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,6 +47,9 @@ public class ClassificationServiceException extends AlfrescoRuntimeException
|
|||||||
* The configuration was understood by the server, but was rejected as illegal. */
|
* The configuration was understood by the server, but was rejected as illegal. */
|
||||||
public static class IllegalConfiguration extends ClassificationServiceException
|
public static class IllegalConfiguration extends ClassificationServiceException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = -1139626996782741741L;
|
||||||
|
|
||||||
public IllegalConfiguration(String msgId) { super(msgId); }
|
public IllegalConfiguration(String msgId) { super(msgId); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,6 +57,9 @@ public class ClassificationServiceException extends AlfrescoRuntimeException
|
|||||||
* The configuration could not be understood by the server. */
|
* The configuration could not be understood by the server. */
|
||||||
public static class MalformedConfiguration extends ClassificationServiceException
|
public static class MalformedConfiguration extends ClassificationServiceException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = 8191162359241035026L;
|
||||||
|
|
||||||
public MalformedConfiguration(String msgId) { super(msgId); }
|
public MalformedConfiguration(String msgId) { super(msgId); }
|
||||||
public MalformedConfiguration(String msgId, Throwable cause) { super(msgId, cause); }
|
public MalformedConfiguration(String msgId, Throwable cause) { super(msgId, cause); }
|
||||||
}
|
}
|
||||||
|
@@ -36,10 +36,10 @@ import org.slf4j.LoggerFactory;
|
|||||||
public class ClassificationServiceImpl extends ServiceBaseImpl
|
public class ClassificationServiceImpl extends ServiceBaseImpl
|
||||||
implements ClassificationService
|
implements ClassificationService
|
||||||
{
|
{
|
||||||
private static final String[] LEVELS_KEY = new String[] { "org.alfresco",
|
private static final Serializable[] LEVELS_KEY = new String[] { "org.alfresco",
|
||||||
"module.org_alfresco_module_rm",
|
"module.org_alfresco_module_rm",
|
||||||
"classification.levels" };
|
"classification.levels" };
|
||||||
private static final String[] REASONS_KEY = new String[] { "org.alfresco",
|
private static final Serializable[] REASONS_KEY = new String[] { "org.alfresco",
|
||||||
"module.org_alfresco_module_rm",
|
"module.org_alfresco_module_rm",
|
||||||
"classification.reasons" };
|
"classification.reasons" };
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(ClassificationServiceImpl.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(ClassificationServiceImpl.class);
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
package org.alfresco.module.org_alfresco_module_rm.test.util;
|
package org.alfresco.module.org_alfresco_module_rm.test.util;
|
||||||
|
|
||||||
import static org.mockito.Matchers.any;
|
import static org.mockito.Matchers.any;
|
||||||
import static org.mockito.Matchers.anyString;
|
|
||||||
import static org.mockito.Matchers.eq;
|
import static org.mockito.Matchers.eq;
|
||||||
import static org.mockito.Mockito.doAnswer;
|
import static org.mockito.Mockito.doAnswer;
|
||||||
import static org.mockito.Mockito.doReturn;
|
import static org.mockito.Mockito.doReturn;
|
||||||
@@ -54,7 +53,6 @@ import org.alfresco.module.org_alfresco_module_rm.util.TransactionalResourceHelp
|
|||||||
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionService;
|
import org.alfresco.module.org_alfresco_module_rm.version.RecordableVersionService;
|
||||||
import org.alfresco.repo.policy.BehaviourFilter;
|
import org.alfresco.repo.policy.BehaviourFilter;
|
||||||
import org.alfresco.repo.policy.PolicyComponent;
|
import org.alfresco.repo.policy.PolicyComponent;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
|
||||||
import org.alfresco.repo.security.permissions.impl.ExtendedPermissionService;
|
import org.alfresco.repo.security.permissions.impl.ExtendedPermissionService;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||||
|
@@ -32,6 +32,9 @@ public class ExceptionUtils
|
|||||||
/** This represents a situation where a throwable of an unexpected type was thrown. */
|
/** This represents a situation where a throwable of an unexpected type was thrown. */
|
||||||
public static class UnexpectedThrowableException extends RuntimeException
|
public static class UnexpectedThrowableException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = 3900164716673246207L;
|
||||||
|
|
||||||
private final Class<? extends Throwable> expected;
|
private final Class<? extends Throwable> expected;
|
||||||
private final Throwable actual;
|
private final Throwable actual;
|
||||||
|
|
||||||
@@ -54,6 +57,9 @@ public class ExceptionUtils
|
|||||||
/** This represents a situation where an expected throwable was not thrown. */
|
/** This represents a situation where an expected throwable was not thrown. */
|
||||||
public static class MissingThrowableException extends RuntimeException
|
public static class MissingThrowableException extends RuntimeException
|
||||||
{
|
{
|
||||||
|
/** serial version uid */
|
||||||
|
private static final long serialVersionUID = -988022536370047222L;
|
||||||
|
|
||||||
private final Class<? extends Throwable> expected;
|
private final Class<? extends Throwable> expected;
|
||||||
|
|
||||||
public MissingThrowableException(Class<? extends Throwable> expected)
|
public MissingThrowableException(Class<? extends Throwable> expected)
|
||||||
@@ -121,6 +127,7 @@ public class ExceptionUtils
|
|||||||
* @throws UnexpectedThrowableException if a non-matching throwable was thrown out of the code block.
|
* @throws UnexpectedThrowableException if a non-matching throwable was thrown out of the code block.
|
||||||
* @throws MissingThrowableException if the expected throwable was not thrown out of the code block.
|
* @throws MissingThrowableException if the expected throwable was not thrown out of the code block.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static <R, T extends Throwable> T expectedException(final Class<T> expected, final Supplier<R> code)
|
public static <R, T extends Throwable> T expectedException(final Class<T> expected, final Supplier<R> code)
|
||||||
{
|
{
|
||||||
// The code block may throw an exception or it may not.
|
// The code block may throw an exception or it may not.
|
||||||
|
Reference in New Issue
Block a user