Commit 9d353b8
Refactor CoreAdapterBuilder cache use (#276)
* Refactor CoreAdapterBuilder cache use
We can merge the 2 build() methods because the cacheKey is always just the type.
* The key for adapterCache can be Type rather than Object
* Refactor CoreAdapterBuilder to put ValidationAdapters into the cache
Previously, it always created new adapters and didn't actually use the adapterCache.
---------
Co-authored-by: Josiah Noel <32279667+SentryMan@users.noreply.github.com>1 parent 1205844 commit 9d353b8
File tree
3 files changed
+29
-27
lines changed- validator/src
- main/java/io/avaje/validation/core
- test/java/io/avaje/validation/core
3 files changed
+29
-27
lines changedLines changed: 16 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 55 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
67 | 63 | | |
68 | 64 | | |
69 | | - | |
70 | | - | |
| 65 | + | |
71 | 66 | | |
72 | | - | |
| 67 | + | |
73 | 68 | | |
74 | 69 | | |
75 | 70 | | |
| |||
80 | 75 | | |
81 | 76 | | |
82 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 2 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
| |||
152 | 148 | | |
153 | 149 | | |
154 | 150 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 151 | + | |
| 152 | + | |
162 | 153 | | |
163 | 154 | | |
164 | 155 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
25 | 36 | | |
26 | 37 | | |
27 | 38 | | |
| |||
0 commit comments