laimis commented on code in PR #830:
URL: https://github.com/apache/lucenenet/pull/830#discussion_r1165945906


##########
src/Lucene.Net.QueryParser/Surround/Query/SrndTruncQuery.cs:
##########
@@ -28,13 +29,23 @@ namespace Lucene.Net.QueryParsers.Surround.Query
     /// </summary>
     public class SrndTruncQuery : SimpleTerm
     {
+        [SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary 
suppression", Justification = "This is a SonarCloud issue")]
+        [SuppressMessage("CodeQuality", "S1699:Constructors should only call 
non-overridable methods", Justification = "Required for continuity with 
Lucene's design")]
         public SrndTruncQuery(string truncated, char unlimited, char mask)
-            : base(false) /* not quoted */
+            : this(truncated, unlimited, mask, q: false) /* not quoted */
+        {
+            TruncatedToPrefixAndPattern();
+        }
+
+        // LUCENENET specific - this is for provided for subclasses to use and 
avoid
+        // the virtual call to TruncatedToPrefixAndPattern(), which they can do
+        // in their own constructor.
+        protected SrndTruncQuery(string truncated, char unlimited, char mask, 
bool q)
+            : base(q)

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to