Commit cbb29c7
authored
chore(mt): adopt JSpecify for null-safety and update dependencies (#1933)
* chore(core): adopt JSpecify for null-safety and update dependencies
- Replace `JetBrains.annotations` with `JSpecify` in build configuration.
- Add `@NullMarked` and `@SuppressWarnings("unused")` annotations to translation classes.
- Remove unnecessary null checks in `IBMWatsonTranslate`, `YandexCloudTranslate`, and `Google2Translate`.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
* fix(core): simplify error handling in YandexCloudTranslate
- Remove redundant `Objects.requireNonNullElse` in error handling.
- Directly use `extractErrorMessage` for improved readability.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
---------
Signed-off-by: Hiroshi Miura <miurahr@linux.com>1 parent f6f6b11 commit cbb29c7
File tree
4 files changed
+24
-34
lines changed- machinetranslators
- google/src/main/java/org/omegat/machinetranslators/google
- ibmwatson/src/main/java/org/omegat/machinetranslators/ibmwatson
- yandex
- src/main/java/org/omegat/machinetranslators/yandex
4 files changed
+24
-34
lines changedmachinetranslators/google/src/main/java/org/omegat/machinetranslators/google/Google2Translate.java
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
162 | 165 | | |
163 | 166 | | |
164 | 167 | | |
165 | | - | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
172 | | - | |
| 175 | + | |
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
| |||
180 | 183 | | |
181 | 184 | | |
182 | 185 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
120 | | - | |
| 123 | + | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
130 | | - | |
| 133 | + | |
131 | 134 | | |
132 | 135 | | |
133 | 136 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
Lines changed: 8 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
132 | | - | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | | - | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 157 | + | |
161 | 158 | | |
162 | 159 | | |
163 | 160 | | |
164 | 161 | | |
165 | 162 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | 163 | | |
170 | 164 | | |
171 | 165 | | |
| |||
280 | 274 | | |
281 | 275 | | |
282 | 276 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | 277 | | |
287 | 278 | | |
288 | 279 | | |
| |||
309 | 300 | | |
310 | 301 | | |
311 | 302 | | |
312 | | - | |
| 303 | + | |
313 | 304 | | |
314 | 305 | | |
315 | 306 | | |
| |||
0 commit comments