Liam Newman
a42305dd59
Revert "Removed extraneous author javadocs"
...
This reverts commit 888abc9e2a .
2020-03-04 11:32:12 -08:00
Liam Newman
48f6c195e0
Remove toIterable from RequestBuilder
2020-02-24 19:31:53 -08:00
Liam Newman
d77b99d3d4
Remove fetchArray method
2020-02-24 18:28:18 -08:00
Liam Newman
888abc9e2a
Removed extraneous author javadocs
2020-02-21 15:58:39 -08:00
Liam Newman
dc33e28452
Create GitHubHttpUrlConnectionClient to encapsulate interactions with HttpUrlConnection
2020-02-13 08:37:07 -08:00
Liam Newman
90489e4392
JavaDocs and refactoring
2020-02-12 22:42:12 -08:00
Liam Newman
ad45a74f87
Further clean up of refactored classes
2020-02-12 22:42:12 -08:00
Liam Newman
f6c75e1f99
More refactoring
2020-02-12 22:42:12 -08:00
Liam Newman
dd9245f6f2
Progress commit on moving to Client/Request/Response refactor
2020-02-12 22:42:12 -08:00
Liam Newman
82276837ac
Created Client/Request/Response classes
2020-02-12 22:42:12 -08:00
Liam Newman
bd68252b44
Test cleanup
2020-02-12 22:42:12 -08:00
Liam Newman
6b1258e33a
Major rewrite of Requester
2020-02-12 22:42:12 -08:00
Liam Newman
289282e235
Move OTP detection earlier
...
Like other errors we've been waiting until later to catch, this one is detectable so
whe should do that before the downstream exception needs to be thrown.
2020-02-06 16:59:49 -08:00
Liam Newman
825c36c15e
Tweaks for clarity
2020-02-06 14:11:16 -08:00
Liam Newman
b8fae1308d
Streamline fetch and retry process
2020-02-06 08:01:17 -08:00
Liam Newman
c5c8596664
Reduce output from connection retry
2020-01-29 17:04:24 -08:00
Liam Newman
1dde975cfe
Handle SSLHandshakeException with connection retry
2020-01-24 21:24:55 -08:00
Liam Newman
aeb5e5f681
Merge pull request #674 from v1v/master
...
Retry when SocketException with some sleep
2020-01-24 14:43:29 -08:00
Liam Newman
1c2e491845
Minor improvement to statistics
...
Reading raw streams just to map them is not needed.
Using arrays instead of lists works fine.
2020-01-24 14:07:19 -08:00
Liam Newman
eb4000f26b
Streamline retry code path
2020-01-24 12:32:04 -08:00
Liam Newman
764599a7d9
Move socket handling and add test
2020-01-23 20:54:13 -08:00
Victor Martinez
418ea9a19e
As suggested in the code review, handle exceptions and setup the connection
2020-01-23 20:39:58 +00:00
Victor Martinez
20f04febf2
As suggested in the code review, make a configurable sleep
2020-01-23 20:36:00 +00:00
Victor Martinez
a5f04d44a4
Fix javadoc warning
2020-01-23 20:29:55 +00:00
Victor Martinez
cbe1022f20
Support more generic Socket Exceptions
...
For instance: connection reset by peer
2020-01-23 20:28:57 +00:00
Victor Martinez
4f38ab3640
Cosmetic change
2020-01-23 14:01:29 +00:00
Victor Martinez
fca179abab
Retry if SocketException
...
See https://github.com/github-api/github-api/pull/373
2020-01-23 13:33:12 +00:00
Liam Newman
a9bb9302bc
Move cached 404 retry to main code path
2020-01-18 18:53:31 -08:00
Liam Newman
66a180346e
Improve commenting of workaround
2020-01-17 17:52:50 -08:00
Liam Newman
63ee878789
Merge remote-tracking branch 'github-api/master' into task/cache-error-test
2020-01-17 17:27:12 -08:00
Liam Newman
3479e4f2fd
Clean up and formatting
2020-01-17 17:05:45 -08:00
Liam Newman
16d34f3268
Workaround for #669 - retry with cache overridden
...
This is much more reasonable way to address this issue.
When the Requester detects a 404 response with an ETag (only happpens when the server's 304
is bogus and would cause cache corruption), try the query again with new request header
that forces the server to not return 304 and return new data instead.
Ths solution is transparent to users of this library and autmatically fixes a situation that
was causing cache corruption. If GitHub ever fixes the issue and begins providing accurate
ETags to their 404 responses, this will result in two calls being made for each 404 response.
While that would be unfortunate, it would still be better than the current situation.
2020-01-17 15:53:55 -08:00
Liam Newman
b9c8bf07ea
Restore correct exception throwing for getArray
2020-01-15 19:42:42 -08:00
Liam Newman
a3ba07d45f
Inline toIterable
2020-01-15 19:33:22 -08:00
Liam Newman
52dd90e85d
Additional tweaks to reduce the number of code paths
2019-12-17 14:15:38 -08:00
Liam Newman
305267d07f
Rename methods for better clarity
2019-12-17 12:41:23 -08:00
Liam Newman
40f05e4dbb
Clean up request method calls
2019-12-17 10:02:55 -08:00
Liam Newman
0f9482864c
Move url to separate method
2019-11-26 15:26:46 -08:00
Liam Newman
60700d59fe
Force URI encoding for api paths starting with slash
2019-11-26 15:14:36 -08:00
Liam Newman
3296cef02d
Change requester to GET by default
2019-11-25 18:15:21 -08:00
Liam Newman
1b55b5fa3c
Move array population to single iterator code path
...
This remove a second code path throught pagination.
2019-11-25 18:15:21 -08:00
Liam Newman
8c4b1ef74a
Fixed GHContent to allow spaces in path
...
URI path encoding whack-a-mole. This fix should cover a significant number of cases.
Also, fixed to NOT do URLEncode for URI path. The encoding is different between path and query.
Fixes #624
2019-11-25 18:06:19 -08:00
Liam Newman
9a5467dcac
Re-enable GHBranchProtection test
2019-11-18 19:05:43 -08:00
Liam Newman
2af4f61882
Cleanup imports
2019-11-18 11:35:45 -08:00
Liam Newman
37d7cfaaf2
Clean up Requester interface a bit
2019-11-14 18:16:56 -08:00
Liam Newman
757b9b2118
Add JavaDocs
...
Do using IntelliJ JavaDocs plugin. Better to have something than nothing.
2019-11-14 13:24:28 -08:00
Liam Newman
f6a01551fd
Make PagedIterableWithConsumer package local for mocking
2019-11-14 13:15:34 -08:00
Liam Newman
a3b126282d
Remove package comments
2019-11-13 15:20:02 -08:00
Liam Newman
9d8460bb81
Enable automatic code formatter with CI validation
...
This may be controversial but it we're doing it. Having code formatting needs to be consistent
and a non-issue during code review. I'm willing modify the configuration if people see a strong
need, but formatting needs to be present and enforced.
2019-11-13 13:28:23 -08:00
Liam Newman
8943af9840
Cleanup tabs and whitespace
2019-11-13 12:47:19 -08:00