Copilot commented on code in PR #2352:
URL: https://github.com/apache/shiro/pull/2352#discussion_r2478652626


##########
core/src/test/java/org/apache/shiro/realm/activedirectory/ActiveDirectoryRealmTest.java:
##########
@@ -140,6 +140,7 @@ void testExistingUserSuffix() throws Exception {
     void testInitialization() {
         try {
             // Initialize AD Realm
+            @SuppressWarnings("deprecation")

Review Comment:
   The `@SuppressWarnings` annotation should be placed at the method level 
rather than at the local variable level. In the production code 
(`BasicIniEnvironment.java`), the same deprecation suppression is consistently 
applied at the statement or field level, but for test methods it's more 
conventional and cleaner to apply `@SuppressWarnings(\"deprecation\")` to the 
entire test method `testInitialization()`. This approach is also seen in other 
test classes like `HashedCredentialsMatcherTest.java` where the annotation is 
placed at the method level (line 98).
   ```suggestion
       @SuppressWarnings("deprecation")
       void testInitialization() {
           try {
               // Initialize AD Realm
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to