Introduce DequeRules Refaster rule collection#1946
Conversation
|
Looks good. No mutations were possible for these changes. |
2 similar comments
|
Looks good. No mutations were possible for these changes. |
|
Looks good. No mutations were possible for these changes. |
mohamedsamehsalah
left a comment
There was a problem hiding this comment.
From my days of preparing for solving coding algorithms, that set of rules change a lot of the common terminology used 😄
But if I think about it, being more "explicit" about what each API does also makes things easier and alleviates some assumptions.
| static final class DequeAddFirst<S, T extends S> { | ||
| @BeforeTemplate | ||
| void before(Deque<S> deque, T element) { | ||
| deque.push(element); |
There was a problem hiding this comment.
Some people think of Deque as a replacement for Stack interface; wouldn't push (and pop) keywords be more relevant here? 🤔
There was a problem hiding this comment.
Yes, that's a fair concern. My thinking is that the suggestions here will make the intent of the code clear in all cases, independently from (a) the specific combination of operations applied in a given context and (b) whether the user is familiar with stack operations.
It wouldn't surprise me if this change receives some pushback... let's see. 🤞
96f070e to
67d7d5f
Compare
|
Looks good. No mutations were possible for these changes. |
262f5f2 to
9cf3ff4
Compare
|
Looks good. No mutations were possible for these changes. |
9cf3ff4 to
5a11037
Compare
|
Looks good. No mutations were possible for these changes. |
5a11037 to
7820b05
Compare
7820b05 to
77afb73
Compare
|
/integration-test --> Build 🔴 |
|
Suggested commit message: |
|
Looks good. No mutations were possible for these changes. |
|
Looks good. No mutations were possible for these changes. |
|
Looks good. No mutations were possible for these changes. |
|
Interesting, for r += item.g;
}
while (i < toIndex) {
- samples.addLast(new Sample(sortedBuffer[i], 0));
+ samples.add(new Sample(sortedBuffer[i], 0));
i++;
n++;
}
commit 3d0ba102bec88df0c27faf3e539084511408f44e
Author: Rick Ossendrijver <rick.ossendrijver@gmail.com>
Date: Fri Nov 28 13:34:35 2025 +0100
minor: Apply patches
diff --git a/prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.java b/prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuanti
les.java
index c16383f..ab99c21 100644
--- a/prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.java
+++ b/prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/metrics/CKMSQuantiles.java
@@ -110,7 +110,7 @@ final class CKMSQuantiles {
r += item.g;
}
while (i < toIndex) {
- samples.add(new Sample(sortedBuffer[i], 0));
+ samples.addLast(new Sample(sortedBuffer[i], 0));
i++;
n++;
}Didn't investigate further yet. |
|
Was in meetings mostly so saw a nice opportunity for Windsurf 😄. Created a new matcher. Think makes sense as there is this overlap for this specific method on both of the types. |
|
Looks good. All 2 mutations in this change were killed.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
|
/integration-test -> build ✔️ |
|
Looks good. All 2 mutations in this change were killed.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
|
81a0355 to
3d971ed
Compare
|
I finally had a look at your changes; sorry for the delay @rickie. I rebased and added a small commit. |
|
/integration-test -> build ✔️ |
|
Looks good. All 2 mutations in this change were killed.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
|



❗ This PR is on top of #1927. ❗Suggested commit message: