Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.48.6] - 2026-05-14

### Fixed
- **PingMonitorService** — bare catch replaced with specific AggregateException
and ObjectDisposedException (CodeQL cs/catch-of-all-exceptions).
- **TracerouteMonitorService** — same bare catch fix.
- **OutputKindToBrushConverter** — simplifiable boolean expression refactored
to pattern matching (CodeQL cs/simplifiable-boolean-expression).
- **LogsViewModel** — unsafe cast from ICollectionView to CollectionView
replaced with safe as-cast with fallback (CodeQL cs/cast-from-abstract).

## [0.48.5] - 2026-05-14

### Changed
Expand Down
4 changes: 2 additions & 2 deletions SysManager/SysManager/Helpers/OutputKindToBrushConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
public sealed class BoolInverterConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
=> value is bool b ? !b : true;
=> value is not true;

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
=> value is bool b ? !b : true;
=> value is not true;
}

public class BoolToElevationBadgeBrushConverter : IValueConverter
Expand Down
4 changes: 3 additions & 1 deletion SysManager/SysManager/Services/PingMonitorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public void Stop()
lock (_stateLock)
{
_cts?.Cancel();
try { _loop?.Wait(1500); } catch { /* ignore */ }
try { _loop?.Wait(1500); }
catch (AggregateException) { /* task cancellation or faulted — expected during stop */ }
catch (ObjectDisposedException) { /* task already cleaned up */ }
_cts?.Dispose();
_cts = null;
_loop = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public void Stop()
lock (_stateLock)
{
_cts?.Cancel();
try { _loop?.Wait(3000); } catch { /* ignore */ }
try { _loop?.Wait(3000); }
catch (AggregateException) { /* task cancellation or faulted — expected during stop */ }
catch (ObjectDisposedException) { /* task already cleaned up */ }
_cts?.Dispose();
_cts = null;
_loop = null;
Expand Down
2 changes: 1 addition & 1 deletion SysManager/SysManager/ViewModels/LogsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private void UpdateVisibleCount()
{
// PERF-002: Use CollectionView.Count directly instead of iterating
// the entire filtered collection via Cast<object>().Count().
VisibleCount = ((CollectionView)EntriesView).Count;
VisibleCount = (EntriesView as CollectionView)?.Count ?? EntriesView.Cast<object>().Count();
HasNoResults = Entries.Count > 0 && VisibleCount == 0;
}

Expand Down
Loading