This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit b38a103ed3cda4595162ac75d43852306e011ab3 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Jun 10 14:14:59 2019 +0100 Remove unused code --- .../jasper/resources/LocalStrings.properties | 1 - .../jasper/resources/LocalStrings_es.properties | 1 - .../jasper/resources/LocalStrings_fr.properties | 1 - .../jasper/resources/LocalStrings_ja.properties | 1 - .../apache/jasper/runtime/JspRuntimeLibrary.java | 70 +++++++--------------- 5 files changed, 23 insertions(+), 51 deletions(-) diff --git a/java/org/apache/jasper/resources/LocalStrings.properties b/java/org/apache/jasper/resources/LocalStrings.properties index ecf7b69..8186424 100644 --- a/java/org/apache/jasper/resources/LocalStrings.properties +++ b/java/org/apache/jasper/resources/LocalStrings.properties @@ -35,7 +35,6 @@ jsp.error.bad.scratch.dir=The scratchDir you specified: [{0}] is unusable. jsp.error.badStandardAction=Invalid standard action jsp.error.bad_attribute=Attribute [{0}] invalid for tag [{1}] according to TLD jsp.error.bad_tag=No tag [{0}] defined in tag library imported with prefix [{1}] -jsp.error.beans.nobeaninfo=No BeanInfo for the bean of type [{0}] could be found, the class likely does not exist. jsp.error.beans.nomethod=Cannot find a method to read property [{0}] in a bean of type [{1}] jsp.error.beans.nomethod.setproperty=Cannot find a method to write property [{0}] of type [{1}] in a bean of type [{2}] jsp.error.beans.noproperty=Cannot find any information on property [{0}] in a bean of type [{1}] diff --git a/java/org/apache/jasper/resources/LocalStrings_es.properties b/java/org/apache/jasper/resources/LocalStrings_es.properties index dfd3381..cc9f205 100644 --- a/java/org/apache/jasper/resources/LocalStrings_es.properties +++ b/java/org/apache/jasper/resources/LocalStrings_es.properties @@ -35,7 +35,6 @@ jsp.error.bad.scratch.dir=El directorio de trabajo especificado: [{0}] no es uti jsp.error.badStandardAction=Acción estándar incorrecta jsp.error.bad_attribute=El atributo [{0}] no es válido según el TLD especificado jsp.error.bad_tag=No existe el tag [{0}] en la biblioteca importada con prefijo [{1}] -jsp.error.beans.nobeaninfo=No se puede encontrar BeanInfo para el bean [{0}] seguramente la clase no existe jsp.error.beans.nomethod=No puedo encontrar un método para leer la propiedad [{0}] en un bean del tipo [{1}] jsp.error.beans.nomethod.setproperty=No puedo encontrar un método para escribir la propiedad [{0}] en un bean del tipo [{2}] jsp.error.beans.noproperty=No puedo encontrar información de la propiedad [{0}] en un bean del tipo [{1}] diff --git a/java/org/apache/jasper/resources/LocalStrings_fr.properties b/java/org/apache/jasper/resources/LocalStrings_fr.properties index 6220078..5484344 100644 --- a/java/org/apache/jasper/resources/LocalStrings_fr.properties +++ b/java/org/apache/jasper/resources/LocalStrings_fr.properties @@ -35,7 +35,6 @@ jsp.error.bad.scratch.dir=Le paramètre "scratchDir" que vous avez spécifié: [ jsp.error.badStandardAction=L'action n'est pas reconnue comme une action standard. jsp.error.bad_attribute=L''attribut [{0}] est incorrect pour le tag [{1}] d''après la TLD indiquée jsp.error.bad_tag=Aucun tag [{0}] dans la bibliothèque de tag importée avec le préfixe [{1}] -jsp.error.beans.nobeaninfo=Pas d''information bean (BeanInfo) pour le bean de type [{0}] n''a pu être trouvée, la classe n''existe probablement pas. jsp.error.beans.nomethod=Impossible de trouver une méthode pour lire la propriété [{0}] dans le bean de type [{1}] jsp.error.beans.nomethod.setproperty=Impossible de trouver une méthode pour mettre à jour la propriété [{0}] de type [{1}]dans le bean de type [{2}] jsp.error.beans.noproperty==Impossible de trouver de l''information sur la propriété [{0}] dans le bean de type [{1}] diff --git a/java/org/apache/jasper/resources/LocalStrings_ja.properties b/java/org/apache/jasper/resources/LocalStrings_ja.properties index cfcec7c..0cc1de1 100644 --- a/java/org/apache/jasper/resources/LocalStrings_ja.properties +++ b/java/org/apache/jasper/resources/LocalStrings_ja.properties @@ -35,7 +35,6 @@ jsp.error.bad.scratch.dir=あなたが指定したscratchDir: [{0}] は使用で jsp.error.badStandardAction=無効な標準アクションです jsp.error.bad_attribute=TLDによると、タグ [{1}] の属性 [{0}] は無効です jsp.error.bad_tag=プレフィックス [{1}]でインポートされたタグライブラリには、タグ [{0}] は存在しません -jsp.error.beans.nobeaninfo=タイプ [{0}] のBeanにBeanInfoがないのを検出しました, クラスが存在しないかもしれません jsp.error.beans.nomethod=タイプ [{1}] のBean中の属性 [{0}] を読み込むメソッドを発見できませんでした jsp.error.beans.nomethod.setproperty=タイプ[{2}]のBeanのタイプ [{1}] の属性 [{0}] を書き込むメソッドを発見できませんでした jsp.error.beans.noproperty=タイプ [{1}] のbean中の属性 [{0}] の情報を発見できませんでした diff --git a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java index 35653e5..1ef424c 100644 --- a/java/org/apache/jasper/runtime/JspRuntimeLibrary.java +++ b/java/org/apache/jasper/runtime/JspRuntimeLibrary.java @@ -692,39 +692,26 @@ public class JspRuntimeLibrary { Method method = null; Class<?> type = null; try { - java.beans.BeanInfo info - = java.beans.Introspector.getBeanInfo(beanClass); - if ( info != null ) { - java.beans.PropertyDescriptor pd[] - = info.getPropertyDescriptors(); - for (int i = 0 ; i < pd.length ; i++) { - if ( pd[i].getName().equals(prop) ) { - method = pd[i].getWriteMethod(); - type = pd[i].getPropertyType(); - break; - } + java.beans.BeanInfo info = java.beans.Introspector.getBeanInfo(beanClass); + java.beans.PropertyDescriptor pd[] = info.getPropertyDescriptors(); + for (int i = 0 ; i < pd.length ; i++) { + if ( pd[i].getName().equals(prop) ) { + method = pd[i].getWriteMethod(); + type = pd[i].getPropertyType(); + break; } - } else { - // just in case introspection silently fails. - throw new JasperException( - Localizer.getMessage("jsp.error.beans.nobeaninfo", - beanClass.getName())); } } catch (Exception ex) { throw new JasperException (ex); } if (method == null) { if (type == null) { - throw new JasperException( - Localizer.getMessage("jsp.error.beans.noproperty", - prop, - beanClass.getName())); + throw new JasperException(Localizer.getMessage( + "jsp.error.beans.noproperty", prop, beanClass.getName())); } else { - throw new JasperException( - Localizer.getMessage("jsp.error.beans.nomethod.setproperty", - prop, - type.getName(), - beanClass.getName())); + throw new JasperException(Localizer.getMessage( + "jsp.error.beans.nomethod.setproperty", + prop, type.getName(), beanClass.getName())); } } return method; @@ -736,36 +723,25 @@ public class JspRuntimeLibrary { Method method = null; Class<?> type = null; try { - java.beans.BeanInfo info - = java.beans.Introspector.getBeanInfo(beanClass); - if ( info != null ) { - java.beans.PropertyDescriptor pd[] - = info.getPropertyDescriptors(); - for (int i = 0 ; i < pd.length ; i++) { - if ( pd[i].getName().equals(prop) ) { - method = pd[i].getReadMethod(); - type = pd[i].getPropertyType(); - break; - } + java.beans.BeanInfo info = java.beans.Introspector.getBeanInfo(beanClass); + java.beans.PropertyDescriptor pd[] = info.getPropertyDescriptors(); + for (int i = 0 ; i < pd.length ; i++) { + if (pd[i].getName().equals(prop)) { + method = pd[i].getReadMethod(); + type = pd[i].getPropertyType(); + break; } - } else { - // just in case introspection silently fails. - throw new JasperException( - Localizer.getMessage("jsp.error.beans.nobeaninfo", - beanClass.getName())); } } catch (Exception ex) { throw new JasperException (ex); } if (method == null) { if (type == null) { - throw new JasperException( - Localizer.getMessage("jsp.error.beans.noproperty", prop, - beanClass.getName())); + throw new JasperException(Localizer.getMessage( + "jsp.error.beans.noproperty", prop, beanClass.getName())); } else { - throw new JasperException( - Localizer.getMessage("jsp.error.beans.nomethod", prop, - beanClass.getName())); + throw new JasperException(Localizer.getMessage( + "jsp.error.beans.nomethod", prop, beanClass.getName())); } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org