Skip to content

Commit 2dbad8d

Browse files
committed
Avoid unnecessary logger serialization
See gh-32459
1 parent 5e549da commit 2dbad8d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -99,7 +99,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
9999
public static final String GLOBAL_SUFFIX = "*";
100100

101101

102-
protected final Log logger = LogFactory.getLog(getClass());
102+
private static final Log logger = LogFactory.getLog(ProxyFactoryBean.class);
103103

104104
@Nullable
105105
private String[] interceptorNames;

spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static EntityManager createSharedEntityManager(EntityManagerFactory emf,
186186
@SuppressWarnings("serial")
187187
private static class SharedEntityManagerInvocationHandler implements InvocationHandler, Serializable {
188188

189-
private final Log logger = LogFactory.getLog(getClass());
189+
private static final Log logger = LogFactory.getLog(SharedEntityManagerInvocationHandler.class);
190190

191191
private final EntityManagerFactory targetFactory;
192192

0 commit comments

Comments
 (0)