question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Conflict with Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty extension

See original GitHub issue

This Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty extension introduced in the latest version broke one of the codebases I work on because there is a similar extension already present. It was easy enough to fully quality things where we had issues but I thought I would raise the question here: Should CollectionUtilities be internal to Microsoft.IdentityModel.Tokens?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
aaron-meyerscommented, May 2, 2023

@brentschmaltz can you please reconsider leaving this public? We just wasted a couple days hunting down build issues in Power BI which ended up being related to accidental use of this extension method. Your assembly really should not be exposing an extremely generic and easily misused extension like this. Because of the signature, this extension method even shows up on standard strings where it really should not be used in place of the static string.IsNullOrEmpty method.

Components can introduce breaking changes with a major version bump. I don’t think leaving this public is the right tradeoff - better to rip off the band-aid and prevent future misuse of this extremely broad extension method.

1reaction
brockallencommented, Oct 4, 2022

It should have been internal, that is a mistake.

Too bad this wasn’t addressed when you could. We’re now seeing conflicts as well. Why can’t you make this internal?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CollectionUtilities.IsNullOrEmpty<T>(IEnumerable<T>) ...
Checks whether enumerable is null or empty.
Read more >
c# - Why IsNullOrEmpty check of an enumerable part ...
I found a code today where an enumerable is being checked for null or empty using static IsNullOrEmpty method exposed through Microsoft.
Read more >
Incompatibility of 6.5 with existing Azure packages #1369
I've updated a few references to the 6.5 IdentityModel libraries, but a few conflicts exist, particularly around existing Azure packages.
Read more >
Version Conflict for Newtonsoft.Json and System. ...
I've been implementing the manual validation of tokens in an Azure Function using System.IdentityModel.Tokens.Jwt. Similar to the Azure ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found