(tomcat) branch main updated: Fix IDE warnings

2024-07-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 4d11d126ee Fix IDE warnings
4d11d126ee is described below

commit 4d11d126ee27b47ec7a527747e16e9e33898ba2d
Author: Mark Thomas 
AuthorDate: Thu Jul 4 13:26:54 2024 +0100

Fix IDE warnings
---
 .../tomcat/util/openssl/openssl_h_Compatibility.java   |  2 +-
 java/org/apache/tomcat/util/openssl/openssl_h_Macros.java  | 14 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
index 04578ceafd..29f39f0481 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Compatibility.java
@@ -217,7 +217,7 @@ public class openssl_h_Compatibility {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, x0, x1);
+openssl_h.traceDowncall(Holder.NAME, x0, 
Integer.valueOf(x1));
 }
 return (MemorySegment) mh$.invokeExact(x0, x1);
 } catch (Throwable ex$) {
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index 5c6101c7f4..dcb6984fe8 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -52,7 +52,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, version);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, 
Long.valueOf(version));
 }
 return (long) mh$.invokeExact(sslCtx, version);
 } catch (Throwable ex$) {
@@ -85,7 +85,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, version);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, 
Long.valueOf(version));
 }
 return (long) mh$.invokeExact(sslCtx, version);
 } catch (Throwable ex$) {
@@ -150,7 +150,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, cacheSize);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, 
Long.valueOf(cacheSize));
 }
 return (long) mh$.invokeExact(sslCtx, cacheSize);
 } catch (Throwable ex$) {
@@ -215,7 +215,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, cacheMode);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, 
Long.valueOf(cacheMode));
 }
 return (long) mh$.invokeExact(sslCtx, cacheMode);
 } catch (Throwable ex$) {
@@ -282,7 +282,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, keys, 
keyLength);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, keys, 
Long.valueOf(keyLength));
 }
 return (long) mh$.invokeExact(sslCtx, keys, keyLength);
 } catch (Throwable ex$) {
@@ -412,7 +412,7 @@ public class openssl_h_Macros {
 var mh$ = Holder.MH;
 try {
 if (openssl_h.TRACE_DOWNCALLS) {
-openssl_h.traceDowncall(Holder.NAME, sslCtx, groupsList, 
listLength);
+openssl_h.traceDowncall(Holder.NAME, sslCtx, groupsList, 
Integer.valueOf(listLength));
 }
 return (long) mh$.invokeExact(sslCtx, groupsList, listLength);
 } catch (Throwable ex$) {
@@ -463,7 +463,7 @@ public class openssl_h_Macros {
  * @return the symbol
  */
 public static MemorySegment d2i_ECPKParameters$SYMBOL() {
-return openssl_h.findOrThrow("d2i_ECPKParameters"); 
+return openssl_h.findOrThrow("d2i_ECPKParameters");
 }
 
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2024-06-25 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new bf81fb034a Fix IDE warnings
bf81fb034a is described below

commit bf81fb034a3a2c16befd7ad7b18f38b9017bf87c
Author: Mark Thomas 
AuthorDate: Tue Jun 25 17:19:53 2024 +0100

Fix IDE warnings
---
 test/org/apache/tomcat/websocket/server/TestWsServerContainer.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java 
b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
index da2492b46b..621b3741ba 100644
--- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
+++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java
@@ -485,13 +485,15 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyDecoder implements Decoder {
+@SuppressWarnings("unused")
 DummyDecoder(String ignoredParam) {
 }
 }
 
 @Test
 public void testFilterRegistrationFailure() {
-new WsServerContainer(new TesterServletContext(){
+@SuppressWarnings("unused")
+Object obj = new WsServerContainer(new TesterServletContext(){
 @Override
 public FilterRegistration.Dynamic addFilter(String filterName, 
Filter filter) {
 return null;
@@ -567,6 +569,7 @@ public class TestWsServerContainer extends 
WebSocketBaseTest {
 }
 
 private static class DummyConfigurator extends 
ServerEndpointConfig.Configurator {
+@SuppressWarnings("unused")
 DummyConfigurator(String ignoredParam) {
 }
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2024-03-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 3fab83693b Fix IDE warnings
3fab83693b is described below

commit 3fab83693bb868a46eba20474631d80c93c05e7c
Author: Mark Thomas 
AuthorDate: Tue Mar 12 11:37:15 2024 +

Fix IDE warnings
---
 java/org/apache/catalina/realm/RealmBase.java   | 2 ++
 java/org/apache/catalina/security/SecurityListener.java | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index daca9d6746..8f12552ee7 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -1288,6 +1288,8 @@ public abstract class RealmBase extends 
LifecycleMBeanBase implements Realm {
  * 
  *
  * @param args The parameters passed on the command line
+ *
+ * @throws IOException If an error occurs reading the password file
  */
 public static void main(String args[]) throws IOException {
 
diff --git a/java/org/apache/catalina/security/SecurityListener.java 
b/java/org/apache/catalina/security/SecurityListener.java
index adececd631..e92f7fbbc4 100644
--- a/java/org/apache/catalina/security/SecurityListener.java
+++ b/java/org/apache/catalina/security/SecurityListener.java
@@ -151,7 +151,7 @@ public class SecurityListener implements LifecycleListener {
 } catch (NumberFormatException nfe) {
 // Just use the default and warn the user
 log.warn(sm.getString("SecurityListener.buildDateAgeUnreadable",
-ageDays, DEFAULT_BUILD_DATE_WARNING_AGE_DAYS));
+ageDays, 
String.valueOf(DEFAULT_BUILD_DATE_WARNING_AGE_DAYS)));
 }
 }
 
@@ -235,7 +235,7 @@ public class SecurityListener implements LifecycleListener {
 old.add(Calendar.DATE, -allowedAgeDays); // Subtract X days 
from today
 
 if (buildDate.before(old.getTime())) {
-log.warn(sm.getString("SecurityListener.buildDateIsOld", 
allowedAgeDays));
+log.warn(sm.getString("SecurityListener.buildDateIsOld", 
String.valueOf(allowedAgeDays)));
 }
 } catch (ParseException pe) {
 log.warn(sm.getString("SecurityListener.buildDateUnreadable", 
buildDateString));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2024-02-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 46737c5008 Fix IDE warnings
46737c5008 is described below

commit 46737c5008f21b9612e51510472ddf7ab1b6cc7c
Author: Mark Thomas 
AuthorDate: Tue Feb 13 00:07:49 2024 +

Fix IDE warnings
---
 webapps/examples/WEB-INF/classes/RequestHeaderExample.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/webapps/examples/WEB-INF/classes/RequestHeaderExample.java 
b/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
index 451a7a1ad1..eaa2f1af53 100644
--- a/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
+++ b/webapps/examples/WEB-INF/classes/RequestHeaderExample.java
@@ -89,7 +89,7 @@ public class RequestHeaderExample extends HttpServlet {
 
 protected void renderHTML(HttpServletRequest request,
   HttpServletResponse response)
-throws IOException, ServletException
+throws IOException
 {
 ResourceBundle rb = 
ResourceBundle.getBundle("LocalStrings",request.getLocale());
 
@@ -144,7 +144,7 @@ public class RequestHeaderExample extends HttpServlet {
 }
 
 protected void renderJSON(HttpServletRequest request, HttpServletResponse 
response)
-throws IOException, ServletException
+throws IOException
 {
 response.setContentType("application/json");
 response.setCharacterEncoding("UTF-8");


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2024-02-12 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1e829dec6d Fix IDE warnings
1e829dec6d is described below

commit 1e829dec6de264b17772adfa38e5d9a4c9d5987e
Author: Mark Thomas 
AuthorDate: Mon Feb 12 14:14:53 2024 +

Fix IDE warnings
---
 java/org/apache/catalina/session/StandardManager.java | 2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java  | 2 +-
 java/org/apache/jasper/JspC.java  | 2 +-
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java | 3 ++-
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/session/StandardManager.java 
b/java/org/apache/catalina/session/StandardManager.java
index a72c2ac8a0..d35e62290c 100644
--- a/java/org/apache/catalina/session/StandardManager.java
+++ b/java/org/apache/catalina/session/StandardManager.java
@@ -223,7 +223,7 @@ public class StandardManager extends ManagerBase {
 
 // Expire all the sessions we just wrote
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("standardManager.expiringSessions", 
list.size()));
+log.debug(sm.getString("standardManager.expiringSessions", 
Integer.toString(list.size(;
 }
 for (StandardSession session : list) {
 try {
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index cf693aae32..e7dc122827 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -387,7 +387,7 @@ public class AjpProcessor extends AbstractProcessor {
 // Unexpected packet type. Unread body packets should have
 // been swallowed in finish().
 if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("ajpprocessor.unexpectedMessage", type));
+
getLog().debug(sm.getString("ajpprocessor.unexpectedMessage", 
Integer.toString(type)));
 }
 setErrorState(ErrorState.CLOSE_CONNECTION_NOW, null);
 break;
diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java
index cd955fb191..e31918cca5 100644
--- a/java/org/apache/jasper/JspC.java
+++ b/java/org/apache/jasper/JspC.java
@@ -1349,7 +1349,7 @@ public class JspC extends Task implements Options {
 @Override
 public void execute() {
 if(log.isDebugEnabled()) {
-log.debug(Localizer.getMessage("jspc.start", pages.size()));
+log.debug(Localizer.getMessage("jspc.start", 
Integer.toString(pages.size(;
 }
 
 try {
diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
index 46cfce2b8a..6099620f72 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLEngine.java
@@ -1245,7 +1245,8 @@ public final class OpenSSLEngine extends SSLEngine 
implements SSLUtil.ProtocolIn
 URL url = (new URI(urlString)).toURL();
 ocspResponse = processOCSPRequest(url, 
issuer, x509, x509ctx, localArenal);
 if (log.isDebugEnabled()) {
-
log.debug(sm.getString("engine.ocspResponse", urlString, ocspResponse));
+
log.debug(sm.getString("engine.ocspResponse", urlString,
+
Integer.toString(ocspResponse)));
 }
 } catch (MalformedURLException | 
URISyntaxException e) {
 
log.warn(sm.getString("engine.invalidOCSPURL", urlString));


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2024-02-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1d05fb1b1e Fix IDE warnings
1d05fb1b1e is described below

commit 1d05fb1b1e5bbe519b8fecfdf78387927e4b5d2d
Author: Mark Thomas 
AuthorDate: Sat Feb 3 10:48:27 2024 +

Fix IDE warnings
---
 java/org/apache/jasper/compiler/Generator.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Generator.java 
b/java/org/apache/jasper/compiler/Generator.java
index 3d3d00c248..84f1c3e9b9 100644
--- a/java/org/apache/jasper/compiler/Generator.java
+++ b/java/org/apache/jasper/compiler/Generator.java
@@ -621,7 +621,7 @@ class Generator {
 // Packages is never empty because o.a.j.Constants.STANDARD_IMPORTS
 // contains 3 packages and is always added to the imports.
 out.printin("_jspx_imports_packages = new java.util.LinkedHashSet<>(");
-out.print(Integer.valueOf(packages.size()));
+out.print(Integer.toString(packages.size()));
 out.print(");");
 out.println();
 for (String packageName : packages) {
@@ -635,7 +635,7 @@ class Generator {
 out.println();
 } else {
 out.printin("_jspx_imports_classes = new 
java.util.LinkedHashSet<>(");
-out.print(Integer.valueOf(classes.size()));
+out.print(Integer.toString(classes.size()));
 out.print(");");
 out.println();
 for (String className : classes) {


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings

2023-12-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1bea43b3a3 Fix IDE warnings
1bea43b3a3 is described below

commit 1bea43b3a3402e859e859debf4f632f8b220eae9
Author: Mark Thomas 
AuthorDate: Mon Dec 4 21:01:59 2023 +

Fix IDE warnings
---
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java | 4 +---
 java/org/apache/tomcat/util/openssl/openssl_h.java | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
index 418af902ff..d184189074 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
@@ -81,7 +81,6 @@ public class OpenSSLLibrary {
 if (OpenSSLStatus.isLibraryInitialized()) {
 return;
 }
-@SuppressWarnings("deprecation")
 long initParam = (OpenSSL_version_num() >= 0x300fL) ? 0 : 
OPENSSL_INIT_ENGINE_ALL_BUILTIN();
 OPENSSL_init_ssl(initParam, MemorySegment.NULL);
 OpenSSLStatus.setLibraryInitialized(true);
@@ -160,7 +159,6 @@ public class OpenSSLLibrary {
 }
 }
 
-@SuppressWarnings("deprecation")
 public static void init() {
 synchronized (lock) {
 
@@ -329,7 +327,7 @@ public class OpenSSLLibrary {
 }
 }
 
-@SuppressWarnings("deprecation")
+
 public static void destroy() {
 synchronized (lock) {
 if (!OpenSSLStatus.isInitialized()) {
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java 
b/java/org/apache/tomcat/util/openssl/openssl_h.java
index c95387a545..cec6621950 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -5122,7 +5122,7 @@ public class openssl_h  {
throw new AssertionError("should not reach here", ex$);
 }
 }
-private static final MemorySegment OPENSSL_FILE = 
Arena.ofAuto().allocateFrom("/tmp/jextract$17086606898854816972.h");;
+private static final MemorySegment OPENSSL_FILE = 
Arena.ofAuto().allocateFrom("/tmp/jextract$17086606898854816972.h");
 
 /**
  * {@snippet lang=c :
@@ -5182,7 +5182,7 @@ public class openssl_h  {
 public static int EVP_PKEY_DSA() {
 return EVP_PKEY_DSA;
 }
-private static final MemorySegment PEM_STRING_ECPARAMETERS = 
Arena.ofAuto().allocateFrom("EC PARAMETERS");;
+private static final MemorySegment PEM_STRING_ECPARAMETERS = 
Arena.ofAuto().allocateFrom("EC PARAMETERS");
 
 /**
  * {@snippet lang=c :


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



(tomcat) branch main updated: Fix IDE warnings.

2023-12-04 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new b0db3c9d84 Fix IDE warnings.
b0db3c9d84 is described below

commit b0db3c9d84f36e9abdffcd45fe114698f5d449e4
Author: Mark Thomas 
AuthorDate: Mon Dec 4 11:35:03 2023 +

Fix IDE warnings.

Mainly because of the Javadoc warnings but I fixed them all
---
 java/org/apache/tomcat/util/openssl/RuntimeHelper.java| 4 
 java/org/apache/tomcat/util/openssl/openssl_h.java| 4 ++--
 java/org/apache/tomcat/util/openssl/openssl_h_Macros.java | 1 +
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/tomcat/util/openssl/RuntimeHelper.java 
b/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
index 701027006a..80cea78fbd 100644
--- a/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
+++ b/java/org/apache/tomcat/util/openssl/RuntimeHelper.java
@@ -40,12 +40,8 @@ import java.lang.invoke.MethodHandles;
 final class RuntimeHelper {
 
 private static final Linker LINKER = Linker.nativeLinker();
-private static final ClassLoader LOADER = 
RuntimeHelper.class.getClassLoader();
 private static final MethodHandles.Lookup MH_LOOKUP = 
MethodHandles.lookup();
 private static final SymbolLookup SYMBOL_LOOKUP;
-private static final SegmentAllocator THROWING_ALLOCATOR = (x, y) -> {
-throw new AssertionError("should not reach here");
-};
 static final AddressLayout POINTER = ValueLayout.ADDRESS
 .withTargetLayout(MemoryLayout.sequenceLayout(MAX_VALUE, 
JAVA_BYTE));
 
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h.java 
b/java/org/apache/tomcat/util/openssl/openssl_h.java
index 75ed768320..bfd036a118 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h.java
@@ -4808,7 +4808,7 @@ public class openssl_h  {
throw new AssertionError("should not reach here", ex$);
 }
 }
-private static final MemorySegment OPENSSL_FILE = 
RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("/tmp/jextract$1835734468149172322.h");;
+private static final MemorySegment OPENSSL_FILE = 
RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("/tmp/jextract$1835734468149172322.h");
 
 /**
  * {@snippet lang=c :
@@ -4869,7 +4869,7 @@ public class openssl_h  {
 public static int EVP_PKEY_DSA() {
 return EVP_PKEY_DSA;
 }
-private static final MemorySegment PEM_STRING_ECPARAMETERS = 
RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("EC PARAMETERS");;
+private static final MemorySegment PEM_STRING_ECPARAMETERS = 
RuntimeHelper.CONSTANT_ALLOCATOR.allocateFrom("EC PARAMETERS");
 
 /**
  * {@snippet lang=c :
diff --git a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java 
b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
index 77ab94133d..3b07c23e1d 100644
--- a/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
+++ b/java/org/apache/tomcat/util/openssl/openssl_h_Macros.java
@@ -27,6 +27,7 @@ import static org.apache.tomcat.util.openssl.openssl_h.*;
 /**
  * Functional macros not handled by jextract.
  */
+@SuppressWarnings("javadoc")
 public class openssl_h_Macros {
 
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix IDE warnings

2023-09-21 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 67670faa84 Fix IDE warnings
67670faa84 is described below

commit 67670faa84aeb8fec6c3238fce893ac106cf28f9
Author: Mark Thomas 
AuthorDate: Thu Sep 21 16:33:20 2023 +0100

Fix IDE warnings
---
 java/org/apache/jasper/compiler/Node.java | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/jasper/compiler/Node.java 
b/java/org/apache/jasper/compiler/Node.java
index 5a2d2a28ea..a197251454 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -1598,7 +1598,8 @@ abstract class Node implements TagConstants {
 this.nestedScriptingVars = vec;
 break;
 default:
-throw new 
IllegalArgumentException(Localizer.getMessage("jsp.error.page.invalid.varscope",
 scope));
+throw new IllegalArgumentException(
+
Localizer.getMessage("jsp.error.page.invalid.varscope", 
Integer.valueOf(scope)));
 }
 }
 
@@ -1620,7 +1621,8 @@ abstract class Node implements TagConstants {
 vec = this.nestedScriptingVars;
 break;
 default:
-throw new 
IllegalArgumentException(Localizer.getMessage("jsp.error.page.invalid.varscope",
 scope));
+throw new IllegalArgumentException(
+
Localizer.getMessage("jsp.error.page.invalid.varscope", 
Integer.valueOf(scope)));
 }
 
 return vec;


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix IDE warnings

2023-06-13 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1224267edd Fix IDE warnings
1224267edd is described below

commit 1224267eddb4907905ca5145f2a2e660e3a08100
Author: Mark Thomas 
AuthorDate: Tue Jun 13 12:00:42 2023 +0100

Fix IDE warnings
---
 .../apache/catalina/core/TestContextNamingInfoListener.java  | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/org/apache/catalina/core/TestContextNamingInfoListener.java 
b/test/org/apache/catalina/core/TestContextNamingInfoListener.java
index 875d0a574f..65f1d47e0a 100644
--- a/test/org/apache/catalina/core/TestContextNamingInfoListener.java
+++ b/test/org/apache/catalina/core/TestContextNamingInfoListener.java
@@ -16,17 +16,17 @@
  */
 package org.apache.catalina.core;
 
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameter;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleState;
 import org.apache.catalina.deploy.NamingResourcesImpl;
@@ -67,7 +67,7 @@ public class TestContextNamingInfoListener extends 
TomcatBaseTest {
 @Parameter(2)
 public String displayName;
 @Parameter(3)
-public Boolean emptyOnRoot;
+public boolean emptyOnRoot;
 @Parameter(4)
 public String expectedContextPath;
 @Parameter(5)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix IDE warnings

2023-03-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new fc9272fe5a Fix IDE warnings
fc9272fe5a is described below

commit fc9272fe5ac58d7d770ed5838fb2a5b7d381bc3d
Author: Mark Thomas 
AuthorDate: Fri Mar 3 14:45:58 2023 +

Fix IDE warnings
---
 .../apache/catalina/valves/JsonAccessLogValve.java | 46 +++---
 java/org/apache/tomcat/util/json/JSONFilter.java   |  6 +--
 2 files changed, 25 insertions(+), 27 deletions(-)

diff --git a/java/org/apache/catalina/valves/JsonAccessLogValve.java 
b/java/org/apache/catalina/valves/JsonAccessLogValve.java
index cd48cfceb2..2a56d1763e 100644
--- a/java/org/apache/catalina/valves/JsonAccessLogValve.java
+++ b/java/org/apache/catalina/valves/JsonAccessLogValve.java
@@ -68,28 +68,28 @@ public class JsonAccessLogValve extends AccessLogValve {
 static {
 // FIXME: finalize attribute names
 Map pattern2AttributeName = new HashMap<>();
-pattern2AttributeName.put('a', "remoteAddr");
-pattern2AttributeName.put('A', "localAddr");
-pattern2AttributeName.put('b', "size"); /* byteSent -> size */
-pattern2AttributeName.put('B', "byteSentNC");
-pattern2AttributeName.put('D', "elapsedTime");
-pattern2AttributeName.put('F', "firstByteTime");
-pattern2AttributeName.put('h', "host");
-pattern2AttributeName.put('H', "protocol");
-pattern2AttributeName.put('l', "logicalUserName");
-pattern2AttributeName.put('m', "method");
-pattern2AttributeName.put('p', "port");
-pattern2AttributeName.put('q', "query");
-pattern2AttributeName.put('r', "request");
-pattern2AttributeName.put('s', "statusCode");
-pattern2AttributeName.put('S', "sessionId");
-pattern2AttributeName.put('t', "time"); /* dateTime -> time */
-pattern2AttributeName.put('T', "elapsedTimeS");
-pattern2AttributeName.put('u', "user");
-pattern2AttributeName.put('U', "path"); /* requestURI -> path */
-pattern2AttributeName.put('v', "localServerName");
-pattern2AttributeName.put('I', "threadName");
-pattern2AttributeName.put('X', "connectionStatus");
+pattern2AttributeName.put(Character.valueOf('a'), "remoteAddr");
+pattern2AttributeName.put(Character.valueOf('A'), "localAddr");
+pattern2AttributeName.put(Character.valueOf('b'), "size"); /* byteSent 
-> size */
+pattern2AttributeName.put(Character.valueOf('B'), "byteSentNC");
+pattern2AttributeName.put(Character.valueOf('D'), "elapsedTime");
+pattern2AttributeName.put(Character.valueOf('F'), "firstByteTime");
+pattern2AttributeName.put(Character.valueOf('h'), "host");
+pattern2AttributeName.put(Character.valueOf('H'), "protocol");
+pattern2AttributeName.put(Character.valueOf('l'), "logicalUserName");
+pattern2AttributeName.put(Character.valueOf('m'), "method");
+pattern2AttributeName.put(Character.valueOf('p'), "port");
+pattern2AttributeName.put(Character.valueOf('q'), "query");
+pattern2AttributeName.put(Character.valueOf('r'), "request");
+pattern2AttributeName.put(Character.valueOf('s'), "statusCode");
+pattern2AttributeName.put(Character.valueOf('S'), "sessionId");
+pattern2AttributeName.put(Character.valueOf('t'), "time"); /* dateTime 
-> time */
+pattern2AttributeName.put(Character.valueOf('T'), "elapsedTimeS");
+pattern2AttributeName.put(Character.valueOf('u'), "user");
+pattern2AttributeName.put(Character.valueOf('U'), "path"); /* 
requestURI -> path */
+pattern2AttributeName.put(Character.valueOf('v'), "localServerName");
+pattern2AttributeName.put(Character.valueOf('I'), "threadName");
+pattern2AttributeName.put(Character.valueOf('X'), "connectionStatus");
 PATTERNS = Collections.unmodifiableMap(pattern2AttributeName);
 }
 
@@ -117,7 +117,7 @@ public class JsonAccessLogValve extends AccessLogValve {
 @Override
 protected AccessLogElement createAccessLogElement(char pattern) {
 AccessLogElement ale = super.createAccessLogElement(pattern);
-String attributeName = PATTERNS.get(pattern);
+String attributeName = PATTERNS.get(Character.valueOf(pattern));
 if (attributeName == null) {
 attributeName = "other-" + new String(JSONFilter.escape(pattern));
 }
diff --git a/java/org/apache/tomcat/util/json/JSONFilter.java 
b/java/org/apache/tomcat/util/json/JSONFilter.java
index 43c23f331b..176867407d 100644
--- a/java/org/apache/tomcat/util/json/JSONFilter.java
+++ b/java/org/apache/tomcat/util/json/JSONFilter.java
@@ -29,8 +29,7 @@ public class JSONFilter {
  * @return a char array with the escaped sequence
  */
 public static