(tomcat) branch main updated: Fix copy/paste error
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 6f80d5da92 Fix copy/paste error 6f80d5da92 is described below commit 6f80d5da92ba080b42d763508b43a1c09df5f0da Author: Mark Thomas AuthorDate: Wed Jun 26 15:25:43 2024 +0100 Fix copy/paste error --- test/org/apache/catalina/core/TestAprLifecycleListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/org/apache/catalina/core/TestAprLifecycleListener.java b/test/org/apache/catalina/core/TestAprLifecycleListener.java index fa7fd319ba..27653f58be 100644 --- a/test/org/apache/catalina/core/TestAprLifecycleListener.java +++ b/test/org/apache/catalina/core/TestAprLifecycleListener.java @@ -71,7 +71,7 @@ public class TestAprLifecycleListener { Tomcat tomcat2 = new Tomcat(); Path base2 = Files.createTempDirectory(tmpDir, "tomcat2-"); -tomcat1.setBaseDir(base2.toAbsolutePath().toString()); +tomcat2.setBaseDir(base2.toAbsolutePath().toString()); tomcat2.setPort(0); TesterSupport.initSsl(tomcat2); TesterSupport.configureSSLImplementation(tomcat2, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix copy/paste error & simplify
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 2dcf2acc25 Fix copy/paste error & simplify 2dcf2acc25 is described below commit 2dcf2acc254e5d9199a1f3e9a2eb2e06dd5c83de Author: Mark Thomas AuthorDate: Wed Jun 14 09:10:07 2023 +0100 Fix copy/paste error & simplify --- java/org/apache/tomcat/util/net/AbstractEndpoint.java | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/java/org/apache/tomcat/util/net/AbstractEndpoint.java b/java/org/apache/tomcat/util/net/AbstractEndpoint.java index 1001e5490c..13114d7552 100644 --- a/java/org/apache/tomcat/util/net/AbstractEndpoint.java +++ b/java/org/apache/tomcat/util/net/AbstractEndpoint.java @@ -426,18 +426,16 @@ public abstract class AbstractEndpoint { if (certificate.getStoreType() == StoreType.PEM) { // PEM file based -String keySource = certificate.getCertificateKeystoreFile(); -keySource = certificate.getCertificateKeyFile(); -certificateInfo = sm.getString("endpoint.tls.info.cert.pem", keySource, certificate.getCertificateFile(), -certificate.getCertificateChainFile()); +certificateInfo = sm.getString("endpoint.tls.info.cert.pem", certificate.getCertificateKeyFile(), +certificate.getCertificateFile(), certificate.getCertificateChainFile()); } else { // Keystore based -String keyStore = certificate.getCertificateKeystoreFile(); String keyAlias = certificate.getCertificateKeyAlias(); if (keyAlias == null) { keyAlias = SSLUtilBase.DEFAULT_KEY_ALIAS; } -certificateInfo = sm.getString("endpoint.tls.info.cert.keystore", keyStore, keyAlias); +certificateInfo = +sm.getString("endpoint.tls.info.cert.keystore", certificate.getCertificateKeystoreFile(), keyAlias); } String trustStoreSource = sslHostConfig.getTruststoreFile(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix copy/paste error
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 9bcdbc4d41 Fix copy/paste error 9bcdbc4d41 is described below commit 9bcdbc4d41585396e5eabd849acd5252677472db Author: Mark Thomas AuthorDate: Thu Jan 12 22:23:30 2023 + Fix copy/paste error --- test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java b/test/org/apache/catalina/tribes/TesterMulticast.java index 3e85687eea..10bb48bbb2 100644 --- a/test/org/apache/catalina/tribes/TesterMulticast.java +++ b/test/org/apache/catalina/tribes/TesterMulticast.java @@ -18,8 +18,8 @@ package org.apache.catalina.tribes; import java.net.DatagramPacket; import java.net.InetAddress; +import java.net.InetSocketAddress; import java.net.MulticastSocket; -import java.net.NetworkInterface; import java.net.StandardSocketOptions; import java.net.UnknownHostException; @@ -83,8 +83,7 @@ public class TesterMulticast { public void run() { try (MulticastSocket s = new MulticastSocket(PORT)) { s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, Boolean.TRUE); -NetworkInterface networkInterface = NetworkInterface.getByInetAddress(INET_ADDRESS); -s.setNetworkInterface(networkInterface); +s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null); DatagramPacket p = new DatagramPacket(new byte[4], 4); p.setAddress(INET_ADDRESS); p.setPort(PORT); @@ -111,8 +110,7 @@ public class TesterMulticast { public void run() { try (MulticastSocket s = new MulticastSocket(PORT)) { s.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, Boolean.TRUE); -NetworkInterface networkInterface = NetworkInterface.getByInetAddress(INET_ADDRESS); -s.setNetworkInterface(networkInterface); +s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null); DatagramPacket p = new DatagramPacket(new byte[4], 4); p.setAddress(INET_ADDRESS); p.setPort(PORT); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix copy/paste error
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 352a55934b Fix copy/paste error 352a55934b is described below commit 352a55934bb8198db7249fde6f9cfb2a8053b285 Author: Mark Thomas AuthorDate: Tue May 10 16:09:38 2022 +0100 Fix copy/paste error --- java/org/apache/catalina/filters/CsrfPreventionFilter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/org/apache/catalina/filters/CsrfPreventionFilter.java b/java/org/apache/catalina/filters/CsrfPreventionFilter.java index c4bab4818f..569f583617 100644 --- a/java/org/apache/catalina/filters/CsrfPreventionFilter.java +++ b/java/org/apache/catalina/filters/CsrfPreventionFilter.java @@ -262,7 +262,8 @@ public class CsrfPreventionFilter extends CsrfPreventionFilterBase { * cache. Unused by the default implementation. * @param session The session associated with the request. * - * @return A newly created {@link NonceCache} + * @return The {@link NonceCache} currently associated with the request + * and/or session */ protected NonceCache getNonceCache(HttpServletRequest request, HttpSession session) { @SuppressWarnings("unchecked") - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix copy/paste error
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 c3bd12d Fix copy/paste error c3bd12d is described below commit c3bd12dad649a211f981a0674625d2a45b768491 Author: Mark Thomas AuthorDate: Thu Feb 10 17:11:56 2022 + Fix copy/paste error --- java/org/apache/tomcat/util/net/Nio2Endpoint.java | 6 +++--- java/org/apache/tomcat/util/net/NioEndpoint.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/org/apache/tomcat/util/net/Nio2Endpoint.java b/java/org/apache/tomcat/util/net/Nio2Endpoint.java index 01f3c46..a5ad04a 100644 --- a/java/org/apache/tomcat/util/net/Nio2Endpoint.java +++ b/java/org/apache/tomcat/util/net/Nio2Endpoint.java @@ -86,7 +86,7 @@ public class Nio2Endpoint extends AbstractJsseEndpoint nioChannels; private SocketAddress previousAcceptedSocketRemoteAddress = null; -private long previouspreviousAcceptedSocketNanoTime = 0; +private long previousAcceptedSocketNanoTime = 0; // - Public Methods @@ -369,11 +369,11 @@ public class Nio2Endpoint extends AbstractJsseEndpoint private SynchronizedStack nioChannels; private SocketAddress previousAcceptedSocketRemoteAddress = null; -private long previouspreviousAcceptedSocketNanoTime = 0; +private long previousAcceptedSocketNanoTime = 0; // - Properties @@ -523,11 +523,11 @@ public class NioEndpoint extends AbstractJsseEndpoint SocketAddress currentRemoteAddress = result.getRemoteAddress(); long currentNanoTime = System.nanoTime(); if (currentRemoteAddress.equals(previousAcceptedSocketRemoteAddress) && -currentNanoTime - previouspreviousAcceptedSocketNanoTime < 1000) { +currentNanoTime - previousAcceptedSocketNanoTime < 1000) { throw new IOException(sm.getString("endpoint.err.duplicateAccept")); } previousAcceptedSocketRemoteAddress = currentRemoteAddress; -previouspreviousAcceptedSocketNanoTime = currentNanoTime; +previousAcceptedSocketNanoTime = currentNanoTime; } return result; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch main updated: Fix copy/paste error
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 4777f30 Fix copy/paste error 4777f30 is described below commit 4777f307dee44385a88bc1fe06c7a2e9a5baa11b Author: Mark Thomas AuthorDate: Fri Sep 17 22:09:16 2021 +0100 Fix copy/paste error --- java/org/apache/el/parser/AstValue.java | 12 +--- test/org/apache/el/TestMethodExpressionImpl.java | 13 + 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/java/org/apache/el/parser/AstValue.java b/java/org/apache/el/parser/AstValue.java index 5a07ef4..06a952e 100644 --- a/java/org/apache/el/parser/AstValue.java +++ b/java/org/apache/el/parser/AstValue.java @@ -215,13 +215,11 @@ public final class AstValue extends SimpleNode { Target t = getTarget(ctx); Class[] types = null; if (isParametersProvided()) { -if (isParametersProvided()) { -Object[] values = ((AstMethodParameters) this.jjtGetChild( -this.jjtGetNumChildren() - 1)).getParameters(ctx); -types = getTypesFromValues(values); -} else { -types = paramTypes; -} +Object[] values = ((AstMethodParameters) this.jjtGetChild( +this.jjtGetNumChildren() - 1)).getParameters(ctx); +types = getTypesFromValues(values); +} else { +types = paramTypes; } Method m = ReflectionUtil.getMethod(ctx, t.base, t.property, types, null); return new MethodInfo(m.getName(), m.getReturnType(), m.getParameterTypes()); diff --git a/test/org/apache/el/TestMethodExpressionImpl.java b/test/org/apache/el/TestMethodExpressionImpl.java index 53816ba..2ad619e 100644 --- a/test/org/apache/el/TestMethodExpressionImpl.java +++ b/test/org/apache/el/TestMethodExpressionImpl.java @@ -775,4 +775,17 @@ public class TestMethodExpressionImpl { Assert.assertEquals(1, mi.getParamTypes().length); Assert.assertEquals(String.class, mi.getParamTypes()[0]); } + + +@Test +public void testGetMethodInfo02() throws Exception { +MethodExpression me = factory.createMethodExpression(context, +"#{beanA.setName}", null, new Class[] { String.class } ); +// This is the call that failed +MethodInfo mi = me.getMethodInfo(context); +// The rest is to check it worked correctly +Assert.assertEquals(void.class, mi.getReturnType()); +Assert.assertEquals(1, mi.getParamTypes().length); +Assert.assertEquals(String.class, mi.getParamTypes()[0]); +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org