You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find that the private field factory at Line 17 in the file 'disconf/disconf-client/src/main/java/com/baidu/disconf/client/scan/inner/statically/strategy/impl/SpringScanStatic.java' on the master branch is only assigned and used in the method scan. Therefore, this field can be removed from the class, and become a local variable in the method scan. This transformation will normally reduce memory usage and improve readability of your code.
privateDefaultListableBeanFactoryfactory; // line 17 this field can be replaced by local variable public ScanStaticModel scan(List<String> packNameList) { // DefaultListableBeanFactory factory = (DefaultListableBeanFactory) context.getAutowireCapableBeanFactory(); factory = (DefaultListableBeanFactory) context.getAutowireCapableBeanFactory(); return null; }
Besides, there are other fields like this.I sorted them out and put them in the table below.I will be happy if this transformation is helpful.
Hi,
I find that the private field factory at Line 17 in the file 'disconf/disconf-client/src/main/java/com/baidu/disconf/client/scan/inner/statically/strategy/impl/SpringScanStatic.java' on the master branch is only assigned and used in the method scan. Therefore, this field can be removed from the class, and become a local variable in the method scan. This transformation will normally reduce memory usage and improve readability of your code.
Besides, there are other fields like this.I sorted them out and put them in the table below.I will be happy if this transformation is helpful.
The text was updated successfully, but these errors were encountered: