Remove redundant code from abstract class.#194
Remove redundant code from abstract class.#194jcourtney1 wants to merge 4 commits intonotnoop:masterfrom
Conversation
…ing expiry as a Date should only be relevant to tokens and payloads specified as Strings or that expiry specified as a Unix timestamp (int) should only be relevant to tokens and payloads specified as byte[] so both combinations are now supported.
|
great effort, @jcourtney1 ! I will review it asap. BTW. do you mind adding some unit tests for the new methods you put on the |
|
@matzew |
AbstractApnsService had a lot of redundant code in it. I consolidated the core functions in a couple of methods and then had the other API methods with variant parameterizations call these rather than duplicating the implementations. The results seem much cleaner and easier to follow. I also expanded the API slightly to make specifying the expiry as a Date available as a variant of the methods with byte[] parameters and specifying the expiry as a Unix time available as a variant of the methods with String parameters.