From 733b9563459e0579c1600f7440dbbce555565915 Mon Sep 17 00:00:00 2001 From: Alex Popov Date: Sat, 28 Jun 2025 23:21:23 +0700 Subject: [PATCH 1/2] Remove deprecated AppCacheStatus enum from the HTML5 package --- .../openqa/selenium/html5/AppCacheStatus.java | 67 ------------------- 1 file changed, 67 deletions(-) delete mode 100644 java/src/org/openqa/selenium/html5/AppCacheStatus.java diff --git a/java/src/org/openqa/selenium/html5/AppCacheStatus.java b/java/src/org/openqa/selenium/html5/AppCacheStatus.java deleted file mode 100644 index 49c79ee942728..0000000000000 --- a/java/src/org/openqa/selenium/html5/AppCacheStatus.java +++ /dev/null @@ -1,67 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC 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.openqa.selenium.html5; - -import org.jspecify.annotations.NullMarked; -import org.jspecify.annotations.Nullable; - -/** Represents the application cache status. */ -@Deprecated -@NullMarked -public enum AppCacheStatus { - UNCACHED(0), - IDLE(1), - CHECKING(2), - DOWNLOADING(3), - UPDATE_READY(4), - OBSOLETE(5); - - private final int value; - - AppCacheStatus(int value) { - this.value = value; - } - - public int value() { - return value; - } - - /** - * Gets the AppCacheStatus for the given int value. - * - * @param value The input value - * @return {@link AppCacheStatus} The corresponding appcache status - */ - public static @Nullable AppCacheStatus getEnum(int value) { - for (AppCacheStatus status : AppCacheStatus.values()) { - if (value == status.value()) { - return status; - } - } - return null; - } - - public static @Nullable AppCacheStatus getEnum(String value) { - for (AppCacheStatus status : AppCacheStatus.values()) { - if (status.toString().equalsIgnoreCase(value)) { - return status; - } - } - return null; - } -} From 80a5bcf53136b51de52c7e26ecc6e878713c1a45 Mon Sep 17 00:00:00 2001 From: Alex Popov Date: Sat, 28 Jun 2025 23:35:01 +0700 Subject: [PATCH 2/2] Remove deprecated app cache commands from DriverCommand interface --- java/src/org/openqa/selenium/remote/DriverCommand.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/java/src/org/openqa/selenium/remote/DriverCommand.java b/java/src/org/openqa/selenium/remote/DriverCommand.java index a498eb297267e..fffb7cb3b9d70 100644 --- a/java/src/org/openqa/selenium/remote/DriverCommand.java +++ b/java/src/org/openqa/selenium/remote/DriverCommand.java @@ -106,8 +106,6 @@ public interface DriverCommand { String SET_SCRIPT_TIMEOUT = "setScriptTimeout"; String GET_LOCATION = "getLocation"; String SET_LOCATION = "setLocation"; - String GET_APP_CACHE = "getAppCache"; - String CLEAR_APP_CACHE = "clearAppCache"; String GET_LOCAL_STORAGE_ITEM = "getLocalStorageItem"; String GET_LOCAL_STORAGE_KEYS = "getLocalStorageKeys"; String SET_LOCAL_STORAGE_ITEM = "setLocalStorageItem";