From 70c1edf7f1d3d657f643bb7e3b80b6b80f1ca7d3 Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Sat, 22 Jul 2023 13:38:00 -0400 Subject: [PATCH] https://github.com/jakartaee/faces/issues/1830 Remove things marked @Deprecated(forRemoval = true, since = "4.0") --- .../jakarta/faces/annotation/FacesConfig.java | 37 ---- .../faces/application/ResourceHandler.java | 22 --- .../faces/application/ViewHandler.java | 18 -- .../faces/component/html/HtmlInputFile.java | 158 ------------------ .../faces/component/html/HtmlInputSecret.java | 32 ---- 5 files changed, 267 deletions(-) diff --git a/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java b/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java index 4c274347e3..4d89a8a234 100644 --- a/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java +++ b/impl/src/main/java/jakarta/faces/annotation/FacesConfig.java @@ -54,43 +54,6 @@ public static final class Literal extends AnnotationLiteral impleme * Instance of the {@link FacesConfig} qualifier. */ public static final Literal INSTANCE = new Literal(); - - @Override - public Version version() { - return Version.JSF_2_3; - } - } - - /** - * The Faces spec version - * - * @deprecated It has no effect anymore as per Jakarta Faces version 4.0; the actual impl version should be leading. - */ - @Deprecated(forRemoval = true, since = "4.0") - public static enum Version { - - /** - *

- * This value indicates CDI should be used for Jakarta Expression Language resolution as well as enabling Jakarta Server - * Faces CDI injection, as specified in Section 5.6.3 "CDI for EL Resolution" and Section 5.9 "CDI Integration". - *

