[tomcat] branch master updated: Improve error reporting for resource lookup problems
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 44b439d Improve error reporting for resource lookup problems 44b439d is described below commit 44b439da7ad49a045bd44648fca6a9faaa418292 Author: remm AuthorDate: Fri Feb 12 10:47:05 2021 +0100 Improve error reporting for resource lookup problems Since everything is allowed, it is wrong to report some random input as being a bad relative URI. --- java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java | 2 +- java/org/apache/catalina/startup/LocalStrings.properties | 2 +- webapps/docs/changelog.xml| 4 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java index f907bde..cedc1cd 100644 --- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java +++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java @@ -109,7 +109,7 @@ public class CatalinaBaseConfigurationSource implements ConfigurationSource { try { uri = getURIInternal(name); } catch (IllegalArgumentException e) { -throw new IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), e); +throw new IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name)); } // Obtain the input stream we need diff --git a/java/org/apache/catalina/startup/LocalStrings.properties b/java/org/apache/catalina/startup/LocalStrings.properties index 271ca31..27c7c9b 100644 --- a/java/org/apache/catalina/startup/LocalStrings.properties +++ b/java/org/apache/catalina/startup/LocalStrings.properties @@ -30,7 +30,7 @@ catalina.stopServer=No shutdown port configured. Shut down server through OS sig catalina.stopServer.connectException=Could not contact [{0}:{1}] (base port [{2}] and offset [{3}]). Tomcat may not be running. catalina.usage=usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] [ -generateCode [ {pathname} ] ] [ -useGeneratedCode ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=Cannot obtain URL for the relative path [{0}]. Check that catalina.base is set. +catalinaConfigurationSource.cannotObtainURL=Cannot obtain resource for specified location [{0}]: no readable file, classloader resource, or this is not a resolvable URI connector.noSetExecutor=Connector [{0}] does not support external executors. Method setExecutor(java.util.concurrent.Executor) not found. connector.noSetSSLImplementationName=Connector [{0}] does not support changing the SSL implementation. Method setSslImplementationName(String) not found. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index a71b7c8..1cc241e 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -110,6 +110,10 @@ Revert an incorrect fix for a potential resource leak that broke deployment via the Ant deploy task. (markt) + +Improve error message for failed ConfigurationSource lookups in the +Catalina implementation. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch master updated: Drop obsolete translations
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 5d830a5 Drop obsolete translations 5d830a5 is described below commit 5d830a5e60d37aff9ad8144d13f427e0ed5c76ca Author: remm AuthorDate: Fri Feb 12 10:47:58 2021 +0100 Drop obsolete translations --- java/org/apache/catalina/startup/LocalStrings_de.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_fr.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_ja.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_ko.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_zh_CN.properties | 2 -- 5 files changed, 10 deletions(-) diff --git a/java/org/apache/catalina/startup/LocalStrings_de.properties b/java/org/apache/catalina/startup/LocalStrings_de.properties index 2b7339f..083e467 100644 --- a/java/org/apache/catalina/startup/LocalStrings_de.properties +++ b/java/org/apache/catalina/startup/LocalStrings_de.properties @@ -15,8 +15,6 @@ catalina.serverStartFail=Tomcat kann nicht starten, da eine benötigte Server Komponente Startprobleme hat -catalinaConfigurationSource.cannotObtainURL=Kann URL für den relativen Pfad [{0}] nicht ermitteln. Prüfe, dass catalina.base gesetzt ist. - contextConfig.altDDNotFound=alt-dd Datei [{0}] konnte nicht gefunden werden contextConfig.applicationUrl=Kann die URL für web.xml der Applikation nicht ermitteln contextConfig.authenticatorConfigured=Es wurde ein Authenticator für Methode [{0}] konfiguriert diff --git a/java/org/apache/catalina/startup/LocalStrings_fr.properties b/java/org/apache/catalina/startup/LocalStrings_fr.properties index a0714ef..d8d2b3e 100644 --- a/java/org/apache/catalina/startup/LocalStrings_fr.properties +++ b/java/org/apache/catalina/startup/LocalStrings_fr.properties @@ -30,8 +30,6 @@ catalina.stopServer=Pas de port d'arrêt configuré, l'arrêt du serveur se fera catalina.stopServer.connectException=Impossible de se connecter à [{0} : {1}] (port de base [{2}] et offset [{3}]), Tomcat peut ne pas être en cours d''exécution catalina.usage=utilisation : java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=Impossible d''obtenir l''URL pour le chemin relatif [{0}]. Vérifiez que catalina.base est défini. - connector.noSetExecutor=Le connecteur [{0}] ne supporte pas les exécuteurs externes, la méthode setExecutor(java.util.concurrent.Executor) n''a pas été trouvée connector.noSetSSLImplementationName=Le connecteur [{0}] ne supporte pas le changement de l''implémentation SSL, car la méthode setSslImplementationName(String) n''a pas été trouvée diff --git a/java/org/apache/catalina/startup/LocalStrings_ja.properties b/java/org/apache/catalina/startup/LocalStrings_ja.properties index 4a57ae8..fb87912 100644 --- a/java/org/apache/catalina/startup/LocalStrings_ja.properties +++ b/java/org/apache/catalina/startup/LocalStrings_ja.properties @@ -28,8 +28,6 @@ catalina.stopServer=シャットダウンポートが設定されていません catalina.stopServer.connectException=[{0}:{1}] に接続できませんでした (base ポート[{2}]、offset [{3}])。Tomcatが実行中でない可能性があります。 catalina.usage=使用法:java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=相対はパス [{0}] の URL を取得できません。catalina.base が設定されていることを確かめてください。 - connector.noSetExecutor=Connector {0}]は外部エグゼキュータをサポートしていません。 メソッドsetExecutor(java.util.concurrent.Executor)が見つかりません。 connector.noSetSSLImplementationName=コネクター [{0}] は SSL 実装の変更に対応していません。setSslImplementationName(String) メソッドがありません。 diff --git a/java/org/apache/catalina/startup/LocalStrings_ko.properties b/java/org/apache/catalina/startup/LocalStrings_ko.properties index bd68886..9ab63f1 100644 --- a/java/org/apache/catalina/startup/LocalStrings_ko.properties +++ b/java/org/apache/catalina/startup/LocalStrings_ko.properties @@ -30,8 +30,6 @@ catalina.stopServer=셧다운 포트가 설정되지 않았습니다. OS 시그 catalina.stopServer.connectException=[{0}:{1}] (base 포트 [{2}] 그리고 offset [{3}])와(과) 연결할 수 없었습니다. Tomcat이 실행 중이지 않을 수 있습니다. catalina.usage=사용법: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=상대 경로 [{0}]을(를) 위한 URL을 구할 수 없습니다. catalina.base가 설정되었는지 점검하십시오. - connector.noSetExecutor=Connector [{0}]은(는) 외부 Executor들을 지원하지 않습니다. 메소드 setExecutor(java.util.concurrent.Executor)를 찾을 수 없습니다. connector.noSetSSLImplementationName=Connector [{0}]은(는) SSL 구현을 변경하는 것을 지원하지 않습니다. setSslImplementationName(String) 메소드를 찾을 수 없습니다. diff --git a/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties b/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties index 41c639a..2aa895d 100644 --- a/java/org/ap
[tomcat] branch 9.0.x updated (f735eb8 -> bc33c4f)
This is an automated email from the ASF dual-hosted git repository. remm pushed a change to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git. from f735eb8 Remove useless private static method new c9e5f90 Improve error reporting for resource lookup problems new bc33c4f Drop obsolete translations The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java | 2 +- java/org/apache/catalina/startup/LocalStrings.properties | 2 +- java/org/apache/catalina/startup/LocalStrings_de.properties | 2 -- java/org/apache/catalina/startup/LocalStrings_fr.properties | 2 -- java/org/apache/catalina/startup/LocalStrings_ja.properties | 2 -- java/org/apache/catalina/startup/LocalStrings_ko.properties | 2 -- java/org/apache/catalina/startup/LocalStrings_zh_CN.properties| 2 -- webapps/docs/changelog.xml| 4 8 files changed, 6 insertions(+), 12 deletions(-) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 01/02: Improve error reporting for resource lookup problems
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit c9e5f90e6e56b5a3e144b19479ec06423353dc3e Author: remm AuthorDate: Fri Feb 12 10:47:05 2021 +0100 Improve error reporting for resource lookup problems Since everything is allowed, it is wrong to report some random input as being a bad relative URI. --- java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java | 2 +- java/org/apache/catalina/startup/LocalStrings.properties | 2 +- webapps/docs/changelog.xml| 4 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java index f907bde..cedc1cd 100644 --- a/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java +++ b/java/org/apache/catalina/startup/CatalinaBaseConfigurationSource.java @@ -109,7 +109,7 @@ public class CatalinaBaseConfigurationSource implements ConfigurationSource { try { uri = getURIInternal(name); } catch (IllegalArgumentException e) { -throw new IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name), e); +throw new IOException(sm.getString("catalinaConfigurationSource.cannotObtainURL", name)); } // Obtain the input stream we need diff --git a/java/org/apache/catalina/startup/LocalStrings.properties b/java/org/apache/catalina/startup/LocalStrings.properties index 271ca31..27c7c9b 100644 --- a/java/org/apache/catalina/startup/LocalStrings.properties +++ b/java/org/apache/catalina/startup/LocalStrings.properties @@ -30,7 +30,7 @@ catalina.stopServer=No shutdown port configured. Shut down server through OS sig catalina.stopServer.connectException=Could not contact [{0}:{1}] (base port [{2}] and offset [{3}]). Tomcat may not be running. catalina.usage=usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] [ -generateCode [ {pathname} ] ] [ -useGeneratedCode ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=Cannot obtain URL for the relative path [{0}]. Check that catalina.base is set. +catalinaConfigurationSource.cannotObtainURL=Cannot obtain resource for specified location [{0}]: no readable file, classloader resource, or this is not a resolvable URI connector.noSetExecutor=Connector [{0}] does not support external executors. Method setExecutor(java.util.concurrent.Executor) not found. connector.noSetSSLImplementationName=Connector [{0}] does not support changing the SSL implementation. Method setSslImplementationName(String) not found. diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 9dbf03a..094e57a 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -110,6 +110,10 @@ Revert an incorrect fix for a potential resource leak that broke deployment via the Ant deploy task. (markt) + +Improve error message for failed ConfigurationSource lookups in the +Catalina implementation. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] 02/02: Drop obsolete translations
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git commit bc33c4f54b1fd6e0b89a0098e2ce63625d7aec8e Author: remm AuthorDate: Fri Feb 12 10:47:58 2021 +0100 Drop obsolete translations --- java/org/apache/catalina/startup/LocalStrings_de.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_fr.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_ja.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_ko.properties| 2 -- java/org/apache/catalina/startup/LocalStrings_zh_CN.properties | 2 -- 5 files changed, 10 deletions(-) diff --git a/java/org/apache/catalina/startup/LocalStrings_de.properties b/java/org/apache/catalina/startup/LocalStrings_de.properties index 2b7339f..083e467 100644 --- a/java/org/apache/catalina/startup/LocalStrings_de.properties +++ b/java/org/apache/catalina/startup/LocalStrings_de.properties @@ -15,8 +15,6 @@ catalina.serverStartFail=Tomcat kann nicht starten, da eine benötigte Server Komponente Startprobleme hat -catalinaConfigurationSource.cannotObtainURL=Kann URL für den relativen Pfad [{0}] nicht ermitteln. Prüfe, dass catalina.base gesetzt ist. - contextConfig.altDDNotFound=alt-dd Datei [{0}] konnte nicht gefunden werden contextConfig.applicationUrl=Kann die URL für web.xml der Applikation nicht ermitteln contextConfig.authenticatorConfigured=Es wurde ein Authenticator für Methode [{0}] konfiguriert diff --git a/java/org/apache/catalina/startup/LocalStrings_fr.properties b/java/org/apache/catalina/startup/LocalStrings_fr.properties index a0714ef..d8d2b3e 100644 --- a/java/org/apache/catalina/startup/LocalStrings_fr.properties +++ b/java/org/apache/catalina/startup/LocalStrings_fr.properties @@ -30,8 +30,6 @@ catalina.stopServer=Pas de port d'arrêt configuré, l'arrêt du serveur se fera catalina.stopServer.connectException=Impossible de se connecter à [{0} : {1}] (port de base [{2}] et offset [{3}]), Tomcat peut ne pas être en cours d''exécution catalina.usage=utilisation : java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=Impossible d''obtenir l''URL pour le chemin relatif [{0}]. Vérifiez que catalina.base est défini. - connector.noSetExecutor=Le connecteur [{0}] ne supporte pas les exécuteurs externes, la méthode setExecutor(java.util.concurrent.Executor) n''a pas été trouvée connector.noSetSSLImplementationName=Le connecteur [{0}] ne supporte pas le changement de l''implémentation SSL, car la méthode setSslImplementationName(String) n''a pas été trouvée diff --git a/java/org/apache/catalina/startup/LocalStrings_ja.properties b/java/org/apache/catalina/startup/LocalStrings_ja.properties index 4a57ae8..fb87912 100644 --- a/java/org/apache/catalina/startup/LocalStrings_ja.properties +++ b/java/org/apache/catalina/startup/LocalStrings_ja.properties @@ -28,8 +28,6 @@ catalina.stopServer=シャットダウンポートが設定されていません catalina.stopServer.connectException=[{0}:{1}] に接続できませんでした (base ポート[{2}]、offset [{3}])。Tomcatが実行中でない可能性があります。 catalina.usage=使用法:java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=相対はパス [{0}] の URL を取得できません。catalina.base が設定されていることを確かめてください。 - connector.noSetExecutor=Connector {0}]は外部エグゼキュータをサポートしていません。 メソッドsetExecutor(java.util.concurrent.Executor)が見つかりません。 connector.noSetSSLImplementationName=コネクター [{0}] は SSL 実装の変更に対応していません。setSslImplementationName(String) メソッドがありません。 diff --git a/java/org/apache/catalina/startup/LocalStrings_ko.properties b/java/org/apache/catalina/startup/LocalStrings_ko.properties index bd68886..9ab63f1 100644 --- a/java/org/apache/catalina/startup/LocalStrings_ko.properties +++ b/java/org/apache/catalina/startup/LocalStrings_ko.properties @@ -30,8 +30,6 @@ catalina.stopServer=셧다운 포트가 설정되지 않았습니다. OS 시그 catalina.stopServer.connectException=[{0}:{1}] (base 포트 [{2}] 그리고 offset [{3}])와(과) 연결할 수 없었습니다. Tomcat이 실행 중이지 않을 수 있습니다. catalina.usage=사용법: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop } -catalinaConfigurationSource.cannotObtainURL=상대 경로 [{0}]을(를) 위한 URL을 구할 수 없습니다. catalina.base가 설정되었는지 점검하십시오. - connector.noSetExecutor=Connector [{0}]은(는) 외부 Executor들을 지원하지 않습니다. 메소드 setExecutor(java.util.concurrent.Executor)를 찾을 수 없습니다. connector.noSetSSLImplementationName=Connector [{0}]은(는) SSL 구현을 변경하는 것을 지원하지 않습니다. setSslImplementationName(String) 메소드를 찾을 수 없습니다. diff --git a/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties b/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties index 41c639a..2aa895d 100644 --- a/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties +++ b/java/org/apache/catalina/startup/LocalStrings_zh_CN.properties @@ -28,8 +28,6 @@ catali
[tomcat] branch 8.5.x updated: Improve error reporting for resource lookup problems
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/8.5.x by this push: new e933605 Improve error reporting for resource lookup problems e933605 is described below commit e933605414f55ecffba43c174926e1c0759e1a40 Author: remm AuthorDate: Fri Feb 12 11:00:48 2021 +0100 Improve error reporting for resource lookup problems --- java/org/apache/tomcat/util/file/ConfigFileLoader.java | 7 ++- java/org/apache/tomcat/util/file/LocalStrings.properties | 2 +- webapps/docs/changelog.xml | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/java/org/apache/tomcat/util/file/ConfigFileLoader.java b/java/org/apache/tomcat/util/file/ConfigFileLoader.java index 54631b2..d9c1cb0 100644 --- a/java/org/apache/tomcat/util/file/ConfigFileLoader.java +++ b/java/org/apache/tomcat/util/file/ConfigFileLoader.java @@ -85,7 +85,12 @@ public class ConfigFileLoader { } // File didn't work so try URI. -URI uri = getURI(location); +URI uri = null; +try { +uri = getURI(location); +} catch (IllegalArgumentException e) { +throw new IOException(sm.getString("configFileLoader.cannotObtainURL", location)); +} // Obtain the input stream we need try { diff --git a/java/org/apache/tomcat/util/file/LocalStrings.properties b/java/org/apache/tomcat/util/file/LocalStrings.properties index 2bf0002..84e0646 100644 --- a/java/org/apache/tomcat/util/file/LocalStrings.properties +++ b/java/org/apache/tomcat/util/file/LocalStrings.properties @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -configFileLoader.cannotObtainURL=Cannot obtain URL for the relative path [{0}]. Check that catalina.base is set. +configFileLoader.cannotObtainURL=Cannot obtain resource for specified location [{0}]: no readable file or this is not a resolvable URI diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index f313899..5ca59d6 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -122,6 +122,9 @@ Avoid NullPointerException when a secure channel is closed before the SSL engine was initialized. (remm) + +Improve error message for failed ConfigFileLoader lookups. (remm) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Apache Tomcat migration tool for Jakarta EE 0.2.0
On Thu, Feb 11, 2021 at 6:47 PM Mark Thomas wrote: > The proposed Apache Tomcat migration tool for Jakarta EE 0.2.0 is now > available for voting. > > The significant changes since 0.1.0 are: > > - Various fixes to the packages that are and are not converted > > - A new option to process zip archives in memory to support zip files > that use options that are incompatible with a streaming approach > > - A new option to exclude files from transformation > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/jakartaee-migration/v0.2.0/ > > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1299/ > > The tag is: > https://github.com/apache/tomcat-jakartaee-migration/tree/0.2.0 > 041e256e92078cd3b16a9adcd77faf257e3a5c88 > > The proposed 0.2.0 release is: > > [ ] -1: Broken. Do not release because... > [X] +1: Acceptable. Go ahead and release. > Rémy > > Thanks, > > Mark > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >
[tomcat] branch master updated: 65135: Fix JMX decriptor issue
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 c4cdc27 65135: Fix JMX decriptor issue c4cdc27 is described below commit c4cdc27a74621666bdc4d14c293b641d566e5cc6 Author: remm AuthorDate: Fri Feb 12 14:40:06 2021 +0100 65135: Fix JMX decriptor issue The use of "is" is unusual, so change that to "get", which turns out to be less error prone. --- java/org/apache/catalina/Context.java | 12 +++- java/org/apache/catalina/core/StandardContext.java | 2 +- java/org/apache/catalina/startup/ContextConfig.java | 4 ++-- java/org/apache/catalina/startup/FailedContext.java | 2 +- test/org/apache/tomcat/unittest/TesterContext.java | 2 +- webapps/docs/changelog.xml | 6 ++ 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/Context.java b/java/org/apache/catalina/Context.java index 275063b..ad40de5 100644 --- a/java/org/apache/catalina/Context.java +++ b/java/org/apache/catalina/Context.java @@ -765,8 +765,18 @@ public interface Context extends Container, ContextBind { /** * @return the value of the parallel annotation scanning flag. If true, * it will dispatch scanning to the utility executor. + * @deprecated This method will be removed in Tomcat 11 onwards */ -public boolean isParallelAnnotationScanning(); +@Deprecated +public default boolean isParallelAnnotationScanning() { +return getParallelAnnotationScanning(); +} + +/** + * @return the value of the parallel annotation scanning flag. If true, + * it will dispatch scanning to the utility executor. + */ +public boolean getParallelAnnotationScanning(); /** * Set the parallel annotation scanning value. diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index abb123f..b48a284 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -1480,7 +1480,7 @@ public class StandardContext extends ContainerBase @Override -public boolean isParallelAnnotationScanning() { +public boolean getParallelAnnotationScanning() { return this.parallelAnnotationScanning; } diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index 66b58a1..bc68499 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -1379,7 +1379,7 @@ public class ContextConfig implements LifecycleListener { Map javaClassCache; -if (context.isParallelAnnotationScanning()) { +if (context.getParallelAnnotationScanning()) { javaClassCache = new ConcurrentHashMap<>(); } else { javaClassCache = new HashMap<>(); @@ -2144,7 +2144,7 @@ public class ContextConfig implements LifecycleListener { protected void processAnnotations(Set fragments, boolean handlesTypesOnly, Map javaClassCache) { -if (context.isParallelAnnotationScanning()) { +if (context.getParallelAnnotationScanning()) { processAnnotationsInParallel(fragments, handlesTypesOnly, javaClassCache); } else { for (WebXml fragment : fragments) { diff --git a/java/org/apache/catalina/startup/FailedContext.java b/java/org/apache/catalina/startup/FailedContext.java index 4fee683..e352ce2 100644 --- a/java/org/apache/catalina/startup/FailedContext.java +++ b/java/org/apache/catalina/startup/FailedContext.java @@ -832,7 +832,7 @@ public class FailedContext extends LifecycleMBeanBase implements Context { public void setDispatcherWrapsSameObject(boolean dispatcherWrapsSameObject) {} @Override -public boolean isParallelAnnotationScanning() { return false; } +public boolean getParallelAnnotationScanning() { return false; } @Override public void setParallelAnnotationScanning(boolean parallelAnnotationScanning) {} diff --git a/test/org/apache/tomcat/unittest/TesterContext.java b/test/org/apache/tomcat/unittest/TesterContext.java index 0d0e65f..4e0e362 100644 --- a/test/org/apache/tomcat/unittest/TesterContext.java +++ b/test/org/apache/tomcat/unittest/TesterContext.java @@ -1291,7 +1291,7 @@ public class TesterContext implements Context { public void setDispatcherWrapsSameObject(boolean dispatcherWrapsSameObject) {} @Override -public boolean isParallelAnnotationScanning() { return false; } +public boolean getParallelAnnotationScanning() { return false; } @Override public void setParallelAnnotationScanning(boolean parallelAnnotationScanning) {} diff --git a/webapps/docs/changelog.xml b/web
[tomcat] branch 9.0.x updated: 65135: Fix JMX decriptor issue
This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 19027d1 65135: Fix JMX decriptor issue 19027d1 is described below commit 19027d1f29317d707607f29319cace1527ad72ca Author: remm AuthorDate: Fri Feb 12 14:40:06 2021 +0100 65135: Fix JMX decriptor issue The use of "is" is unusual, so change that to "get", which turns out to be less error prone. --- java/org/apache/catalina/Context.java | 12 +++- java/org/apache/catalina/core/StandardContext.java | 2 +- java/org/apache/catalina/startup/ContextConfig.java | 4 ++-- java/org/apache/catalina/startup/FailedContext.java | 2 +- test/org/apache/tomcat/unittest/TesterContext.java | 2 +- webapps/docs/changelog.xml | 6 ++ 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/java/org/apache/catalina/Context.java b/java/org/apache/catalina/Context.java index a53b977..c2fc2c5 100644 --- a/java/org/apache/catalina/Context.java +++ b/java/org/apache/catalina/Context.java @@ -764,8 +764,18 @@ public interface Context extends Container, ContextBind { /** * @return the value of the parallel annotation scanning flag. If true, * it will dispatch scanning to the utility executor. + * @deprecated This method will be removed in Tomcat 11 onwards */ -public boolean isParallelAnnotationScanning(); +@Deprecated +public default boolean isParallelAnnotationScanning() { +return getParallelAnnotationScanning(); +} + +/** + * @return the value of the parallel annotation scanning flag. If true, + * it will dispatch scanning to the utility executor. + */ +public boolean getParallelAnnotationScanning(); /** * Set the parallel annotation scanning value. diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 6db44d3..058664c 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -1437,7 +1437,7 @@ public class StandardContext extends ContainerBase @Override -public boolean isParallelAnnotationScanning() { +public boolean getParallelAnnotationScanning() { return this.parallelAnnotationScanning; } diff --git a/java/org/apache/catalina/startup/ContextConfig.java b/java/org/apache/catalina/startup/ContextConfig.java index 5926bfc..8172a3b 100644 --- a/java/org/apache/catalina/startup/ContextConfig.java +++ b/java/org/apache/catalina/startup/ContextConfig.java @@ -1379,7 +1379,7 @@ public class ContextConfig implements LifecycleListener { Map javaClassCache; -if (context.isParallelAnnotationScanning()) { +if (context.getParallelAnnotationScanning()) { javaClassCache = new ConcurrentHashMap<>(); } else { javaClassCache = new HashMap<>(); @@ -2144,7 +2144,7 @@ public class ContextConfig implements LifecycleListener { protected void processAnnotations(Set fragments, boolean handlesTypesOnly, Map javaClassCache) { -if (context.isParallelAnnotationScanning()) { +if (context.getParallelAnnotationScanning()) { processAnnotationsInParallel(fragments, handlesTypesOnly, javaClassCache); } else { for (WebXml fragment : fragments) { diff --git a/java/org/apache/catalina/startup/FailedContext.java b/java/org/apache/catalina/startup/FailedContext.java index 21e5a81..2cffb52 100644 --- a/java/org/apache/catalina/startup/FailedContext.java +++ b/java/org/apache/catalina/startup/FailedContext.java @@ -824,7 +824,7 @@ public class FailedContext extends LifecycleMBeanBase implements Context { public boolean getCreateUploadTargets() { return false; } @Override -public boolean isParallelAnnotationScanning() { return false; } +public boolean getParallelAnnotationScanning() { return false; } @Override public void setParallelAnnotationScanning(boolean parallelAnnotationScanning) {} diff --git a/test/org/apache/tomcat/unittest/TesterContext.java b/test/org/apache/tomcat/unittest/TesterContext.java index 4c67da9..361e471 100644 --- a/test/org/apache/tomcat/unittest/TesterContext.java +++ b/test/org/apache/tomcat/unittest/TesterContext.java @@ -1290,7 +1290,7 @@ public class TesterContext implements Context { public boolean getCreateUploadTargets() { return false; } @Override -public boolean isParallelAnnotationScanning() { return false; } +public boolean getParallelAnnotationScanning() { return false; } @Override public void setParallelAnnotationScanning(boolean parallelAnnotationScanning) {} diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 094e57a..9f73402
[Bug 65135] mbeans-descriptors.xml missing attribute for parallelAnnotationScanning
https://bz.apache.org/bugzilla/show_bug.cgi?id=65135 Remy Maucherat changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Remy Maucherat --- The use of "is" is error prone here, it slipped by in a PR. The method is now using "get" instead, with a deprecated "is" still staying for a while. The fix will be in Tomcat 9.0.44 and 10.0.3. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org