Polish: Array designators "[]" should be on the type, not the variable
This commit is contained in:
parent
7f58d9ede0
commit
c782075a13
|
|
@ -79,7 +79,7 @@ class PropertyDescriptorUtils {
|
|||
}
|
||||
|
||||
if (writeMethod != null) {
|
||||
Class<?> params[] = writeMethod.getParameterTypes();
|
||||
Class<?>[] params = writeMethod.getParameterTypes();
|
||||
if (params.length != 1) {
|
||||
throw new IntrospectionException("Bad write method arg count: " + writeMethod);
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ class PropertyDescriptorUtils {
|
|||
Class<?> indexedPropertyType = null;
|
||||
|
||||
if (indexedReadMethod != null) {
|
||||
Class<?> params[] = indexedReadMethod.getParameterTypes();
|
||||
Class<?>[] params = indexedReadMethod.getParameterTypes();
|
||||
if (params.length != 1) {
|
||||
throw new IntrospectionException("Bad indexed read method arg count: " + indexedReadMethod);
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ class PropertyDescriptorUtils {
|
|||
}
|
||||
|
||||
if (indexedWriteMethod != null) {
|
||||
Class<?> params[] = indexedWriteMethod.getParameterTypes();
|
||||
Class<?>[] params = indexedWriteMethod.getParameterTypes();
|
||||
if (params.length != 2) {
|
||||
throw new IntrospectionException("Bad indexed write method arg count: " + indexedWriteMethod);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ public abstract class PropertyMatches {
|
|||
if (s2.isEmpty()) {
|
||||
return s1.length();
|
||||
}
|
||||
int d[][] = new int[s1.length() + 1][s2.length() + 1];
|
||||
int[][] d = new int[s1.length() + 1][s2.length() + 1];
|
||||
|
||||
for (int i = 0; i <= s1.length(); i++) {
|
||||
d[i][0] = i;
|
||||
|
|
|
|||
|
|
@ -833,11 +833,11 @@ class ConstructorResolver {
|
|||
*/
|
||||
private static class ArgumentsHolder {
|
||||
|
||||
public final Object rawArguments[];
|
||||
public final Object[] rawArguments;
|
||||
|
||||
public final Object arguments[];
|
||||
public final Object[] arguments;
|
||||
|
||||
public final Object preparedArguments[];
|
||||
public final Object[] preparedArguments;
|
||||
|
||||
public boolean resolveNecessary = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1258,12 +1258,12 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, @Nullable Object args[], @Nullable String defaultMessage, Locale locale) {
|
||||
public String getMessage(String code, @Nullable Object[] args, @Nullable String defaultMessage, Locale locale) {
|
||||
return getMessageSource().getMessage(code, args, defaultMessage, locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, @Nullable Object args[], Locale locale) throws NoSuchMessageException {
|
||||
public String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException {
|
||||
return getMessageSource().getMessage(code, args, locale);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ public abstract class DigestUtils {
|
|||
}
|
||||
|
||||
private static char[] encodeHex(byte[] bytes) {
|
||||
char chars[] = new char[32];
|
||||
char[] chars = new char[32];
|
||||
for (int i = 0; i < chars.length; i = i + 2) {
|
||||
byte b = bytes[i / 2];
|
||||
chars[i] = HEX_CHARS[(b >>> 0x4) & 0xf];
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public abstract class StreamUtils {
|
|||
}
|
||||
|
||||
long bytesToCopy = end - start + 1;
|
||||
byte buffer[] = new byte[StreamUtils.BUFFER_SIZE];
|
||||
byte[] buffer = new byte[StreamUtils.BUFFER_SIZE];
|
||||
while (bytesToCopy > 0) {
|
||||
int bytesRead = in.read(buffer);
|
||||
if (bytesRead == -1) {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ abstract class AbstractStaxHandler implements ContentHandler, LexicalHandler {
|
|||
}
|
||||
|
||||
@Override
|
||||
public final void characters(char ch[], int start, int length) throws SAXException {
|
||||
public final void characters(char[] ch, int start, int length) throws SAXException {
|
||||
try {
|
||||
String data = new String(ch, start, length);
|
||||
if (!this.inCData) {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class DomContentHandler implements ContentHandler {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void characters(char ch[], int start, int length) throws SAXException {
|
||||
public void characters(char[] ch, int start, int length) throws SAXException {
|
||||
String data = new String(ch, start, length);
|
||||
Node parent = getParent();
|
||||
Node lastChild = parent.getLastChild();
|
||||
|
|
@ -139,7 +139,7 @@ class DomContentHandler implements ContentHandler {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
|
||||
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Tokenizer {
|
|||
private static final String[] ALTERNATIVE_OPERATOR_NAMES =
|
||||
{"DIV", "EQ", "GE", "GT", "LE", "LT", "MOD", "NE", "NOT"};
|
||||
|
||||
private static final byte FLAGS[] = new byte[256];
|
||||
private static final byte[] FLAGS = new byte[256];
|
||||
|
||||
private static final byte IS_DIGIT = 0x01;
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class PassThroughBlob implements Blob {
|
|||
}
|
||||
|
||||
@Override
|
||||
public long position(byte pattern[], long start) throws SQLException {
|
||||
public long position(byte[] pattern, long start) throws SQLException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class MockBodyContent extends BodyContent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(char value[], int offset, int length) throws IOException {
|
||||
public void write(char[] value, int offset, int length) throws IOException {
|
||||
getEnclosingWriter().write(value, offset, length);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(char buf[], int off, int len) {
|
||||
public void write(char[] buf, int off, int len) {
|
||||
super.write(buf, off, len);
|
||||
super.flush();
|
||||
setCommittedIfBufferSizeExceeded();
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class MockJspWriter extends JspWriter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(char value[], int offset, int length) throws IOException {
|
||||
public void write(char[] value, int offset, int length) throws IOException {
|
||||
getTargetWriter().write(value, offset, length);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -303,12 +303,12 @@ class StubWebApplicationContext implements WebApplicationContext {
|
|||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, @Nullable Object args[], @Nullable String defaultMessage, Locale locale) {
|
||||
public String getMessage(String code, @Nullable Object[] args, @Nullable String defaultMessage, Locale locale) {
|
||||
return this.messageSource.getMessage(code, args, defaultMessage, locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, @Nullable Object args[], Locale locale) throws NoSuchMessageException {
|
||||
public String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException {
|
||||
return this.messageSource.getMessage(code, args, locale);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void write(char buf[], int off, int len) {
|
||||
public void write(char[] buf, int off, int len) {
|
||||
super.write(buf, off, len);
|
||||
super.flush();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ public abstract class WebUtils {
|
|||
@Nullable
|
||||
public static Cookie getCookie(HttpServletRequest request, String name) {
|
||||
Assert.notNull(request, "Request must not be null");
|
||||
Cookie cookies[] = request.getCookies();
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null) {
|
||||
for (Cookie cookie : cookies) {
|
||||
if (name.equals(cookie.getName())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue