Skip to content

Conversation

@ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 30, 2025

Summary

  • Fixed 32 instances of variable hiding identified by static analysis
  • Changed parameter names in ExtendedPatternLayout.Builder methods to avoid shadowing instance fields
  • Updated local variable names in test classes to prevent hiding of test fixture fields

Changes Made

ExtendedPatternLayout.java

  • Changed parameter names in all Builder setter methods:
    • patternpatternValue
    • patternSelectorselector
    • configurationconfig
    • regexReplacementreplacement
    • charsetcharsetValue
    • alwaysWriteExceptionswriteExceptions
    • disableAnsidisable
    • noConsoleNoAnsinoAnsi
    • headerheaderValue
    • footerfooterValue
  • Updated all corresponding Javadoc @param annotations

ExtendedPatternLayoutTest.java

  • Renamed local variable layout to testLayout in 3 test methods to avoid hiding the instance field

ModifiableBigIntegerTest.java

  • Renamed local variables integer1 and integer2 to testInteger1 and testInteger2 in 4 test methods to avoid hiding instance fields

Test Plan

  • All existing tests pass
  • Code compiles without warnings
  • Spotless formatting applied successfully

- Fixed parameter names in ExtendedPatternLayout.Builder methods to avoid hiding fields
- Updated corresponding Javadoc @param names to match new parameter names
- Fixed local variable names in ExtendedPatternLayoutTest to avoid hiding field 'layout'
- Fixed local variable names in ModifiableBigIntegerTest to avoid hiding fields 'integer1' and 'integer2'

These changes address all 32 variable hiding warnings identified by static analysis.
@ic0ns ic0ns closed this Jun 30, 2025
@ic0ns ic0ns deleted the fix-variable-hiding branch June 30, 2025 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants