Skip to content

Conversation

@ic0ns
Copy link
Contributor

@ic0ns ic0ns commented Jun 30, 2025

Summary

  • Fixed variable hiding issues in BulkScanWorkerManager and MongoPersistenceProvider
  • Renamed conflicting local variables and parameters to resolve shadowing warnings
  • Addresses issue Add comprehensive unit tests for Crawler-Core #17 regarding variable hiding in three locations

Changes

  1. BulkScanWorkerManager.java: Renamed local variable instance to manager in handleStatic() method to avoid shadowing the static field
  2. MongoPersistenceProvider.java:
    • Renamed parameter serializers to serializersToRegister in varargs method to avoid shadowing static field
    • Renamed parameter modules to modulesToRegister in varargs method to avoid shadowing static field

Test plan

  • Code compiles successfully with mvn clean compile
  • Spotless formatting applied and passed
  • Run existing tests to ensure no regressions
  • Verify no new variable hiding warnings in static analysis

…nceProvider

- Renamed local variable 'instance' to 'manager' in BulkScanWorkerManager.handleStatic() to avoid shadowing the static field
- Renamed parameter 'serializers' to 'serializersToRegister' in MongoPersistenceProvider.registerSerializer() to avoid shadowing the static field
- Renamed parameter 'modules' to 'modulesToRegister' in MongoPersistenceProvider.registerModule() to avoid shadowing the static field

These changes resolve the variable hiding warnings identified in issue #17.
@ic0ns ic0ns merged commit 93d3e70 into main Jun 30, 2025
11 checks passed
@ic0ns ic0ns deleted the fix-variable-hiding-issue branch June 30, 2025 08:41
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.

2 participants