Skip to content

Commit bf3f050

Browse files
paulirwinclaude
andcommitted
BytesRef: Use Utf8ToStringWithFallback in DebuggerDisplay, #1024
Changed DebuggerDisplay attribute to use Utf8ToStringWithFallback() instead of Utf8ToString() to prevent exceptions when debugging BytesRef instances that contain invalid UTF-8 sequences. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a14d540 commit bf3f050

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Lucene.Net/Util/BytesRef.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace Lucene.Net.Util
4444
[Serializable]
4545
#endif
4646
// LUCENENET specific: Not implementing ICloneable per Microsoft's recommendation
47-
[DebuggerDisplay("{ToString()} {Utf8ToString()}")]
47+
[DebuggerDisplay("{ToString()} {Utf8ToStringWithFallback()}")]
4848
public sealed class BytesRef : IComparable<BytesRef>, IComparable, IEquatable<BytesRef> // LUCENENET specific - implemented IComparable for FieldComparator, IEquatable<BytesRef>
4949
{
5050
/// <summary>

0 commit comments

Comments
 (0)