Polish: Array designators "[]" should be on the type, not the variable
(cherry picked from commit c782075)
This commit is contained in:
committed by
Juergen Hoeller
parent
295df21f06
commit
d5f358c33c
@@ -75,7 +75,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);
|
||||
}
|
||||
@@ -109,7 +109,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);
|
||||
}
|
||||
@@ -123,7 +123,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);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,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;
|
||||
|
||||
@@ -855,11 +855,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;
|
||||
|
||||
|
||||
@@ -1249,12 +1249,12 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, Object args[], String defaultMessage, Locale locale) {
|
||||
public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) {
|
||||
return getMessageSource().getMessage(code, args, defaultMessage, locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, Object args[], Locale locale) throws NoSuchMessageException {
|
||||
public String getMessage(String code, 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];
|
||||
|
||||
@@ -165,7 +165,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) {
|
||||
|
||||
@@ -100,7 +100,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;
|
||||
|
||||
|
||||
@@ -86,7 +86,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -687,7 +687,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();
|
||||
|
||||
@@ -115,7 +115,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -302,12 +302,12 @@ class StubWebApplicationContext implements WebApplicationContext {
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, Object args[], String defaultMessage, Locale locale) {
|
||||
public String getMessage(String code, Object[] args, String defaultMessage, Locale locale) {
|
||||
return this.messageSource.getMessage(code, args, defaultMessage, locale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage(String code, Object args[], Locale locale) throws NoSuchMessageException {
|
||||
public String getMessage(String code, Object[] args, Locale locale) throws NoSuchMessageException {
|
||||
return this.messageSource.getMessage(code, args, locale);
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,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();
|
||||
}
|
||||
|
||||
@@ -548,7 +548,7 @@ public abstract class WebUtils {
|
||||
*/
|
||||
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())) {
|
||||
|
||||
Reference in New Issue
Block a user