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


##########
src/Lucene.Net.Benchmark/ByTask/PerfRunData.cs:
##########
@@ -98,7 +99,15 @@ public class PerfRunData : IDisposable
         private readonly IDictionary<string, object> perfObjects = new 
Dictionary<string, object>();
 
         // constructor
-        public PerfRunData(Config config)
+        public PerfRunData(Config config) : this(config, true)
+        {    
+        }
+
+        // LUCENENET specific - added performReinit parameter to allow 
subclasses to skip reinit
+        // since it's a virtual method. Subclass can call that method itself 
if needed.
+        [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")]
+        protected PerfRunData(Config config, bool performReinit)

Review Comment:
   I will leave the ? nullable check out, looking at the original code, I don't 
think it expects config to be null:
   
   -            if (bool.Parse(config.Get("log.queries", "false")))



-- 
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