Skip to content

Commit 59c7bb1

Browse files
committed
Use Arrays.toString instead of Arrays.asList when generating Strings
1 parent a1c3efb commit 59c7bb1

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -378,7 +378,7 @@ public boolean matches(Method method, Class<?> targetClass, Object... args) {
378378
}
379379
catch (Throwable ex) {
380380
if (logger.isDebugEnabled()) {
381-
logger.debug("Failed to evaluate join point for arguments " + Arrays.asList(args) +
381+
logger.debug("Failed to evaluate join point for arguments " + Arrays.toString(args) +
382382
" - falling back to non-match", ex);
383383
}
384384
return false;

spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -424,7 +424,7 @@ private synchronized void initializeAdvisorChain() throws AopConfigException, Be
424424
if (!this.advisorChainInitialized && !ObjectUtils.isEmpty(this.interceptorNames)) {
425425
if (this.beanFactory == null) {
426426
throw new IllegalStateException("No BeanFactory available anymore (probably due to serialization) " +
427-
"- cannot resolve interceptor names " + Arrays.asList(this.interceptorNames));
427+
"- cannot resolve interceptor names " + Arrays.toString(this.interceptorNames));
428428
}
429429

430430
// Globals can't be last unless we specified a targetSource using the property...

spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -143,7 +143,7 @@ public void prepare() {
143143
this.actualObjectNames = getResolvedObjectNames();
144144
if (this.actualObjectNames != null) {
145145
if (logger.isDebugEnabled()) {
146-
logger.debug("Registering NotificationListener for MBeans " + Arrays.asList(this.actualObjectNames));
146+
logger.debug("Registering NotificationListener for MBeans " + Arrays.toString(this.actualObjectNames));
147147
}
148148
for (ObjectName actualObjectName : this.actualObjectNames) {
149149
this.server.addNotificationListener(

spring-core/src/main/java/org/springframework/core/env/AbstractEnvironment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -299,7 +299,7 @@ protected String doGetActiveProfilesProperty() {
299299
public void setActiveProfiles(String... profiles) {
300300
Assert.notNull(profiles, "Profile array must not be null");
301301
if (logger.isDebugEnabled()) {
302-
logger.debug("Activating profiles " + Arrays.asList(profiles));
302+
logger.debug("Activating profiles " + Arrays.toString(profiles));
303303
}
304304
synchronized (this.activeProfiles) {
305305
this.activeProfiles.clear();

spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -451,7 +451,7 @@ private KeyHolder executeInsertAndReturnKeyHolderInternal(final List<?> values)
451451
if (getGeneratedKeyNames().length > 1) {
452452
throw new InvalidDataAccessApiUsageException(
453453
"Current database only supports retrieving the key for a single column. There are " +
454-
getGeneratedKeyNames().length + " columns specified: " + Arrays.asList(getGeneratedKeyNames()));
454+
getGeneratedKeyNames().length + " columns specified: " + Arrays.toString(getGeneratedKeyNames()));
455455
}
456456

457457
Assert.state(getTableName() != null, "No table name set");

spring-websocket/src/main/java/org/springframework/web/socket/server/standard/SpringConfigurator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -118,7 +118,7 @@ private String getBeanNameByType(WebApplicationContext wac, Class<?> endpointCla
118118
beanNamesByType.put(endpointClass, NO_VALUE);
119119
if (names.length > 1) {
120120
throw new IllegalStateException("Found multiple @ServerEndpoint's of type [" +
121-
endpointClass.getName() + "]: bean names " + Arrays.asList(names));
121+
endpointClass.getName() + "]: bean names " + Arrays.toString(names));
122122
}
123123
}
124124
}

spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractHttpReceivingTransportHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -82,7 +82,7 @@ protected void handleRequestInternal(ServerHttpRequest request, ServerHttpRespon
8282
return;
8383
}
8484
if (logger.isTraceEnabled()) {
85-
logger.trace("Received message(s): " + Arrays.asList(messages));
85+
logger.trace("Received message(s): " + Arrays.toString(messages));
8686
}
8787
response.setStatusCode(getResponseStatus());
8888
response.getHeaders().setContentType(new MediaType("text", "plain", StandardCharsets.UTF_8));

0 commit comments

Comments
 (0)