EdgarRamirezFuentes commented on issue #1005:
URL: https://github.com/apache/shiro/issues/1005#issuecomment-1638222711

   @lprimak @bmarwell Hi! It's me again. 
   I've got a question...
   There are some checkstyle rules errors related to magic number, such as:
   **_\shiro\lang\src\main\java\org\apache\shiro\lang\codec\H64.java:53:29: 
'0xff' is a magic number. [MagicNumber]_**
   
   ```
   private static short toShort(byte b) {
         return (short) (b & 0xff);
   }
   ```
   or
   
   **_\shiro\lang\src\main\java\org\apache\shiro\lang\codec\H64.java:57:40: '4' 
is a magic number. [MagicNumber]_**
   
   ```
   if (numBytes < 1 || numBytes > 4) {
       throw new IllegalArgumentException("numBytes must be between 1 and 4.");
   }
   ```
   Should I add variable to fix this magic numbers?
   
   At the moment I just fixed easy checkstyle rules errors such as:
   
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:100:91:
 '+' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:184:82:
 '||' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:307:101:
 '+' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:308:105:
 '+' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:309:77:
 '+' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:310:104:
 '+' should be on a new line. [OperatorWrap]`
   - 
`\shiro\lang\src\main\java\org\apache\shiro\lang\codec\CodecSupport.java:312:108:
 '+' should be on a new line. [OperatorWrap]`
   
   I'll keep working on fixing checkstyle rules such as the listed before.
   
   Have a nice day!


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to