Skip to content

fix: Non-breaking bug fixes, code quality improvements, and dead dependency removal#41

Merged
karlspace merged 2 commits intomainfrom
fix/deep-analysis-improvements
Mar 25, 2026
Merged

fix: Non-breaking bug fixes, code quality improvements, and dead dependency removal#41
karlspace merged 2 commits intomainfrom
fix/deep-analysis-improvements

Conversation

@karlspace
Copy link
Copy Markdown
Contributor

Summary

Ergebnis einer Tiefanalyse des Repositories — alle Änderungen sind non-breaking (keine public/protected API-Signaturen geändert).

Bug Fixes

  • Path-Bug in FileManagementUtilities.CopyDirectoryContents: String.Replace() durch sichere Substring-basierte Pfadberechnung ersetzt (verhindert fehlerhafte Pfade bei verschachtelten Verzeichnissen)
  • Thread-Safety in ConcurrentPersistentDictionary: Alle CRUD-Operationen verwenden jetzt korrektes Locking (Create+Delete war nicht atomar)
  • Resource Leak in StreamUtils.CopyRessourceToFile: FileStream wird jetzt per using var korrekt disposed
  • Bare Catch Blocks in OdbcConnectionManager (→ ArgumentException) und BGErrorTracking (→ Exception)
  • GC.SuppressFinalize in 8 IDisposable-Klassen ergänzt

Code Quality

  • Spelling: InitalizeInitialize in 6 Dateien (alle private/protected Methoden)
  • Konfigurierbarkeit: Scheduler.ShutdownTimeout (war hardcoded 30s) und CloudinaryImageManager.MaxListResults (war hardcoded 500)
  • ApplicationController.Disposevirtual für Subklassen

Dependency Cleanup

  • System.Data.SqlClient entfernt — deprecated seit 2019, hat bekannte CVEs (GHSA-98g6-xh36-x2p7), und wird in keiner einzigen .cs-Datei referenziert

Test plan

  • dotnet build — 0 Fehler, alle Target-Frameworks (net10.0, net8.0, netstandard2.0, windows)
  • dotnet test — 922 Tests bestanden (461 × net10.0 + 461 × net8.0), 0 Fehler
  • Keine public/protected API-Signaturen geändert (non-breaking)

…ndency removal

Bug fixes:
- Fix path manipulation bug in FileManagementUtilities using String.Replace
  (fragile when sourceDirectory appears as substring in nested paths)
- Fix thread-safety in ConcurrentPersistentDictionary: all CRUD operations
  now use proper locking to match the class name's contract
- Fix resource leak in StreamUtils.CopyRessourceToFile (FileStream not
  disposed on exception)
- Fix bare catch blocks in OdbcConnectionManager (catch ArgumentException
  instead of all exceptions) and BGErrorTracking (catch Exception)
- Add missing GC.SuppressFinalize to IDisposable implementations across
  8 classes (FixerIOClient, GenericAPIClient, CSVFileReader, CSVFileWriter,
  ZIPFileUtils, CloudinaryImageManager, ApplicationController,
  ConcurrentPersistentDictionary)

Code quality:
- Fix spelling: 'Initalize' → 'Initialize' in 6 files (all private methods)
- Make Scheduler.ShutdownTimeout configurable (was hardcoded 30s)
- Make CloudinaryImageManager.MaxListResults configurable (was hardcoded 500)
- Make ApplicationController.Dispose virtual for subclass overrides

Dependency cleanup:
- Remove unused System.Data.SqlClient package (deprecated, has known CVEs,
  not referenced in any source file)
@github-actions
Copy link
Copy Markdown

AI Analysis

Technical Summary

This pull request introduces a collection of non-breaking bug fixes, code quality improvements, and dependency cleanups across the repository, following an in-depth audit. No changes were made to the public or protected API signatures, ensuring backward compatibility.


Technical Requirements and Constraints

  • Maintain backward compatibility: no changes to public/protected API signatures.
  • Support multiple target frameworks (net10.0, net8.0, netstandard2.0, windows).
  • Ensure thread safety and proper resource management.
  • Remove deprecated dependencies with known vulnerabilities.
  • Improve code configurability and correctness without breaking existing functionality.

Implementation Considerations

  • Bug Fixes:
    • Replacing unsafe String.Replace() calls in directory path handling with substring-based path computations avoids errors for nested directories.
    • Enforcing proper locking in ConcurrentPersistentDictionary ensures atomic CRUD operations and thread safety.
    • Applying using var blocks for file streams avoids resource leaks.
    • Replacing

This summary was automatically generated by AI to help with triage and may not be 100% accurate.

Suggested Labels: bug

@github-actions github-actions bot added the bug Something isn't working label Mar 25, 2026
- Add GC.SuppressFinalize to 4 missed IDisposable classes:
  BGLoggerNetworkListener, LockingList, FileChangesMonitor,
  ChromeWebbrowserControl
- Fix bare catch block in BGErrorTrackingConfiguration (catch Exception)
- Harden FileManagementUtilities path normalization with Path.GetFullPath
  to prevent issues with mixed separators on netstandard2.0
@karlspace karlspace merged commit 7978dd2 into main Mar 25, 2026
2 checks passed
@karlspace karlspace deleted the fix/deep-analysis-improvements branch March 25, 2026 08:38
github-actions bot pushed a commit that referenced this pull request Mar 25, 2026
## [3.0.3](v3.0.2...v3.0.3) (2026-03-25)

### 🐛 Bug Fixes

* Non-breaking bug fixes, code quality improvements, and dead dependency removal ([#41](#41)) ([7978dd2](7978dd2))
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 3.0.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant