You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/01/15 11:50:48 UTC

[tomcat] branch master updated: Remove deprecated Vary class

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
     new ab9ce1d  Remove deprecated Vary class
ab9ce1d is described below

commit ab9ce1d5f70242b0ae1f19b1ad3625cc22313306
Author: remm <re...@apache.org>
AuthorDate: Wed Jan 15 12:50:36 2020 +0100

    Remove deprecated Vary class
---
 java/org/apache/tomcat/util/http/parser/Vary.java  | 37 ----------------------
 .../tomcat/util/http/parser/TestTokenList.java     |  7 ----
 2 files changed, 44 deletions(-)

diff --git a/java/org/apache/tomcat/util/http/parser/Vary.java b/java/org/apache/tomcat/util/http/parser/Vary.java
deleted file mode 100644
index e064620..0000000
--- a/java/org/apache/tomcat/util/http/parser/Vary.java
+++ /dev/null
@@ -1,37 +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.
- */
-package org.apache.tomcat.util.http.parser;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.Set;
-
-/**
- * @deprecated  Use {@link TokenList}.
- */
-@Deprecated
-public class Vary {
-
-    private Vary() {
-        // Utility class. Hide default constructor.
-    }
-
-
-    public static void parseVary(StringReader input, Set<String> result) throws IOException {
-        TokenList.parseTokenList(input, result);
-    }
-}
diff --git a/test/org/apache/tomcat/util/http/parser/TestTokenList.java b/test/org/apache/tomcat/util/http/parser/TestTokenList.java
index 8405bda..642c9a7 100644
--- a/test/org/apache/tomcat/util/http/parser/TestTokenList.java
+++ b/test/org/apache/tomcat/util/http/parser/TestTokenList.java
@@ -125,16 +125,9 @@ public class TestTokenList {
     }
 
 
-    @SuppressWarnings("deprecation")
     private void doTestVary(String input, Set<String> expected) throws IOException {
         StringReader reader = new StringReader(input);
         Set<String> result = new HashSet<>();
-        Vary.parseVary(reader, result);
-        Assert.assertEquals(expected, result);
-
-        // Can't use reset(). Parser uses marks.
-        reader = new StringReader(input);
-        result.clear();
         TokenList.parseTokenList(reader, result);
         Assert.assertEquals(expected, result);
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org