This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.6.x-fixes by this push:
new e930061c3c6 add missing parameter separator in createMethodSig (#3619)
e930061c3c6 is described below
commit e930061c3c6f3c2c7d60b474e64bf68ba4405faf
Author: Javid Khan <[email protected]>
AuthorDate: Fri Oct 23 01:43:43 2026 +0530
add missing parameter separator in createMethodSig (#3619)
(cherry picked from commit b5cf336721289aaf7ea87834d92dd2f50b8af9c0)
---
.../interceptor/security/SimpleAuthorizingInterceptor.java | 2 +-
.../security/SimpleAuthorizingInterceptorTest.java | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
b/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
index ba2b10bd74d..2fd195245f8 100644
---
a/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
+++
b/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
@@ -70,8 +70,8 @@ public class SimpleAuthorizingInterceptor extends
AbstractAuthorizingInIntercept
for (Class<?> cls : method.getParameterTypes()) {
if (!first) {
b.append(", ");
- first = false;
}
+ first = false;
b.append(cls.getName());
}
b.append(')');
diff --git
a/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
b/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
index 0d5bfc29c61..a5341736e24 100644
---
a/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
+++
b/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
@@ -35,6 +35,7 @@ import org.apache.cxf.service.model.BindingOperationInfo;
import org.junit.Before;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -192,11 +193,24 @@ public class SimpleAuthorizingInterceptorTest {
in.handleMessage(message);
}
+ @Test
+ public void testMethodSignatureRoles() throws Exception {
+ Method transfer = TestService.class.getMethod("transfer",
String.class, long.class);
+ SimpleAuthorizingInterceptor in = new SimpleAuthorizingInterceptor();
+ in.setMethodRolesMap(Collections.singletonMap("void
transfer(java.lang.String, long)", "admin"));
+ assertEquals(Collections.singletonList("admin"),
in.getExpectedRoles(transfer));
+ }
+
private static final class TestService {
@SuppressWarnings("unused")
public void echo() {
}
+
+ @SuppressWarnings("unused")
+ public void transfer(String account, long amount) {
+
+ }
}
private static final class IncompleteSecurityContext implements
SecurityContext {