[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    [1/4] httpcomponents-client git commit: Removed unused code
From:       olegk () apache ! org
Date:       2017-12-22 14:20:19
Message-ID: 7d92783fadb447c6b4ed9dd22f98aa98 () git ! apache ! org
[Download RAW message or body]

Repository: httpcomponents-client
Updated Branches:
  refs/heads/master 29666a1ad -> d6d3d364e


Removed unused code


Project: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/commit/b2d063c6
Tree: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/tree/b2d063c6
Diff: http://git-wip-us.apache.org/repos/asf/httpcomponents-client/diff/b2d063c6

Branch: refs/heads/master
Commit: b2d063c6a8267b49d1664a5f4861c1614850024c
Parents: 8d08c38
Author: Oleg Kalnichevski <olegk@apache.org>
Authored: Thu Dec 21 14:47:10 2017 +0100
Committer: Oleg Kalnichevski <olegk@apache.org>
Committed: Thu Dec 21 14:49:25 2017 +0100

----------------------------------------------------------------------
 .../hc/client5/http/impl/cache/Counter.java     | 41 ----------------
 .../client5/http/impl/cache/HttpTestUtils.java  | 22 ---------
 .../hc/client5/http/impl/cache/Serializer.java  | 51 --------------------
 3 files changed, 114 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/b2d063c6/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Counter.java
                
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Counter.java \
b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Counter.java \
deleted file mode 100644 index 4f8a7f0..0000000
--- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Counter.java
                
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.impl.cache;
-
-public class Counter {
-
-    private int count;
-
-    public void incr() {
-        count++;
-    }
-
-    public int getCount() {
-        return count;
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/b2d063c6/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/HttpTestUtils.java
                
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/HttpTestUtils.java \
b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/HttpTestUtils.java
 index a6fce24..1203f99 100644
--- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/HttpTestUtils.java
                
+++ b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/HttpTestUtils.java
 @@ -85,16 +85,6 @@ public class HttpTestUtils {
         "User-Agent", "Vary" };
 
     /*
-     * "Entity-header fields define metainformation about the entity-body or,
-     * if no body is present, about the resource identified by the request."
-     *
-     * http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1
-     */
-    public static final String[] ENTITY_HEADERS = { "Allow", "Content-Encoding",
-        "Content-Language", "Content-Length", "Content-Location", "Content-MD5",
-        "Content-Range", "Content-Type", "Expires", "Last-Modified" };
-
-    /*
      * Determines whether the given header name is considered a hop-by-hop
      * header.
      *
@@ -110,18 +100,6 @@ public class HttpTestUtils {
     }
 
     /*
-     * Determines whether a given header name may appear multiple times.
-     */
-    public static boolean isMultiHeader(final String name) {
-        for (final String s : MULTI_HEADERS) {
-            if (s.equalsIgnoreCase(name)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    /*
      * Determines whether a given header name may only appear once in a message.
      */
     public static boolean isSingleHeader(final String name) {

http://git-wip-us.apache.org/repos/asf/httpcomponents-client/blob/b2d063c6/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Serializer.java
                
----------------------------------------------------------------------
diff --git a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Serializer.java \
b/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Serializer.java
 deleted file mode 100644
index 9066a06..0000000
--- a/httpclient5-cache/src/test/java/org/apache/hc/client5/http/impl/cache/Serializer.java
                
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * ====================================================================
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
-package org.apache.hc.client5.http.impl.cache;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-
-public class Serializer<T> {
-
-    public byte[] serialize(final T object) throws Exception {
-        final ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
-        final ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
-        objectStream.writeObject(object);
-        return byteStream.toByteArray();
-    }
-
-    @SuppressWarnings("unchecked")
-    public T deserialize(final byte[] serialized) throws Exception {
-        final ByteArrayInputStream byteStream = new \
                ByteArrayInputStream(serialized);
-        final ObjectInputStream objectStream = new ObjectInputStream(byteStream);
-        final T object = (T) objectStream.readObject();
-        return object;
-    }
-
-}


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic