Commit 853ab4b
fix: update HttpRequest#getVersion to use stable logic (#919)
The original implementation of `getVersion` used the implementation
version of the package of the declaring class, however there is
differing behavior between Android and openjdk based jvms.
In order to be consistent across platforms we will now always resolve
the value from the `google-http-client.properties` file that is
generated during the build. This method should be stable as it based
on loading a classpath resource which has cross jvm support.
Fixes #8921 parent 7ea53eb commit 853ab4b
File tree
2 files changed
+22
-17
lines changed- google-http-client/src
- main/java/com/google/api/client/http
- test/java/com/google/api/client/http
2 files changed
+22
-17
lines changedLines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1239 | 1235 | | |
| 1236 | + | |
| 1237 | + | |
1240 | 1238 | | |
1241 | 1239 | | |
1242 | 1240 | | |
| |||
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
| |||
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | | - | |
| 44 | + | |
| 45 | + | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
| |||
1267 | 1264 | | |
1268 | 1265 | | |
1269 | 1266 | | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
1270 | 1277 | | |
0 commit comments