Skip to content

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Jan 9, 2026

Summary

Fixes the "Value can't be null. Parameter source" error that occurs when configuring the Trados plugin with "Routing as Disabled" and selecting any provider.

Root cause: The ProviderSupportsPair method was calling .Any() on provider.Pairs and provider.Symmetric arrays without null checks. Some providers may have null values for these arrays, causing an ArgumentNullException when LINQ methods are called on them.

Fix: Added null checks before calling LINQ methods on these potentially null arrays.

Review & Testing Checklist for Human

  • Build verification: This is a .NET Framework 4.6.2 project that requires Windows to build. Please verify the solution builds successfully.
  • Reproduce and verify fix: In Trados, configure the Intento plugin → Select "Routing as Disabled" → Select a provider (e.g., DeepL v2 or Google Advanced) → Click OK. Verify no error appears.
  • Regression test: Verify that providers with valid language pairs still filter correctly when language pairs are specified.
  • Test smart routing: Verify that selecting a routing option (not "Disabled") still works as expected.

Notes

  • The fix changes behavior when both Pairs and Symmetric are null: the method now returns false (provider doesn't support the pair) instead of throwing an exception. This should be the correct behavior as providers without language pair data shouldn't match any specific language pair filter.

Link to Devin run: https://app.devin.ai/sessions/285b1ea5427e4f9da6c5e25c65367475
Requested by: Vladimir Popinov (@Xapgkop4uk)


Note

Fixes a null reference error during provider filtering.

  • Adds null checks in ProviderSupportsPair for provider.Pairs and provider.Symmetric before calling Any()
  • No functional changes elsewhere aside from file newline

Written by Cursor Bugbot for commit 8ccbd67. This will update automatically on new commits. Configure here.

When routing is disabled and a provider is selected, the ProviderSupportsPair
method was calling .Any() on potentially null Pairs and Symmetric arrays,
causing 'Value can't be null. Parameter source' error.

Added null checks before calling LINQ methods on provider.Pairs and
provider.Symmetric arrays.

Co-Authored-By: Vladimir Popinov <[email protected]>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

1 participant