Copilot commented on code in PR #1060: URL: https://github.com/apache/lucenenet/pull/1060#discussion_r2286895555
########## src/Lucene.Net/Store/SimpleFSLockFactory.cs: ########## @@ -134,16 +134,16 @@ public override bool Obtain() // LUCENENET: Since WriteAllText doesn't care if the file exists or not, // we need to make that check first. We create a new IOException "failure reason" // in this case to simulate what happens in Java - if (File.Exists(lockFile.FullName)) + if (File.Exists(lockFile)) { - FailureReason = new IOException(string.Format("lockFile '{0}' alredy exists.", lockFile.FullName)); + FailureReason = new IOException($"lockFile '{lockFile}' already exists."); Review Comment: The word 'alredy' in the original error message was corrected to 'already', which is good. However, the comment indicates this is to maintain consistency with the original typo, but the fix is appropriate. ########## src/Lucene.Net.Benchmark/ByTask/Tasks/WriteLineDocTask.cs: ########## @@ -112,8 +112,8 @@ public WriteLineDocTask(PerfRunData runData, bool performWriteHeader) { throw new ArgumentException("line.file.out must be set"); } - Stream @out = StreamUtils.GetOutputStream(new FileInfo(m_fname)); - m_lineFileOut = new StreamWriter(@out, StandardCharsets.UTF_8); + Stream @out = StreamUtils.GetOutputStream(m_fname); // LUCENENET specific: changed to use string fileName instead of allocating a FileInfo (#832) + m_lineFileOut = new StreamWriter(@out, StandardCharsets.UTF_8); ; Review Comment: There is an extra semicolon at the end of the line. It should be removed. ```suggestion m_lineFileOut = new StreamWriter(@out, StandardCharsets.UTF_8); ``` -- 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