Use consistent class design
Update all classes so that inner classes are always last. Also ensure that utility classes are always final and have a private constructor and make exceptions final whenever possible. Issue: SPR-16968
This commit is contained in:
committed by
Juergen Hoeller
parent
0ad0f341bd
commit
eeebd51f57
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,9 +28,9 @@ package org.springframework.dao;
|
||||
@SuppressWarnings("serial")
|
||||
public class IncorrectResultSizeDataAccessException extends DataRetrievalFailureException {
|
||||
|
||||
private int expectedSize;
|
||||
private final int expectedSize;
|
||||
|
||||
private int actualSize;
|
||||
private final int actualSize;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -225,7 +225,7 @@ public class SingleConnectionFactory extends DelegatingConnectionFactory impleme
|
||||
/**
|
||||
* Invocation handler that suppresses close calls on CCI Connections.
|
||||
*/
|
||||
private static class CloseSuppressingInvocationHandler implements InvocationHandler {
|
||||
private static final class CloseSuppressingInvocationHandler implements InvocationHandler {
|
||||
|
||||
private final Connection target;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class HeuristicCompletionException extends TransactionException {
|
||||
/**
|
||||
* The outcome state of the transaction: have some or all resources been committed?
|
||||
*/
|
||||
private int outcomeState = STATE_UNKNOWN;
|
||||
private final int outcomeState;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ package org.springframework.transaction;
|
||||
@SuppressWarnings("serial")
|
||||
public class InvalidTimeoutException extends TransactionUsageException {
|
||||
|
||||
private int timeout;
|
||||
private final int timeout;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1273,7 +1273,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
||||
* Holder for suspended resources.
|
||||
* Used internally by {@code suspend} and {@code resume}.
|
||||
*/
|
||||
protected static class SuspendedResourcesHolder {
|
||||
protected static final class SuspendedResourcesHolder {
|
||||
|
||||
@Nullable
|
||||
private final Object suspendedResources;
|
||||
|
||||
Reference in New Issue
Block a user