- */ - JSF_2_3 - } - /** - *

- * The value of this attribute indicates that features corresponding to this version must be enabled for this - * application. - *

- * - * @return the spec version for which the features must be enabled. - * - * @deprecated It has no effect anymore as per Jakarta Faces version 4.0; the actual impl version should be leading. - */ - @Nonbinding - @Deprecated(forRemoval = true, since = "4.0") - Version version() default Version.JSF_2_3; - } diff --git a/impl/src/main/java/jakarta/faces/application/ResourceHandler.java b/impl/src/main/java/jakarta/faces/application/ResourceHandler.java index 14ad1a6d29..f7e28c21ad 100644 --- a/impl/src/main/java/jakarta/faces/application/ResourceHandler.java +++ b/impl/src/main/java/jakarta/faces/application/ResourceHandler.java @@ -155,17 +155,6 @@ public abstract class ResourceHandler { */ public static final String RESOURCE_IDENTIFIER = "/jakarta.faces.resource"; - /** - *

- * Resource name of Jakarta Faces script resource. - *

- * - * @since 2.3 - * @deprecated Use {@link #FACES_SCRIPT_RESOURCE_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String JSF_SCRIPT_RESOURCE_NAME = "faces.js"; - /** *

* Resource name of Jakarta Faces script resource. @@ -175,17 +164,6 @@ public abstract class ResourceHandler { */ public static final String FACES_SCRIPT_RESOURCE_NAME = "faces.js"; - /** - *

- * Library name of Jakarta Faces script resource. - *

- * - * @since 2.3 - * @deprecated Use {@link #FACES_SCRIPT_LIBRARY_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String JSF_SCRIPT_LIBRARY_NAME = "jakarta.faces"; - /** *

* Library name of Jakarta Faces script resource. diff --git a/impl/src/main/java/jakarta/faces/application/ViewHandler.java b/impl/src/main/java/jakarta/faces/application/ViewHandler.java index c63e37e8a3..cf0f3ed00b 100644 --- a/impl/src/main/java/jakarta/faces/application/ViewHandler.java +++ b/impl/src/main/java/jakarta/faces/application/ViewHandler.java @@ -78,24 +78,6 @@ public abstract class ViewHandler { */ public static final String CHARACTER_ENCODING_KEY = "jakarta.faces.request.charset"; - /** - *

- * This is not anymore used since removal of support for Jakarta Pages. - *

- * @deprecated Use {@link #FACELETS_SUFFIX_PARAM_NAME} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String DEFAULT_SUFFIX_PARAM_NAME = "jakarta.faces.DEFAULT_SUFFIX"; - - /** - *

- * This is not anymore used since removal of support for Jakarta Pages. - *

- * @deprecated Use {@link #DEFAULT_FACELETS_SUFFIX} instead. - */ - @Deprecated(since = "4.0", forRemoval = true) - public static final String DEFAULT_SUFFIX = ".xhtml"; - /** *

* If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java index 676fb0f57a..7a8abe89b1 100644 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java +++ b/impl/src/main/java/jakarta/faces/component/html/HtmlInputFile.java @@ -50,11 +50,6 @@ public HtmlInputFile() { protected enum PropertyKeys { accept, accesskey, dir, disabled, label, lang, multiple, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, role, style, styleClass, tabindex, title, - @Deprecated(since = "4.0", forRemoval = true) alt, - @Deprecated(since = "4.0", forRemoval = true) autocomplete, - @Deprecated(since = "4.0", forRemoval = true) maxlength, - @Deprecated(since = "4.0", forRemoval = true) readonly, - @Deprecated (since = "4.0", forRemoval = true)size, ; String toString; @@ -132,68 +127,6 @@ public void setAccept(java.lang.String accept) { handleAttribute(this, "accept", accept); } - /** - *

- * Return the value of the alt property. - *

- *

- * Contents: Alternate textual description of the element rendered by this component. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

- * Set the value of the alt property. - *

- * - * @param alt the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - - /** - *

- * Return the value of the autocomplete property. - *

- *

- * Contents: If the value of this attribute is "off", render "off" as the value of the attribute. This indicates that - * the browser should disable its autocomplete feature for this component. This is useful for components that perform - * autocompletion and do not want the browser interfering. If this attribute is not set or the value is "on", render - * nothing. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAutocomplete() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.autocomplete); - - } - - /** - *

- * Set the value of the autocomplete property. - *

- * - * @param autocomplete the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAutocomplete(java.lang.String autocomplete) { - getStateHelper().put(PropertyKeys.autocomplete, autocomplete); - } - /** *

* Return the value of the dir property. @@ -340,36 +273,6 @@ public void setMultiple(boolean multiple) { handleAttribute(this, "multiple", multiple); } - /** - *

- * Return the value of the maxlength property. - *

- *

- * Contents: The maximum number of characters that may be entered in this field. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public int getMaxlength() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.maxlength, Integer.MIN_VALUE); - - } - - /** - *

- * Set the value of the maxlength property. - *

- * - * @param maxlength the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setMaxlength(int maxlength) { - getStateHelper().put(PropertyKeys.maxlength, maxlength); - handleAttribute(this, "maxlength", maxlength); - } - /** *

* Return the value of the onblur property. @@ -761,37 +664,6 @@ public void setOnselect(java.lang.String onselect) { handleAttribute(this, "onselect", onselect); } - /** - *

- * Return the value of the readonly property. - *

- *

- * Contents: Flag indicating that this component will prohibit changes by the user. The element may receive focus unless - * it has also been disabled. A value of false causes no attribute to be rendered, while a value of true causes the - * attribute to be rendered as readonly="readonly". - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public boolean isReadonly() { - return (java.lang.Boolean) getStateHelper().eval(PropertyKeys.readonly, false); - - } - - /** - *

- * Set the value of the readonly property. - *

- * - * @param readonly the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setReadonly(boolean readonly) { - getStateHelper().put(PropertyKeys.readonly, readonly); - } - /** *

* Return the value of the role property. @@ -832,36 +704,6 @@ public void setRole(java.lang.String role) { handleAttribute(this, "role", role); } - /** - *

- * Return the value of the size property. - *

- *

- * Contents: The number of characters used to determine the width of this field. - * - * @return the value of the property - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public int getSize() { - return (java.lang.Integer) getStateHelper().eval(PropertyKeys.size, Integer.MIN_VALUE); - - } - - /** - *

- * Set the value of the size property. - *

- * - * @param size the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setSize(int size) { - getStateHelper().put(PropertyKeys.size, size); - handleAttribute(this, "size", size); - } - /** *

* Return the value of the style property. diff --git a/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java b/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java index e7a7bc3b39..0a7fc1232e 100644 --- a/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java +++ b/impl/src/main/java/jakarta/faces/component/html/HtmlInputSecret.java @@ -58,7 +58,6 @@ public HtmlInputSecret() { protected enum PropertyKeys { accesskey, autocomplete, dir, disabled, label, lang, maxlength, onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onselect, readonly, redisplay, role, size, style, styleClass, tabindex, title, - @Deprecated(since = "4.0", forRemoval = true) alt, ; String toString; @@ -102,37 +101,6 @@ public void setAccesskey(java.lang.String accesskey) { handleAttribute(this, "accesskey", accesskey); } - /** - *

- * Return the value of the alt property. - *

- * - * @return the property value - *

- * Contents: Alternate textual description of the element rendered by this component. - * - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public java.lang.String getAlt() { - return (java.lang.String) getStateHelper().eval(PropertyKeys.alt); - - } - - /** - *

- * Set the value of the alt property. - *

- * - * @param alt the new property value - * @deprecated This attribute is actually not specified in HTML. Do not use it on this component. - */ - @Deprecated(since = "4.0", forRemoval = true) - public void setAlt(java.lang.String alt) { - getStateHelper().put(PropertyKeys.alt, alt); - handleAttribute(this, "alt", alt); - } - /** *

* Return the value of the autocomplete property.