Skip to content

Commit

Permalink
Use Arrays.toString instead of Arrays.asList when generating Strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed May 17, 2022
1 parent a1c3efb commit 59c7bb1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -378,7 +378,7 @@ public boolean matches(Method method, Class<?> targetClass, Object... args) {
}
catch (Throwable ex) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to evaluate join point for arguments " + Arrays.asList(args) +
logger.debug("Failed to evaluate join point for arguments " + Arrays.toString(args) +
" - falling back to non-match", ex);
}
return false;
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -424,7 +424,7 @@ private synchronized void initializeAdvisorChain() throws AopConfigException, Be
if (!this.advisorChainInitialized && !ObjectUtils.isEmpty(this.interceptorNames)) {
if (this.beanFactory == null) {
throw new IllegalStateException("No BeanFactory available anymore (probably due to serialization) " +
"- cannot resolve interceptor names " + Arrays.asList(this.interceptorNames));
"- cannot resolve interceptor names " + Arrays.toString(this.interceptorNames));
}

// Globals can't be last unless we specified a targetSource using the property...
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -143,7 +143,7 @@ public void prepare() {
this.actualObjectNames = getResolvedObjectNames();
if (this.actualObjectNames != null) {
if (logger.isDebugEnabled()) {
logger.debug("Registering NotificationListener for MBeans " + Arrays.asList(this.actualObjectNames));
logger.debug("Registering NotificationListener for MBeans " + Arrays.toString(this.actualObjectNames));
}
for (ObjectName actualObjectName : this.actualObjectNames) {
this.server.addNotificationListener(
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -299,7 +299,7 @@ protected String doGetActiveProfilesProperty() {
public void setActiveProfiles(String... profiles) {
Assert.notNull(profiles, "Profile array must not be null");
if (logger.isDebugEnabled()) {
logger.debug("Activating profiles " + Arrays.asList(profiles));
logger.debug("Activating profiles " + Arrays.toString(profiles));
}
synchronized (this.activeProfiles) {
this.activeProfiles.clear();
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -451,7 +451,7 @@ private KeyHolder executeInsertAndReturnKeyHolderInternal(final List<?> values)
if (getGeneratedKeyNames().length > 1) {
throw new InvalidDataAccessApiUsageException(
"Current database only supports retrieving the key for a single column. There are " +
getGeneratedKeyNames().length + " columns specified: " + Arrays.asList(getGeneratedKeyNames()));
getGeneratedKeyNames().length + " columns specified: " + Arrays.toString(getGeneratedKeyNames()));
}

Assert.state(getTableName() != null, "No table name set");
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -118,7 +118,7 @@ private String getBeanNameByType(WebApplicationContext wac, Class<?> endpointCla
beanNamesByType.put(endpointClass, NO_VALUE);
if (names.length > 1) {
throw new IllegalStateException("Found multiple @ServerEndpoint's of type [" +
endpointClass.getName() + "]: bean names " + Arrays.asList(names));
endpointClass.getName() + "]: bean names " + Arrays.toString(names));
}
}
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 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.
Expand Down Expand Up @@ -82,7 +82,7 @@ protected void handleRequestInternal(ServerHttpRequest request, ServerHttpRespon
return;
}
if (logger.isTraceEnabled()) {
logger.trace("Received message(s): " + Arrays.asList(messages));
logger.trace("Received message(s): " + Arrays.toString(messages));
}
response.setStatusCode(getResponseStatus());
response.getHeaders().setContentType(new MediaType("text", "plain", StandardCharsets.UTF_8));
Expand Down

0 comments on commit 59c7bb1

Please sign in to comment.