16
16
17
17
package io .appium .java_client .proxy ;
18
18
19
- import com .google .common .annotations .VisibleForTesting ;
20
19
import com .google .common .base .Preconditions ;
21
- import java .util .Map ;
22
- import java .util .WeakHashMap ;
23
20
import lombok .Value ;
24
21
import net .bytebuddy .ByteBuddy ;
25
22
import net .bytebuddy .description .method .MethodDescription ;
34
31
import java .lang .reflect .Method ;
35
32
import java .util .Collection ;
36
33
import java .util .Collections ;
34
+ import java .util .Map ;
37
35
import java .util .Set ;
36
+ import java .util .WeakHashMap ;
38
37
import java .util .stream .Collectors ;
39
38
import java .util .stream .Stream ;
40
39
@@ -51,18 +50,8 @@ public class Helpers {
51
50
// the performance and to avoid extensive memory usage for our case, where
52
51
// the amount of instrumented proxy classes we create is low in comparison to the amount
53
52
// of proxy instances.
54
- private static final Map <ProxyClassSignature , Class <?>> CACHED_PROXY_CLASSES = Collections .synchronizedMap (new WeakHashMap <>());
55
-
56
- /**
57
- * Gets CACHED_PROXY_CLASSES size.
58
- * Used for cache clear up tests {@see io.appium.java_client.pagefactory_tests.widget.tests.combined.CombinedWidgetTest}.
59
- *
60
- * @return the cached proxy classes size
61
- */
62
- @ VisibleForTesting
63
- public static int getCachedProxyClassesSize () {
64
- return CACHED_PROXY_CLASSES .size ();
65
- }
53
+ private static final Map <ProxyClassSignature , Class <?>> CACHED_PROXY_CLASSES =
54
+ Collections .synchronizedMap (new WeakHashMap <>());
66
55
67
56
private Helpers () {
68
57
}
0 commit comments