Commit fafcb85
authored
Fix performance regression in AssertJ recipes (#505)
* Fix performance regression in AssertJ recipes
Since commit 368384a , AssertJ recipes are really slower since calling contextSensitive() method disable a cache on JavaTemplate.
Fixes:
- Make sure there is a static import org.assertj.core.api.Assertions.* , even if not referenced (see #491 and #479)
- reintroduced assertionsParser cache in JUnitAssertEqualsToAssertThat
* Fix performance regression in AssertJ recipes
Since commit 368384a , AssertJ recipes are really slower since calling contextSensitive() method disable a cache on JavaTemplate.
Fixes:
- Make sure there is a static import org.assertj.core.api.Assertions.* , even if not referenced (see #491 and #479)
- reintroduced assertionsParser cache in JUnitAssertEqualsToAssertThat
* Fix performance regression in AssertJ recipes
Since commit 368384a , AssertJ recipes are really slower since calling contextSensitive() method disable a cache on JavaTemplate.
Fixes:
- Make sure there is a static import org.assertj.core.api.Assertions.* , even if not referenced (see #491 and #479)
- reintroduced assertionsParser cache in JUnitAssertEqualsToAssertThat1 parent d73c390 commit fafcb85
File tree
11 files changed
+54
-38
lines changed- src
- main/java/org/openrewrite/java/testing/assertj
- test/java/org/openrewrite/java/testing/assertj
11 files changed
+54
-38
lines changedLines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
Lines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| |||
63 | 73 | | |
64 | 74 | | |
65 | 75 | | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
70 | | - | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | | - | |
82 | 92 | | |
83 | 93 | | |
84 | | - | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
| |||
91 | 101 | | |
92 | 102 | | |
93 | 103 | | |
94 | | - | |
| 104 | + | |
| 105 | + | |
95 | 106 | | |
96 | | - | |
97 | 107 | | |
98 | | - | |
| 108 | + | |
99 | 109 | | |
100 | 110 | | |
101 | 111 | | |
| |||
104 | 114 | | |
105 | 115 | | |
106 | 116 | | |
107 | | - | |
| 117 | + | |
| 118 | + | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
112 | | - | |
113 | 123 | | |
114 | 124 | | |
115 | | - | |
| 125 | + | |
116 | 126 | | |
117 | 127 | | |
118 | 128 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
Lines changed: 6 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
96 | | - | |
97 | 95 | | |
98 | 96 | | |
99 | 97 | | |
| |||
106 | 104 | | |
107 | 105 | | |
108 | 106 | | |
109 | | - | |
110 | 107 | | |
111 | 108 | | |
112 | 109 | | |
| |||
117 | 114 | | |
118 | 115 | | |
119 | 116 | | |
120 | | - | |
| 117 | + | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
126 | 123 | | |
127 | 124 | | |
128 | 125 | | |
129 | | - | |
130 | 126 | | |
131 | 127 | | |
132 | 128 | | |
| |||
139 | 135 | | |
140 | 136 | | |
141 | 137 | | |
142 | | - | |
| 138 | + | |
143 | 139 | | |
144 | 140 | | |
145 | | - | |
146 | | - | |
147 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
148 | 145 | | |
149 | 146 | | |
150 | 147 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
89 | 88 | | |
90 | 89 | | |
91 | 90 | | |
92 | | - | |
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
| |||
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
104 | 106 | | |
105 | | - | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
91 | | - | |
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| |||
100 | 98 | | |
101 | 99 | | |
102 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
93 | | - | |
94 | 92 | | |
95 | 93 | | |
96 | 94 | | |
| |||
103 | 101 | | |
104 | 102 | | |
105 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | | - | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
0 commit comments