Skip to content

Commit

Permalink
Defer creating logger in StandardWebSocketHandlerAdapter to instantia…
Browse files Browse the repository at this point in the history
…tion time

Closes gh-25427
  • Loading branch information
jhoeller committed Jul 20, 2020
1 parent eb032a5 commit 64f4703
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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 @@ -42,7 +42,7 @@
*/
public class StandardWebSocketHandlerAdapter extends Endpoint {

private static final Log logger = LogFactory.getLog(StandardWebSocketHandlerAdapter.class);
private final Log logger = LogFactory.getLog(StandardWebSocketHandlerAdapter.class);

private final WebSocketHandler handler;

Expand Down

1 comment on commit 64f4703

@quaff
Copy link
Contributor

@quaff quaff commented on 64f4703 Jul 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhoeller since logger is not static now, I think it's better to use getClass() instead of StandardWebSocketHandlerAdapter.class to avoid potential copy-paste fault, WDYT?

Please sign in to comment.