Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c954531c authored by desperateCoder's avatar desperateCoder
Browse files

added nullcheck

parent 32dde70e
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -10,10 +10,16 @@ public class ParsedResponse <T> {

    public ParsedResponse(T response, ArrayList<AidlNetworkRequest.PlainHeader> headers) {
        this.response = response;
        if (headers!= null) {
            for (AidlNetworkRequest.PlainHeader header : headers) {
                this.headers.put(header.getName(), header.getValue());
            }
        }
    }

    public static <T> ParsedResponse<T> of(T data) {
        return new ParsedResponse<>(data, null);
    }

    public T getResponse() {
        return response;