Skip to content

Commit af1e1f3

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 5686738 commit af1e1f3

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
@@ -45,7 +45,7 @@ namespace Lucene.Net.Util
4545
[Serializable]
4646
#endif
4747
// LUCENENET specific: Not implementing ICloneable per Microsoft's recommendation
48-
[DebuggerDisplay("{ToString()} {Utf8ToString()}")]
48+
[DebuggerDisplay("{ToString()} {Utf8ToStringWithFallback()}")]
4949
public sealed class BytesRef : IComparable<BytesRef>, IComparable, IEquatable<BytesRef> // LUCENENET specific - implemented IComparable for FieldComparator, IEquatable<BytesRef>
5050
{
5151
/// <summary>

0 commit comments

Comments
 (0)