You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by pa...@apache.org on 2022/10/07 22:08:52 UTC

[myfaces] branch main updated: MYFACES-4474: remove setType validation

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

paulnicolucci pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/main by this push:
     new 0ee465fa5 MYFACES-4474: remove setType validation
     new e74edfdbf Merge pull request #330 from pnicolucci/MYFACES-4474-Faces40
0ee465fa5 is described below

commit 0ee465fa505e0ef23d6483c51bde048d68716e3a
Author: Paul Nicolucci <pn...@gmail.com>
AuthorDate: Thu Oct 6 15:57:33 2022 -0400

    MYFACES-4474: remove setType validation
---
 api/src/main/java/jakarta/faces/convert/NumberConverter.java | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/api/src/main/java/jakarta/faces/convert/NumberConverter.java b/api/src/main/java/jakarta/faces/convert/NumberConverter.java
index 39ce4748a..f8ef42636 100755
--- a/api/src/main/java/jakarta/faces/convert/NumberConverter.java
+++ b/api/src/main/java/jakarta/faces/convert/NumberConverter.java
@@ -29,7 +29,6 @@ import java.util.Currency;
 import java.util.Locale;
 
 import jakarta.el.ValueExpression;
-import jakarta.faces.FacesException;
 import jakarta.faces.component.PartialStateHolder;
 import jakarta.faces.component.UIComponent;
 import jakarta.faces.context.FacesContext;
@@ -573,12 +572,6 @@ public class NumberConverter implements Converter, PartialStateHolder
 
     public void setType(String type)
     {
-        if (type != null && type.length() > 0
-                && (!"number".equals(type) && !"currency".equals(type) && !"percent".equals(type)))
-        {
-            throw new FacesException("Uknown type: " + type);
-        }
-        
         _type = type;
         clearInitialState();
     }