Skip to content

Commit

Permalink
Resolve build warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Nov 27, 2024
1 parent 6391962 commit 9c21f75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ public int PositionIncrement

// LUCENENET specific - The interface requires this to be implemented, since we added it to avoid casts.
public void CopyTo(IAttribute target) => _ = target;

public void Clear()
{
}
}

private sealed class PositionLengthAttributeAnonymousClass : IPositionLengthAttribute
Expand All @@ -136,6 +140,10 @@ public int PositionLength

// LUCENENET specific - The interface requires this to be implemented, since we added it to avoid casts.
public void CopyTo(IAttribute target) => _ = target;

public void Clear()
{
}
}

/// <summary>
Expand Down Expand Up @@ -233,4 +241,4 @@ public override void Reset()
curTermBuffer = null;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,5 @@ public interface IMorphosyntacticTagsAttribute : IAttribute
/// The default value (no-value) is null. Returns a list of POS tags corresponding to current lemma.
/// </summary>
IList<StringBuilder> Tags { get; set; }

/// <summary>Clear to default value.</summary>
void Clear();
}
}
2 changes: 1 addition & 1 deletion src/Lucene.Net/Analysis/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace Lucene.Net.Analysis
/// Failing that, to create a new <see cref="Token"/> you should first use
/// one of the constructors that starts with null text. To load
/// the token from a char[] use <see cref="ICharTermAttribute.CopyBuffer(char[], int, int)"/>.
/// To load from a <see cref="string"/> use <see cref="ICharTermAttribute.Clear()"/> (or <see cref="CharTermAttributeExtensions.SetEmpty(ICharTermAttribute)"/>) followed by
/// To load from a <see cref="string"/> use <see cref="IAttribute.Clear()"/> (or <see cref="CharTermAttributeExtensions.SetEmpty(ICharTermAttribute)"/>) followed by
/// <see cref="ICharTermAttribute.Append(string)"/> or <see cref="ICharTermAttribute.Append(string, int, int)"/>.
/// Alternatively you can get the <see cref="Token"/>'s termBuffer by calling either <see cref="ICharTermAttribute.Buffer"/>,
/// if you know that your text is shorter than the capacity of the termBuffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static ICharTermAttribute SetLength(this ICharTermAttribute termAttr, int
/// Sets the length of the termBuffer to zero.
/// Use this method before appending contents.
/// <para />
/// NOTE: This is exactly the same operation as calling <see cref="ICharTermAttribute.Clear()"/>, the primary
/// NOTE: This is exactly the same operation as calling <see cref="Lucene.Net.Util.IAttribute.Clear()"/>, the primary
/// difference is that this method returns a reference to the current object so it can be chained.
/// <code>
/// obj.SetEmpty().Append("hey you");
Expand Down

0 comments on commit 9c21f75

Please sign in to comment.