instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
yegor256__cactoos__1130 | yegor256/cactoos | 1,130 | defect | aac3b94cacdc2f5dca169713c820d382c02350d0 | c05dafd3fe16799f477556a20835ae189767d9a6 | (#1109) Make CollectionEnvelope.toString final and fix Mapped | This is for #1109: it makes `CollectionEnvelope.toString` final and simplify `Mapped` in the process.
In order for `Mapped` to be simplified, I had to align some of its behaviour with all the other classes of cactoos in the `collection` package (which all delegate to the equivalent `Iterable` implementation of the s... | diff --git a/src/main/java/org/cactoos/collection/CollectionEnvelope.java b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
index 0bbc98cece..e78ce84b0c 100644
--- a/src/main/java/org/cactoos/collection/CollectionEnvelope.java
+++ b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
@@ -143,9 +14... | 3 | 2 | 0 | [{"id": "G0", "claim": "Replace `new IterableOf<X>` with the inferred `new IterableOf<>` in Mapped.java.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The varargs constructor `Mapped(final Func<X, Y> fnc, final X... src)` needs to be unit-teste... | null |
yegor256__cactoos__1138 | yegor256/cactoos | 1,138 | defect | 337524e06f8aabe95d454c9f8348ec6c57faf9ff | d02a69e48281332a49c468ac05000f8db6b86fe4 | (#1102) toString() implementation for Immutable iterator | This is for #1102
As discussed in the issue, `toString()` implementation for `Immutable` should be delegated to its inner iterator.
| diff --git a/src/main/java/org/cactoos/iterator/Immutable.java b/src/main/java/org/cactoos/iterator/Immutable.java
index 46eb050ef8..b972f72082 100644
--- a/src/main/java/org/cactoos/iterator/Immutable.java
+++ b/src/main/java/org/cactoos/iterator/Immutable.java
@@ -58,4 +58,8 @@ public T next() {
return this.... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new test should use the project's `Assertion` matcher instead of `MatcherAssert.assertThat` to assert the delegated toString.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1145 | yegor256/cactoos | 1,145 | defect | bf47e28924a3e6421388d9d26fb911958ffcc491 | 94f70b41f2d9821d6e3d2e72e4c5f9c84fdd0772 | (#1117) Remove some more static method calls in test | This is for #1117. I've continued the work and introduced a new todo | diff --git a/src/main/java/org/cactoos/io/package-info.java b/src/main/java/org/cactoos/io/package-info.java
index 83ee3abda..7c40cef3f 100644
--- a/src/main/java/org/cactoos/io/package-info.java
+++ b/src/main/java/org/cactoos/io/package-info.java
@@ -26,7 +26,7 @@
* Input/Output.
*
* @since 0.1
- * @todo #1033:... | 1 | 1 | 0 | [{"id": "G0", "claim": "The readsFromReader test needlessly decorates BytesOf with Sticky and InputOf (a workaround for TextMatcherEnvelope calling asString() multiple times), and this should instead be fixed at the level of TextMatcherEnvelope in cactoos-matchers so the extra decorators can be avoided.", "category": "... | null |
yegor256__cactoos__1149 | yegor256/cactoos | 1,149 | defect | 3410ff4f5bba1abd5a6b96f5d96055c8a26641a7 | 012858047bb029e80aaa7e18cd4c2fa88fd4da90 | (#1024) Tee input fix | This PR fixes #1024. Reverting changes in #820 and add more javadocs with **WARNING**. | diff --git a/.gitlint b/.gitlint
index 25e14e37cc..40280c159f 100644
--- a/.gitlint
+++ b/.gitlint
@@ -1,3 +1,3 @@
--subject-regex=^\(#[0-9]+\) [^\s].{13,50}
--subject-maxlen=72
---since=2019-06-15
+--since=2019-06-25
diff --git a/pom.xml b/pom.xml
index 78cc8cbaf0..cd9987de20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1... | 3 | 3 | 0 | [{"id": "G0", "claim": "The javadoc warning should go at the class declaration of TeeInput rather than as javadoc on the close() method.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR includes a whole bunch of unrelated changes that should ... | null |
yegor256__cactoos__1153 | yegor256/cactoos | 1,153 | defect | 042cb3468af6db5f71e98bb2fd71f71b7da7a960 | e1fd98db669f7e559cccf9f0f766cae769fbdb67 | (#1133) MaxOf doesn't work with negative numbers | For #1133
- Fix `MaxOf` to work properly with negative numbers
- `MinOf` doesn't need fix. | diff --git a/src/main/java/org/cactoos/scalar/MaxOf.java b/src/main/java/org/cactoos/scalar/MaxOf.java
index 3fe59a8957..e6728ce466 100644
--- a/src/main/java/org/cactoos/scalar/MaxOf.java
+++ b/src/main/java/org/cactoos/scalar/MaxOf.java
@@ -85,7 +85,7 @@ public MaxOf(final Integer... src) {
}
... | 4 | 4 | 2 | [{"id": "G0", "claim": "The tests should use `Assertion` and the other matchers from cactoos-matchers instead of MatcherAssert/Matchers.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The assertion message should read \"must select maximum integer of pos... | null |
yegor256__cactoos__1165 | yegor256/cactoos | 1,165 | defect | d79a80ca2d6abcb0e3ed5db302ffd0dde80d6dda | 9bd9d158206602d532fb39e0adba4725a4388a62 | (#1152) Remove some more static Matcher asserts | This is for #1152.
I created the new todo for continuing into the `package-info.java` file in tests since it made more sense. | diff --git a/src/main/java/org/cactoos/io/package-info.java b/src/main/java/org/cactoos/io/package-info.java
index 7c40cef3f3..d8546fbd52 100644
--- a/src/main/java/org/cactoos/io/package-info.java
+++ b/src/main/java/org/cactoos/io/package-info.java
@@ -26,9 +26,5 @@
* Input/Output.
*
* @since 0.1
- * @todo #111... | 1 | 1 | 0 | [{"id": "G0", "claim": "Assertion messages should consistently start with a lowercase letter and be reworded to describe the expected result more precisely.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1189 | yegor256/cactoos | 1,189 | defect | ab322fbbe6937b2eb03f8357ce1a0fa0940eee39 | 3bf6e4ab7b823482236681bc2b265dd2611ae221 | (#1188) Sliced Iterator, Iterable, Collection implementations | #1188
Decorator to get a portion(slice) of:
- Iterator
- Iterable
- Collection
by providing the initial index and a max number of elements to retrieve | diff --git a/src/main/java/org/cactoos/collection/Sliced.java b/src/main/java/org/cactoos/collection/Sliced.java
new file mode 100644
index 000000000..8be595072
--- /dev/null
+++ b/src/main/java/org/cactoos/collection/Sliced.java
@@ -0,0 +1,73 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2019 Yegor Bugay... | 4 | 4 | 1 | [{"id": "G0", "claim": "The assertion reason messages in the new Sliced tests should use the form \"must...\" instead of \"Can't...\"/\"Should...\".", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new tests should use OO matchers instantiated... | null |
yegor256__cactoos__12 | yegor256/cactoos | 12 | defect | b8f6ca0696dd7f6ca143f390cc7f27a6ebc498da | 7333d292b72a1dac74a9f1dd3ef5f4c0d65e41ad | TrimText | Apache Commons `StringUtils#trim` OO analog implementation. | diff --git a/src/main/java/org/cactoos/text/TrimText.java b/src/main/java/org/cactoos/text/TrimText.java
new file mode 100644
index 000000000..5b499fe50
--- /dev/null
+++ b/src/main/java/org/cactoos/text/TrimText.java
@@ -0,0 +1,57 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Yegor Bugayenko
+ *
+ * Per... | 1 | 1 | 0 | [{"id": "G0", "claim": "The class name TrimText would be better as TrimmedText.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1209 | yegor256/cactoos | 1,209 | defect | c08b526002df9d0f7ee1704e9598eeae53f0a30f | 35feebbbf48aa265a10ee70824e3497a0c2b2290 | (#1182) Remove some more static call to assert | This is for #1182
I had to increment cactoos-matchers version to benefit from bugfixes (llorllale/cactoos-matchers#132) that were preventing tests to pass with `Assertion`. | diff --git a/pom.xml b/pom.xml
index 23bfb157ac..d4aa0d9dd7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -91,7 +91,7 @@ The MIT License (MIT)
<dependency>
<groupId>org.llorllale</groupId>
<artifactId>cactoos-matchers</artifactId>
- <version>0.17</version>
+ <version>0.18</version>
<scope>te... | 3 | 2 | 0 | [{"id": "G0", "claim": "In the readsEmpty test of ReaderOfTest it would be better to create a constant holding the empty string instead of repeating the \"\" literal.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The assertion messages should b... | null |
yegor256__cactoos__1216 | yegor256/cactoos | 1,216 | defect | 5e0da3093e75d4e583f88a137140e14cb505d652 | 801c5cd92284cd2006400a9990b3d659fc07c13b | (#1184) CollectionEnvelope is just an envelope | This is for #1184
I had to work around all the strange behaviours that crept in the collection package for some time. There were many incoherence between javadoc, behaviour, different implementations of `Collection`, etc.
This is what I did:
- as with `IterableEnvelope`, I moved out of the envelope everything t... | diff --git a/src/main/java/org/cactoos/collection/CollectionEnvelope.java b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
index d3aac28650..0bc3d1860b 100644
--- a/src/main/java/org/cactoos/collection/CollectionEnvelope.java
+++ b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
@@ -24,13 +24... | 8 | 8 | 1 | [{"id": "G0", "claim": "Keep CollectionOf instead of removing it, since its uselessness will become obvious on its own.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "Use the short @SuppressFBWarnings(\"EQ_UNUSUAL\") form instead of the fully qualified... | null |
yegor256__cactoos__1231 | yegor256/cactoos | 1,231 | defect | 2136d9d6814574421e7a9eededa2b9b46f2f2075 | 52758f3b87a55249bdfdff4e8ae76f7847bb7285 | (#1230) ListIteratorOf can be mutable and immutable, depending on origin | This PR is for [1230](https://github.com/yegor256/cactoos/issues/1230)
The [ListIteratorOf](https://github.com/yegor256/cactoos/blob/master/src/main/java/org/cactoos/list/ListIteratorOf.java) should support mutability, if the origin supports | diff --git a/src/main/java/org/cactoos/list/ListIteratorOf.java b/src/main/java/org/cactoos/list/ListIteratorOf.java
index 84903abc8..67dedff4c 100644
--- a/src/main/java/org/cactoos/list/ListIteratorOf.java
+++ b/src/main/java/org/cactoos/list/ListIteratorOf.java
@@ -30,15 +30,13 @@
import org.cactoos.scalar.Unchecke... | 4 | 2 | 1 | [{"id": "G0", "claim": "The ListIteratorOf tests that the PR touches in ListEnvelopeTest should be moved into their own test file so it is clear what is being tested.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The PR removed the expected e... | null |
yegor256__cactoos__1232 | yegor256/cactoos | 1,232 | defect | 2136d9d6814574421e7a9eededa2b9b46f2f2075 | 2eaf3c71e7f892cd9c1c1b1c42341f5883ef859d | (#1224) Making `list/Immutable` truly immutable | This is for https://github.com/yegor256/cactoos/issues/1224 | diff --git a/src/main/java/org/cactoos/list/Immutable.java b/src/main/java/org/cactoos/list/Immutable.java
index 39dc9bdd5..b345c1fa5 100644
--- a/src/main/java/org/cactoos/list/Immutable.java
+++ b/src/main/java/org/cactoos/list/Immutable.java
@@ -27,6 +27,7 @@
import java.util.Iterator;
import java.util.List;
impo... | 5 | 5 | 1 | [{"id": "G0", "claim": "Using ListOf for the nested copy will create a circular dependency once ListOf is itself reimplemented with Immutable as planned in issues #1220/#1221, so Immutable should copy the nested list by hand instead of via ListOf.", "category": "design", "verdict": "supported", "priority": "P1", "scope... | null |
yegor256__cactoos__1253 | yegor256/cactoos | 1,253 | defect | 95f5a04afd70eb6cd0383c910ee9198b9ffd3119 | 56b05eb2d2ae1f6a171cf2ed09c350c27615eb1e | (#1236) Immutable decorators are just simple decorators | This is for #1236
Following discussion with ARC, it was decided that `Immutable` should only decorate and not introduce behaviour or internal state.
I took the liberty of applying the same to `list` and `iterator` since there was not so much to do just for `collection`.
I removed extra constructors as they ar... | diff --git a/src/main/java/org/cactoos/collection/Immutable.java b/src/main/java/org/cactoos/collection/Immutable.java
index a3265130a8..2bc16d948b 100644
--- a/src/main/java/org/cactoos/collection/Immutable.java
+++ b/src/main/java/org/cactoos/collection/Immutable.java
@@ -25,10 +25,9 @@
import java.util.Collection... | 3 | 2 | 1 | [{"id": "G0", "claim": "The test method name should start with `Must...` (e.g. `innerListMustBeDecorated`) per the project's naming convention.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The assertion message in the test should start with an... | null |
yegor256__cactoos__1255 | yegor256/cactoos | 1,255 | defect | 95f5a04afd70eb6cd0383c910ee9198b9ffd3119 | 1f5620e6889fcaf290f7f4b8250fdb952d5a8175 | (#1185) List Envelope is just an envelope | This is for #1185.
I had to remove the unmodifiable wrapper in `Sticky` for things to work as expected. This is coherent with work planned in #1233 to remove them from all `List` implementations.
I also simplified the constructors of the `List` implementations since `List` and `Collection` implements `Iterable`. | diff --git a/src/main/java/org/cactoos/list/Joined.java b/src/main/java/org/cactoos/list/Joined.java
index b4943a9e40..c9992b0361 100644
--- a/src/main/java/org/cactoos/list/Joined.java
+++ b/src/main/java/org/cactoos/list/Joined.java
@@ -26,6 +26,7 @@
import java.util.Collections;
import java.util.List;
import java... | 7 | 7 | 1 | [{"id": "G0", "claim": "Joined's (item, items) constructor should go back to the old lazy `super(() -> new Joined<>(...))` form, since the new eager `super(new Joined<>(...))` puts code in the constructor and no longer gives a lazily-initialized object.", "category": "design", "verdict": "supported", "priority": "P1", ... | null |
yegor256__cactoos__1267 | yegor256/cactoos | 1,267 | defect | 542dc574730f6b3391a3714cfaca54a00a9f4ae6 | 50fa7f5ea96cf668e94422718746110792662616 | (#1000) Created Timeout class | This is for #1000
* Created class `Timeout`
* Created tests on `Timeout` class
* Removed puzzle | diff --git a/src/main/java/org/cactoos/experimental/Threads.java b/src/main/java/org/cactoos/experimental/Threads.java
index fa2b2e002..934ec1334 100644
--- a/src/main/java/org/cactoos/experimental/Threads.java
+++ b/src/main/java/org/cactoos/experimental/Threads.java
@@ -40,9 +40,6 @@
*
* @param <T> The type of ta... | 5 | 5 | 0 | [{"id": "G0", "claim": "The name `Timeout` does not correctly represent what the class does, so the class should be renamed (e.g. to `Timed`).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The checkstyle suppressions in the test should be dropped by usi... | null |
yegor256__cactoos__1269 | yegor256/cactoos | 1,269 | defect | 542dc574730f6b3391a3714cfaca54a00a9f4ae6 | 345ca833d17152269f48b1d4ef11405e004cd43e | (#1266) New scalar for text ending predicate | This PR is for issue [1266](https://github.com/yegor256/cactoos/issues/1266) | diff --git a/src/main/java/org/cactoos/scalar/SumOfScalar.java b/src/main/java/org/cactoos/scalar/SumOfScalar.java
index c8da5048c..f458812b3 100644
--- a/src/main/java/org/cactoos/scalar/SumOfScalar.java
+++ b/src/main/java/org/cactoos/scalar/SumOfScalar.java
@@ -39,6 +39,10 @@
* <p>Note this class is for internal u... | 2 | 2 | 0 | [{"id": "G0", "claim": "The @todo about refactoring SumOfScalar with the Stream API is unrelated to this issue and should be filed as a new bug instead of being added by this pull request.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The EndsW... | null |
yegor256__cactoos__1271 | yegor256/cactoos | 1,271 | defect | 44c3cd1e600b655eff9b1b2f70cf99459e1a5edb | 03d21d98d8d8809d56e29d35ce2dc9d829c49452 | (#1194) HeadOf.java: refactored implementation to use Sliced | This is for issue #1194
Refactor of `HeadOf` using `Sliced `primitive. | diff --git a/src/main/java/org/cactoos/iterator/HeadOf.java b/src/main/java/org/cactoos/iterator/HeadOf.java
index 32be55222..6bdde7c76 100644
--- a/src/main/java/org/cactoos/iterator/HeadOf.java
+++ b/src/main/java/org/cactoos/iterator/HeadOf.java
@@ -24,7 +24,6 @@
package org.cactoos.iterator;
import java.util.It... | 1 | 1 | 0 | [{"id": "G0", "claim": "The refactored HeadOf should leverage IteratorEnvelope instead of implementing Iterator directly.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1272 | yegor256/cactoos | 1,272 | defect | 44c3cd1e600b655eff9b1b2f70cf99459e1a5edb | 1b80caffc3a76f173acf6c5617d3596b84bfdd65 | (#1226) Delete Andand introduce ForEach | This is for issue (#1226)
Extracted `ForEach` from `And`
Added `ForEachTest`
Extracted `ForEachInThreads` from `AndInThreads`
Added `ForEachInThreadsTest`
Updated README.md accordingly | diff --git a/README.md b/README.md
index 04b795ae2..408f6a593 100644
--- a/README.md
+++ b/README.md
@@ -171,7 +171,7 @@ new And(
System.out.printf("Item: %s\n", input);
}
),
- new IterableOf<>("how", "are", "you")
+ new IterableOf<>("how", "are", "you", "?")
)
).value();
```
@@ -179,10 ... | 10 | 10 | 2 | [{"id": "G0", "claim": "The @since 0.44 version tag on the new ForEach, ForEachInThreads classes and their tests is not correct and should match the version in pom.xml.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The public varargs exec(X...) o... | null |
yegor256__cactoos__1275 | yegor256/cactoos | 1,275 | defect | 542dc574730f6b3391a3714cfaca54a00a9f4ae6 | 24093b35a8e93670716c85eef80a4292672e5467 | (#1274) Make addAll properly call internal addAll | This is for issue: https://github.com/yegor256/cactoos/issues/1274 | diff --git a/src/main/java/org/cactoos/collection/NoNulls.java b/src/main/java/org/cactoos/collection/NoNulls.java
index ab7c73a65..a6a5126ec 100644
--- a/src/main/java/org/cactoos/collection/NoNulls.java
+++ b/src/main/java/org/cactoos/collection/NoNulls.java
@@ -139,7 +139,7 @@ public boolean containsAll(final Collec... | 1 | 1 | 1 | [{"id": "G0", "claim": "Add one more test that passes a nullable (null-containing) collection to the NoNulls addAll method.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
yegor256__cactoos__1278 | yegor256/cactoos | 1,278 | defect | 506a5749c7583499a3fca0867cb7c2a7a4f4f64e | bbd204b8fd44282693501d65da17e6dd172906ad | (#1239) HeadInput is renamed to HeadOf | This is for #1239, as per discussed with ARC, we rename `HeadInput` to `HeadOf` to homogenize naming. | diff --git a/src/main/java/org/cactoos/io/HeadInput.java b/src/main/java/org/cactoos/io/HeadOf.java
similarity index 94%
rename from src/main/java/org/cactoos/io/HeadInput.java
rename to src/main/java/org/cactoos/io/HeadOf.java
index 3320180e18..06140b201c 100644
--- a/src/main/java/org/cactoos/io/HeadInput.java
+++ b/... | 2 | 2 | 0 | [{"id": "G0", "claim": "Add a unit test covering the case where the len parameter is 0.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Add a unit test covering the case where len is greater than the input length.", "category": "testing", "verdict": "s... | null |
yegor256__cactoos__1306 | yegor256/cactoos | 1,306 | defect | 2a62719ec67ee153ff99f2cbb9aacb9429efbea4 | cd9e33aa60f1be23f247f1a12ff939bd2c29db52 | Fixed fallback function in the FirstOf class | This PR is for issue [1276](https://github.com/yegor256/cactoos/issues/1276) | diff --git a/src/main/java/org/cactoos/scalar/FirstOf.java b/src/main/java/org/cactoos/scalar/FirstOf.java
index 491efb60f..d3ff888a5 100644
--- a/src/main/java/org/cactoos/scalar/FirstOf.java
+++ b/src/main/java/org/cactoos/scalar/FirstOf.java
@@ -25,6 +25,7 @@
import org.cactoos.Func;
import org.cactoos.Scalar;
+... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new test shouldThrowExceptionForNotFoundElementTest is confused: its failure message does not state the exception-for-element-not-found intent its name declares, and it essentially tests the same thing as returnsFallbackIfNothingMatches, so it should be fixed.", "category": "testing", "verdi... | null |
yegor256__cactoos__1307 | yegor256/cactoos | 1,307 | defect | 2a62719ec67ee153ff99f2cbb9aacb9429efbea4 | d428ea132f6e5a4718693b84eec40c1f9749949c | (#1284) Fixed TempFolder close method | This PR is for issue [1284](https://github.com/yegor256/cactoos/issues/1284) | diff --git a/src/main/java/org/cactoos/io/TempFolder.java b/src/main/java/org/cactoos/io/TempFolder.java
index a77a29aa5..865269f9b 100644
--- a/src/main/java/org/cactoos/io/TempFolder.java
+++ b/src/main/java/org/cactoos/io/TempFolder.java
@@ -29,8 +29,13 @@
import java.nio.file.Files;
import java.nio.file.Path;
im... | 1 | 1 | 0 | [{"id": "G0", "claim": "Split the new test into two different test methods, one for each assertion.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1314 | yegor256/cactoos | 1,314 | defect | 671155e584904e37a671bcec5d827837cd5a8fac | 4b28a23347750022e3cb8e2a723a9539f069a2e8 | (#1293) Remove collection's Mapped | This is for #1293.
Changes :
- I had to change `Threads` and `Timed` so I simplified them at the same time
- while doing so
- I uncovered a bug in one of the tests (see `failsDueToException`): the `Scalar` that was passed was actually interpreted as an `Iterable`
- I had to rework a bit `CallableOf` so that ... | diff --git a/src/main/java/org/cactoos/collection/Mapped.java b/src/main/java/org/cactoos/collection/Mapped.java
deleted file mode 100644
index 446519cce0..0000000000
--- a/src/main/java/org/cactoos/collection/Mapped.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2017-2020 Yegor... | 2 | 2 | 0 | [{"id": "G0", "claim": "Instead of casting the lambda to Scalar in the tests, a ScalarOf class should be introduced in Cactoos, or failing that a todo should be left.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The transformsArray test should check al... | null |
yegor256__cactoos__1315 | yegor256/cactoos | 1,315 | defect | 671155e584904e37a671bcec5d827837cd5a8fac | 54a31e3cdfa4ed380a40fd28b3778d79196c0140 | Remove some collection decorators | This is for #1299 and #1304.
Changes:
- I moved when possible the tests from collection to iterable tests
- I added some of the test that were removed in #1311 for #1303 to iterable's `Skipped` since it seemed a good idea | diff --git a/src/main/java/org/cactoos/collection/Filtered.java b/src/main/java/org/cactoos/collection/Filtered.java
deleted file mode 100644
index 1e4d500d7e..0000000000
--- a/src/main/java/org/cactoos/collection/Filtered.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2017-2020... | 1 | 1 | 0 | [{"id": "G0", "claim": "Extract the repeated literal values used across SkippedTest's test methods into constants and, once that is done, remove the class-level @SuppressWarnings(\"PMD.AvoidDuplicateLiterals\") the pull request added.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "... | null |
yegor256__cactoos__1329 | yegor256/cactoos | 1,329 | defect | 41a409c98fee60e727052dfed7daf5edf4794d9a | 37f2408ea3d399879278db9264b8f4f4ed2bdc39 | #1325 - Sorted now implements SortedSet. | PR for https://github.com/yegor256/cactoos/issues/1325
`Sorted` now implements `SortedSet`. | diff --git a/src/main/java/org/cactoos/set/Sorted.java b/src/main/java/org/cactoos/set/Sorted.java
index fc3d61b82..1bdc1f4b5 100644
--- a/src/main/java/org/cactoos/set/Sorted.java
+++ b/src/main/java/org/cactoos/set/Sorted.java
@@ -25,6 +25,7 @@
import java.util.Comparator;
import java.util.Set;
+import java.util.... | 3 | 2 | 0 | [{"id": "G0", "claim": "Introduce a SortedSetEnvelope that extends SetEnvelope and is responsible for delegating to the wrapped set, leaving Sorted responsible only for the Iterable-based constructor.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @S... | null |
yegor256__cactoos__1332 | yegor256/cactoos | 1,332 | defect | fe323a8220b006f004f3c4f353d5faf647004e38 | 2331e19bafe942e44212b6fb986120b1c6b49850 | (#1300) Replace collection's Reversed by Iterator's Reversed | This is for #1300.
I added a `Reversed` implementation for `Iterator` in order to replace the one from collection used by `Reversed` for `Iterable`. | diff --git a/src/main/java/org/cactoos/iterable/Reversed.java b/src/main/java/org/cactoos/iterable/Reversed.java
index 58186d0752..d64804957e 100644
--- a/src/main/java/org/cactoos/iterable/Reversed.java
+++ b/src/main/java/org/cactoos/iterable/Reversed.java
@@ -24,7 +24,10 @@
package org.cactoos.iterable;
/**
- * ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The newly added iteratesMultipleTimes test is hard to understand and seems to do nothing; the author is asked to make its intent clearer and to express it in just one assertion.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The ... | null |
yegor256__cactoos__1358 | yegor256/cactoos | 1,358 | defect | 6b5e5d767775e52352e01ba430fa80702540b968 | 91784509897858626f6ab11a7f0ba949de245599 | 1308 fixed IterableOf.equals and add required tests | #1308
Fixed the problem when two Iterates of different sizes returned the wrong result on method equals. | diff --git a/src/main/java/org/cactoos/iterable/IterableOf.java b/src/main/java/org/cactoos/iterable/IterableOf.java
index a42329ea5..dc422ffd6 100644
--- a/src/main/java/org/cactoos/iterable/IterableOf.java
+++ b/src/main/java/org/cactoos/iterable/IterableOf.java
@@ -155,13 +155,13 @@ public boolean equals(final Objec... | 4 | 3 | 0 | [{"id": "G0", "claim": "The rewritten equals code is not readable or maintainable, so a TODO should be added to transform it into something more object-oriented and declarative.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR description s... | null |
yegor256__cactoos__1365 | yegor256/cactoos | 1,365 | defect | 598bb918a8cb23156338c181fa473f4c120b5297 | ddf46371530b5ae81df35370cf95a2a87676d16a | FirstOf: added extra-ctor | This pull-request has no corresponding issue.
* Added extra-ctor with default `condition` (always `true`) to FirstOf | diff --git a/src/main/java/org/cactoos/scalar/FirstOf.java b/src/main/java/org/cactoos/scalar/FirstOf.java
index d3ff888a5..60a2a04d2 100644
--- a/src/main/java/org/cactoos/scalar/FirstOf.java
+++ b/src/main/java/org/cactoos/scalar/FirstOf.java
@@ -53,6 +53,19 @@ public final class FirstOf<T> implements Scalar<T> {
... | 2 | 1 | 0 | [{"id": "G0", "claim": "Add a link to the original issue being solved to the pull request, if one exists.", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Also add a FirstOf constructor that takes the fallback as a plain T value to ease use.", "catego... | null |
yegor256__cactoos__1366 | yegor256/cactoos | 1,366 | defect | 598bb918a8cb23156338c181fa473f4c120b5297 | b1b672dc21c2ce0c7cd174cf8e7135914a602c6b | new class text.Contains (by analogy with text.EndsWith) | This pull-request has no corresponding issue.
* Added new class text.Contains (by analogy with text.EndsWith)
* Added unit-test for this new class | diff --git a/src/main/java/org/cactoos/text/Contains.java b/src/main/java/org/cactoos/text/Contains.java
new file mode 100644
index 000000000..796684035
--- /dev/null
+++ b/src/main/java/org/cactoos/text/Contains.java
@@ -0,0 +1,87 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ *... | 1 | 1 | 0 | [{"id": "G0", "claim": "Rename the mangled constructor parameter names `orgn`/`othr` to `origin`/`other`, since the mangled names only bring confusion and no benefit.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1402 | yegor256/cactoos | 1,402 | defect | 88bffb47f35271909eb0b0b7f663464c6c4a5527 | a3002e54b16be68f1dcdc097bf34baceba082271 | For #1313: Additional ctors for `Filtered` | This is for #1313:
- Add ctors with `Func<X, Scalar<Boolean>>` to `Filtered` | diff --git a/src/main/java/org/cactoos/iterable/Filtered.java b/src/main/java/org/cactoos/iterable/Filtered.java
index 800eb0420..7f9de8ac2 100644
--- a/src/main/java/org/cactoos/iterable/Filtered.java
+++ b/src/main/java/org/cactoos/iterable/Filtered.java
@@ -24,6 +24,7 @@
package org.cactoos.iterable;
import org.... | 7 | 7 | 0 | [{"id": "G0", "claim": "In Reduced.java the new secondary constructor should be placed before the primary constructor, not after it.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In EndsWith.java the new secondary constructor should be placed b... | null |
yegor256__cactoos__1418 | yegor256/cactoos | 1,418 | defect | 88bffb47f35271909eb0b0b7f663464c6c4a5527 | f3a3474bae73b64ff04278bb0074ef97e2e182d4 | For #1396: Partial migration to `Assertion` from `cactoos-matchers` | See #1396
- Mentions of MatcherAssert.assertThat replaced with Assertion from cactoos-matchers
- Refactoring is limited to `org.cactoos.func` package
| diff --git a/src/main/java/org/cactoos/iterable/IterableOf.java b/src/main/java/org/cactoos/iterable/IterableOf.java
index 99c4ae3c87..c5bab0dbd3 100644
--- a/src/main/java/org/cactoos/iterable/IterableOf.java
+++ b/src/main/java/org/cactoos/iterable/IterableOf.java
@@ -32,13 +32,11 @@
import org.cactoos.iterator.Iter... | 5 | 5 | 0 | [{"id": "G0", "claim": "The rename of the lambda parameter from `input` to `input1` in RunnableOfTest.convertsFuncIntoRunnable, if intentional, should get a better name than `input1`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The same poor ... | null |
yegor256__cactoos__1419 | yegor256/cactoos | 1,419 | defect | 033b34e1378d4565a95717356bc68dd6ee408063 | d1aa7ccc19b9c508c5f17b6e54122910a09e1976 | Added a ForEachWithIndex class | There was no ticket for this, but I wanted it, and it seemed to be within the scope of the overarching objectives of the library. It's my way of donating without money to give.
I copied `ForEach` and modified it to use `BiFunc`, `BiProc`, and `AndWithIndex` to give us a `ForEachWithIndex`. I also copied the `ForEach... | diff --git a/src/main/java/org/cactoos/func/ForEachWithIndex.java b/src/main/java/org/cactoos/func/ForEachWithIndex.java
new file mode 100644
index 000000000..4fa878408
--- /dev/null
+++ b/src/main/java/org/cactoos/func/ForEachWithIndex.java
@@ -0,0 +1,78 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020... | 2 | 2 | 0 | [{"id": "G0", "claim": "Please make the ForEachWithIndexTest class final.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Please reword the assertion message \"String does not contain mapped Iterable elements\" so it states the expectation instea... | null |
yegor256__cactoos__1422 | yegor256/cactoos | 1,422 | defect | f8bdd8b97fcf083d7ee7a78083c96efcb5657147 | 4d584084fc0a13e3af1cb36ca72e4841ee2002ed | #1135: Extends TextEnvelope when possible | #1135 - replacing implements Text with extends TextEnvelope
- I've applied the new pattern for 6 classes and added a todo to continue the work.
| diff --git a/src/main/java/org/cactoos/text/HexOf.java b/src/main/java/org/cactoos/text/HexOf.java
index 0b2d0b07c..c4dde7faf 100644
--- a/src/main/java/org/cactoos/text/HexOf.java
+++ b/src/main/java/org/cactoos/text/HexOf.java
@@ -24,7 +24,7 @@
package org.cactoos.text;
import org.cactoos.Bytes;
-import org.cacto... | 3 | 1 | 0 | [{"id": "G0", "claim": "The indentation around the new Randomized(...) call in AppendToTest.failsIfFileDoesNotExist looks wrong and should be fixed so that all is correct.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The @todo #1135 puzzle comme... | null |
yegor256__cactoos__1428 | yegor256/cactoos | 1,428 | defect | e21e285d119128a6542b7f218b2e6f6d27d209b6 | e667f523ac4911f9309d07dce18b45a6dc43ec76 | #1407: Create RepeatedCallable decorator | For #1407
- Create `RepeatedCallable` decorator
- Create unit test for `RepeatedCallable`
- Fix `TimedTest` unit test
- Remove puzzle | diff --git a/src/main/java/org/cactoos/RepeatedCallable.java b/src/main/java/org/cactoos/RepeatedCallable.java
new file mode 100644
index 000000000..e0383a95e
--- /dev/null
+++ b/src/main/java/org/cactoos/RepeatedCallable.java
@@ -0,0 +1,74 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenk... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new RepeatedCallable class (with its related files) should be moved to the func package instead of living in the root org.cactoos package.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "RepeatedCallable should reuse the existi... | null |
yegor256__cactoos__1429 | yegor256/cactoos | 1,429 | defect | e21e285d119128a6542b7f218b2e6f6d27d209b6 | b9580d2e5d1d70146df416e0c1002ef9e576c500 | For #1423: Add Sticky decorator for Text | - Add `Sticky` implementation for `Text`
- This is for #1423 | diff --git a/src/main/java/org/cactoos/text/Sticky.java b/src/main/java/org/cactoos/text/Sticky.java
new file mode 100644
index 000000000..7489554b0
--- /dev/null
+++ b/src/main/java/org/cactoos/text/Sticky.java
@@ -0,0 +1,66 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * Permi... | 2 | 1 | 1 | [{"id": "G0", "claim": "The expectation behind issue #1423 should be clarified in that issue before rushing to implement it, since the issue the PR solves is not in scope and some of the implementation does not comply with what was discussed in the issue.", "category": "design", "verdict": "uncertain", "priority": "P1"... | null |
yegor256__cactoos__1433 | yegor256/cactoos | 1,433 | defect | e21e285d119128a6542b7f218b2e6f6d27d209b6 | cafaf7e430b8107053c061f3f3c646451f214ee5 | (#1223) Replace static factory methods with direct call to new | Per #1223:
- Replace static methods with objects
- Update puzzle | diff --git a/pom.xml b/pom.xml
index 1ba9e02a1..e382bb0ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -202,7 +202,7 @@ The MIT License (MIT)
<signaturesFile>./src/test/resources/forbidden-apis.txt</signaturesFile>
</signaturesFiles>
<!--
- @todo #1166:30min In the ... | 3 | 3 | 0 | [{"id": "G0", "claim": "In UncheckedBiFuncTest the boolean assertion should use the IsTrue matcher from cactoos-matchers instead of IsEqual<>.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In TimedFuncTest.functionIsExecuted the boolean asserti... | null |
yegor256__cactoos__1435 | yegor256/cactoos | 1,435 | defect | d9b39e21a59b40b8bbf63c4ce7083a4982385914 | bf417738cce57e7f2f55a14c4f4b495b89b848f6 | #1349: Continue of refactoring of `ScalarOf` | Per #1349:
- Add `ScalarOfSupplier`
- Add `ScalarOfCallable`
- Remove `ScalarOf` | diff --git a/src/main/java/org/cactoos/scalar/ScalarOf.java b/src/main/java/org/cactoos/scalar/ScalarOfCallable.java
similarity index 65%
rename from src/main/java/org/cactoos/scalar/ScalarOf.java
rename to src/main/java/org/cactoos/scalar/ScalarOfCallable.java
index 92cda2fc7..4b95056de 100644
--- a/src/main/java/org/... | 4 | 4 | 2 | [{"id": "G0", "claim": "Add a more detailed description (message) to the assertion in ScalarOfCallableTest.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a more detailed description (message) to the assertion in ScalarOfSupplierTest.", "categ... | null |
yegor256__cactoos__1455 | yegor256/cactoos | 1,455 | defect | 171c9aef7fc8248df87335d1640ee93cde92307d | 87bc3138f2628acbc1de78b06a6d49f42ba88939 | #1280: UncheckedText should implement toString() | Per #1280 :
- Implements `#toString()` in `UncheckedText`
- Implements a test to check this functionality | diff --git a/src/main/java/org/cactoos/text/UncheckedText.java b/src/main/java/org/cactoos/text/UncheckedText.java
index 784e886c3e..dd0d34c549 100644
--- a/src/main/java/org/cactoos/text/UncheckedText.java
+++ b/src/main/java/org/cactoos/text/UncheckedText.java
@@ -93,4 +93,9 @@ public String asString() {
ret... | 2 | 2 | 0 | [{"id": "G0", "claim": "The toString test should use the HasToString matcher instead of calling the method directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "UncheckedText should also implement equals and hashCode.", "category": "design", ... | null |
yegor256__cactoos__1463 | yegor256/cactoos | 1,463 | defect | 171c9aef7fc8248df87335d1640ee93cde92307d | 5c092308b35aa44c74ba3dc089022fc1eb546259 | #1384: Remove lazy initizaliaztion from MapEnvelope | Per #1384
- Make MapEnvelope a proper envelope
- Add ctor for `MapOf`
- Remove tests for lazy initialization | diff --git a/src/main/java/org/cactoos/map/Grouped.java b/src/main/java/org/cactoos/map/Grouped.java
index cf51ad56c..49f189850 100644
--- a/src/main/java/org/cactoos/map/Grouped.java
+++ b/src/main/java/org/cactoos/map/Grouped.java
@@ -57,16 +57,19 @@ public Grouped(
final Function<T, K> keys,
final ... | 7 | 5 | 2 | [{"id": "G0", "claim": "The map.Solid class should be removed too, as discussed in the ticket.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The map.Sticky class should be removed too, as discussed in the ticket.", "category": "design", "verdict": "su... | null |
yegor256__cactoos__1465 | yegor256/cactoos | 1,465 | defect | af979def342f0bfe75e31912588681cd090c8c6c | e0d374b2f7f38d1019861354621fe354d1044fe5 | Added Capitalized | Added EO version of StringUtils.capitalize
I hope for your understanding, this is my first pull request to open source project.
Signed-off-by: kokodyn <kokodyn@gmail.com>
| diff --git a/src/main/java/org/cactoos/text/Capitalized.java b/src/main/java/org/cactoos/text/Capitalized.java
new file mode 100644
index 000000000..d9449ac61
--- /dev/null
+++ b/src/main/java/org/cactoos/text/Capitalized.java
@@ -0,0 +1,66 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenk... | 8 | 8 | 0 | [{"id": "G0", "claim": "Remove the mutable `capitalized` variable from the Capitalized ctor and compute the result with `Ternary` instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test failure messages should say `must` (e.g. \"Must ca... | null |
yegor256__cactoos__1476 | yegor256/cactoos | 1,476 | defect | 2305514a32edde79f55130f6b040ef316ee8f400 | 8f1a06ce4f8686f941eda421daa545f521f473d7 | (#1475) Make Ternary consistent over its evaluation | This is for #1475.
I've also fixed a test that looked very fishy. | diff --git a/src/main/java/org/cactoos/scalar/Ternary.java b/src/main/java/org/cactoos/scalar/Ternary.java
index 4cd0a3a1e8..e666f1b92b 100644
--- a/src/main/java/org/cactoos/scalar/Ternary.java
+++ b/src/main/java/org/cactoos/scalar/Ternary.java
@@ -39,10 +39,10 @@
*
* <pre>{@code
* new Ternary<>(
- * 5,
+ *... | 3 | 3 | 1 | [{"id": "G0", "claim": "The new tests should use String.format instead of string concatenation with +, here and in the other places that use + for concatenation.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new conditionSticky test is uncl... | null |
yegor256__cactoos__1480 | yegor256/cactoos | 1,480 | defect | 36dd67bf34f14e737ae9661a4d44aa89db21b960 | 7c6427b6a0b839e0996a013ab02ee4dea15f2683 | Added Concatenated class to allow concatenate texts | Hi
I would like to propose to add new class which allow concatenate texts.
Signed-off-by: kokodyn <kokodyn@gmail.com>
| diff --git a/src/main/java/org/cactoos/text/Concatenated.java b/src/main/java/org/cactoos/text/Concatenated.java
new file mode 100644
index 000000000..612090df0
--- /dev/null
+++ b/src/main/java/org/cactoos/text/Concatenated.java
@@ -0,0 +1,66 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugay... | 5 | 5 | 0 | [{"id": "G0", "claim": "The Concatenated implementation should simply delegate to `new Joined(new TextOf(\"\"), txts)` instead of manually building the string with StringBuilder and LengthOf.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @since tags... | null |
yegor256__cactoos__1484 | yegor256/cactoos | 1,484 | defect | deec1546c42ba439287251aa4f1965b024f27c8a | 95054e20f9bfabe08e7ef8b6a2bdafc7d4712ba7 | Add IsEmpty to check if Text is empty or not | I would like to introduce a class in order to check whether the text is empty or not
Signed-off-by: kokodyn <kokodyn@gmail.com>
| diff --git a/src/main/java/org/cactoos/text/IsEmpty.java b/src/main/java/org/cactoos/text/IsEmpty.java
new file mode 100644
index 000000000..2570a21ce
--- /dev/null
+++ b/src/main/java/org/cactoos/text/IsEmpty.java
@@ -0,0 +1,52 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * Pe... | 6 | 5 | 0 | [{"id": "G0", "claim": "Having IsEmpty implement Scalar<Boolean> just to perform a check is a bad idea because it creates short-lived objects; the reviewer questions how the class is practical and suggests it be usable as a Func<Text, Boolean>.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "i... | null |
yegor256__cactoos__1485 | yegor256/cactoos | 1,485 | defect | deec1546c42ba439287251aa4f1965b024f27c8a | 9b69568a3a1328b0dc3344837a322c984dd305e1 | For #1462: Introduce text.Mapped | Per #1462
- Add `text.Mapped`
- Use it where applicable | diff --git a/src/main/java/org/cactoos/text/Lowered.java b/src/main/java/org/cactoos/text/Lowered.java
index bfc896b0b..3042faa07 100644
--- a/src/main/java/org/cactoos/text/Lowered.java
+++ b/src/main/java/org/cactoos/text/Lowered.java
@@ -55,13 +55,8 @@ public Lowered(final Text text) {
* Ctor.
* @param t... | 3 | 3 | 1 | [{"id": "G0", "claim": "Mapped should preserve equality (and provide equals/hashCode/toString), which it asks to be tested with an #equals() test, since a mapping like String::toLowerCase that yields an equal string should make the texts equal.", "category": "design", "verdict": "supported", "priority": "P1", "scope": ... | null |
yegor256__cactoos__1492 | yegor256/cactoos | 1,492 | defect | a8e0dab24ce2f9b661cc0aa68e3b828683949bd6 | b67dd214768125f40ca86320b64f43b6c6797d12 | #1481: Introduce iterator.Matched | Per #1481
- Add `iterator.Matched`
- Base `iterable.Matched` on it | diff --git a/src/main/java/org/cactoos/iterable/Matched.java b/src/main/java/org/cactoos/iterable/Matched.java
index b3ac3724a..70fb1dbe9 100644
--- a/src/main/java/org/cactoos/iterable/Matched.java
+++ b/src/main/java/org/cactoos/iterable/Matched.java
@@ -23,32 +23,19 @@
*/
package org.cactoos.iterable;
-import j... | 7 | 6 | 0 | [{"id": "G0", "claim": "Fix the error-message typo \"The is no correlation between\" to read \"There is no...\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Restructure next() to throw on failed correlation instead of returning inside if/else, ... | null |
yegor256__cactoos__1509 | yegor256/cactoos | 1,509 | defect | 8b27f80c6e45cdbe9f3520ad5f083b517b928478 | 3d9cfe3b85156b41708c2a972acbc4e159408338 | #1510 add Xor class to allow exclusive disjunction | Hi
I would like to propose to add new class which allow logical operation Xor. | diff --git a/src/main/java/org/cactoos/scalar/Xor.java b/src/main/java/org/cactoos/scalar/Xor.java
new file mode 100644
index 000000000..3a48012fe
--- /dev/null
+++ b/src/main/java/org/cactoos/scalar/Xor.java
@@ -0,0 +1,97 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * Permissi... | 8 | 6 | 3 | [{"id": "G0", "claim": "The value() implementation is not short-circuit and should use Folded instead of the Stream API.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The empty-iterable test in XorTest constructs an And instead of an Xor, so it does not t... | null |
yegor256__cactoos__1511 | yegor256/cactoos | 1,511 | defect | 8b27f80c6e45cdbe9f3520ad5f083b517b928478 | 6d252a61fe58ec818dc3d5d91a6360bd7c6a7cd3 | #1051 add ctor with vargs String |
Change related with #1051. I see i has been partly covered in PR #1480. Adding ctor which accepts String vargs in ctor is also required.
| diff --git a/src/main/java/org/cactoos/text/Concatenated.java b/src/main/java/org/cactoos/text/Concatenated.java
index 88f407acd..e53388e5e 100644
--- a/src/main/java/org/cactoos/text/Concatenated.java
+++ b/src/main/java/org/cactoos/text/Concatenated.java
@@ -25,6 +25,7 @@
import org.cactoos.Text;
import org.cacto... | 1 | 1 | 0 | [{"id": "G0", "claim": "The explicit type parameter in the new Concatenated(String...) constructor's IterableOf is unnecessary and can be removed.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
yegor256__cactoos__1516 | yegor256/cactoos | 1,516 | defect | 558037207d94a0f7c94bf3ea37eda06221cbb7b6 | 4383196cca5c9ac879dbed97d4572500e7f9ab8b | Missing fixes | A bunch of fixes related to previous issues, see commits for details. | diff --git a/src/main/java/org/cactoos/iterable/Repeated.java b/src/main/java/org/cactoos/iterable/Repeated.java
index f2e3cea821..3c68a66348 100644
--- a/src/main/java/org/cactoos/iterable/Repeated.java
+++ b/src/main/java/org/cactoos/iterable/Repeated.java
@@ -24,7 +24,6 @@
package org.cactoos.iterable;
import or... | 1 | 1 | 0 | [{"id": "G0", "claim": "The emptiness check in AvgOf should use !list.isEmpty() instead of list.size() > 0.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
yegor256__cactoos__1525 | yegor256/cactoos | 1,525 | defect | eb202e1821e39b2704229d58cd0e9155b634aa95 | 1a5d730eaab72494bc01b1d8b5b612837ab8ab99 | (#895, #1170) Refactor FallbackFrom and ScalarWithFallback | #895, #1170
- Define a new interface called Fallback;
- Refactor FallbackFrom and ScalarWithFallback.
| diff --git a/src/main/java/org/cactoos/Fallback.java b/src/main/java/org/cactoos/Fallback.java
new file mode 100644
index 000000000..fc7d7a9d1
--- /dev/null
+++ b/src/main/java/org/cactoos/Fallback.java
@@ -0,0 +1,43 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * Permission is ... | 5 | 4 | 4 | [{"id": "G0", "claim": "The exception name in supportsInheritedException looks like a typo (IllegalFormatWidthException where IllegalFormatException was expected).", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "FallbackFrom should be moved as an inner... | null |
yegor256__cactoos__1528 | yegor256/cactoos | 1,528 | defect | 8f3e71c23748db775dd6f5f25f20fa77e6d5e5b0 | b00c37a9fd54b5801513411db66827ae21d2d2ab | 1445 scalarof | Some more changes for #1445. I took this opportunity to cleanup and improve test coverage | diff --git a/src/main/java/org/cactoos/BiProc.java b/src/main/java/org/cactoos/BiProc.java
index fceb567d77..8ffeafc3d4 100644
--- a/src/main/java/org/cactoos/BiProc.java
+++ b/src/main/java/org/cactoos/BiProc.java
@@ -39,6 +39,10 @@
* @param <X> Type of input
* @param <Y> Type of input
* @since 0.20
+ * @todo #1... | 5 | 5 | 0 | [{"id": "G0", "claim": "In the tests rewritten by this pull request, the assertions that compare against freshly created objects should use `==` instead of `.equals`, since the code under test returns those very objects.", "category": "testing", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "... | null |
yegor256__cactoos__1536 | yegor256/cactoos | 1,536 | defect | 1fed966345f3e1b956634627b5114b8b5aa87abc | 8fda877db6be0a1ae3e285552ff859de43a20d93 | #1464 Add iterator.Paged and remove checkstyle suppression | #1464
- create `iterator.Paged`
- refactor `iterable.Paged`
- remove checkstyle suppression in `iterable.Paged`
| diff --git a/src/main/java/org/cactoos/iterable/Paged.java b/src/main/java/org/cactoos/iterable/Paged.java
index e8162ce2f1..870ff243f6 100644
--- a/src/main/java/org/cactoos/iterable/Paged.java
+++ b/src/main/java/org/cactoos/iterable/Paged.java
@@ -24,13 +24,8 @@
package org.cactoos.iterable;
import java.util.Ite... | 5 | 4 | 2 | [{"id": "G0", "claim": "Get rid of the `I` type parameter in iterator.Paged (it wrongly constrains the Func to return exactly that iterator subtype and makes the class unusable with different iterator subclasses), or at least add a todo task for removing it.", "category": "design", "verdict": "supported", "priority": "... | null |
yegor256__cactoos__1540 | yegor256/cactoos | 1,540 | defect | 86ad37b671edb86a5d92d00c1005cc6c62f2c825 | 51f18ff58a1a6db699a9569d7cb05ec92422b47e | (#1532) Introduce BiProcOf on the model of FuncOf, etc. | #1532
- Introduce BiProcOf and some tests
- Use BiProcOf in AndWithIndexTest
| diff --git a/src/main/java/org/cactoos/BiProc.java b/src/main/java/org/cactoos/BiProc.java
index 8ffeafc3d4..fceb567d77 100644
--- a/src/main/java/org/cactoos/BiProc.java
+++ b/src/main/java/org/cactoos/BiProc.java
@@ -39,10 +39,6 @@
* @param <X> Type of input
* @param <Y> Type of input
* @since 0.20
- * @todo #1... | 4 | 4 | 1 | [{"id": "G0", "claim": "Use proper covariance in the BiProcOf constructors, following the rules explained in #1533.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Make the BiProcOfTest class final and not public, like the rest of the test classes, for co... | null |
yegor256__cactoos__1542 | yegor256/cactoos | 1,542 | defect | ad783153f4181401fb4c8bb0b8bc4248fd9b51a6 | 84a308b04836c96230219cb64e62d101e741046f | (#906) Implements RangeOf for iterator | #906
- Implements RangeOf for Iterator
- Implements test case for RangeOf | diff --git a/src/main/java/org/cactoos/iterable/RangeOf.java b/src/main/java/org/cactoos/iterable/RangeOf.java
index 35f98fe714..2614f37e59 100644
--- a/src/main/java/org/cactoos/iterable/RangeOf.java
+++ b/src/main/java/org/cactoos/iterable/RangeOf.java
@@ -23,10 +23,7 @@
*/
package org.cactoos.iterable;
-import ... | 8 | 8 | 0 | [{"id": "G0", "claim": "The new iterator RangeOf should implement Iterator directly instead of wrapping an anonymous Iterator in IteratorEnvelope.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the now-unneeded @SuppressWarnings from the iterator ... | null |
yegor256__cactoos__1548 | yegor256/cactoos | 1,548 | defect | ad783153f4181401fb4c8bb0b8bc4248fd9b51a6 | 3d2fa401b56342a674aaf4c88d94777028d3340a | (#1254) Implements ListIteratorJoined | For #1254
- Implements `JoinedListIterator`
- Introduces unit tests for `JoinedListIterator`
| diff --git a/src/main/java/org/cactoos/list/Joined.java b/src/main/java/org/cactoos/list/Joined.java
index 44338bcfda..7e3cbb92f6 100644
--- a/src/main/java/org/cactoos/list/Joined.java
+++ b/src/main/java/org/cactoos/list/Joined.java
@@ -34,6 +34,9 @@
*
* @param <X> Type of source item
* @since 0.20
+ * @todo #1... | 6 | 6 | 3 | [{"id": "G0", "claim": "The class should be named `JoinedListIterator` instead of `ListIteratorJoined`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "New classes should use `@since 1.0.0` and constructors should not carry a `@since` tag.", "cat... | null |
yegor256__cactoos__1551 | yegor256/cactoos | 1,551 | defect | ffe672109b1a6a90cedf315b0dc9f81fbcbec820 | 2672566cd12bfda60350c0b8b33c4f1a9bf13219 | (#1498) Added 'text.Newline' | #1498
- Implemented the Newline that returns a text that is the default system line separator | diff --git a/src/main/java/org/cactoos/text/Newline.java b/src/main/java/org/cactoos/text/Newline.java
new file mode 100644
index 000000000..532ca8aab
--- /dev/null
+++ b/src/main/java/org/cactoos/text/Newline.java
@@ -0,0 +1,39 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * Pe... | 3 | 3 | 2 | [{"id": "G0", "claim": "Newline should be implemented as a TextEnvelope wrapping Formatted(\"%n\") so that equals and hashCode are consistent across all text implementations.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "There should also be tests for e... | null |
yegor256__cactoos__1556 | yegor256/cactoos | 1,556 | defect | 40a91f8424032ae5ff4e8b7c9bf114a3fb34aee1 | 991be0d194794afbd46ebd73c2e9775a0d56bbae | (#1449) Introduce new decorators to prevent stream to be closed | For #1449
- Introduce for `Input` decorators `SafeInput` and `SafeInputStream`
- Introduce for `Output` decorators `SafeOutput` and `SafeOutputStream`
- Introduce some unit tests for these new classes
| diff --git a/src/main/java/org/cactoos/io/SafeInput.java b/src/main/java/org/cactoos/io/SafeInput.java
new file mode 100644
index 0000000000..d3772e34bd
--- /dev/null
+++ b/src/main/java/org/cactoos/io/SafeInput.java
@@ -0,0 +1,57 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2020 Yegor Bugayenko
+ *
+ * ... | 9 | 6 | 2 | [{"id": "G0", "claim": "The unclosable-decorator solution is not good because unclosable streams will cause leakage; instead the PR should ensure all calls to Input#stream/Output#stream happen inside try-with-resources and provide additional methods (or a smart class) so that closing is controlled.", "category": "desig... | null |
yegor256__cactoos__1557 | yegor256/cactoos | 1,557 | defect | 55c45346da28f57d122fd3dcd0bebd7078eebae4 | 894cc11e0f441ab6a30bafd9651a00a85acfa728 | (#1533) Exploit generic variance in package bytes | For #1533
- Use generic variance in package bytes as explained in #1533
| diff --git a/src/main/java/org/cactoos/bytes/CheckedBytes.java b/src/main/java/org/cactoos/bytes/CheckedBytes.java
index bd478c007..a60553af6 100644
--- a/src/main/java/org/cactoos/bytes/CheckedBytes.java
+++ b/src/main/java/org/cactoos/bytes/CheckedBytes.java
@@ -43,14 +43,14 @@ public final class CheckedBytes<E exten... | 3 | 3 | 1 | [{"id": "G0", "claim": "The `? extends byte[]` wildcard on the UncheckedBytes fallback Func is not needed and should be dropped.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "New tests should be introduced to exercise the generic variance that the Check... | null |
yegor256__cactoos__1576 | yegor256/cactoos | 1,576 | defect | 297f62637cae056e9dd9e68886c45c985d5fc295 | 9507b763238d9625c2ea19256cfe29122d523289 | (#1411) Actually use latest hamcrest 2.2 | This was missing from #1411 to actually use hamcrest 2.2 instead of the old one from junit dependencies | diff --git a/pom.xml b/pom.xml
index fdd38fc556..95ebfe1b82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,12 +131,12 @@ The MIT License (MIT)
<artifactId>junit</artifactId>
<version>4.13</version>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <a... | 2 | 2 | 0 | [{"id": "G0", "claim": "In the entrySet() test of NoNullsTest, the IsMapContaining matchers should have been replaced with HasEntry rather than IsIterableContaining wrapping IsEntry.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In TernaryTest's inputSc... | null |
yegor256__cactoos__1580 | yegor256/cactoos | 1,580 | defect | 3e379198640de461f188b9f8ef8987e3b426edf1 | 1143ab3efff3ca41974289c40a236379549f1324 | (#1453) Migrate test to JUnit 5 | For #1453. Migrate tests to JUnit 5 for test packages :
- `org.cactoos`
- `org.cactoos.bytes`
- `org.cactoos.collection`
- `org.cactoos.experimental` | diff --git a/pom.xml b/pom.xml
index 95ebfe1b8..e7ad9cff2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -117,7 +117,7 @@ The MIT License (MIT)
</exclusions>
</dependency>
<!--
- @todo #1416:30min Migrate the rest of tests to JUnit 5 Junit 4 Rule
+ @todo #1453:30min Continue migration of tests to JUnit ... | 1 | 1 | 0 | [{"id": "G0", "claim": "The new HexOfTest assertions should also match the message of the expected IOException, not just its type.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1581 | yegor256/cactoos | 1,581 | defect | 3e379198640de461f188b9f8ef8987e3b426edf1 | f3d3400f3f66b6d18b792acd76d45bbe69e9fb0f | (#1434) Replace calls to Matchers with their OO counterparts | For #1434 :
- Replace calls to `Matchers` for test package `com.cactoos.io` | diff --git a/pom.xml b/pom.xml
index 95ebfe1b8..9d499bc96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -255,7 +255,7 @@ The MIT License (MIT)
<signaturesFile>./src/test/resources/forbidden-apis.txt</signaturesFile>
</signaturesFiles>
<!--
- @todo #1223:30min In the ... | 3 | 2 | 0 | [{"id": "G0", "claim": "The assertion failure messages in LoggingOutputTest should say \"Must\" instead of \"Can't\".", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Empty assertion messages, such as the new Assertion<>(\"\", ...) in LoggingInp... | null |
yegor256__cactoos__1582 | yegor256/cactoos | 1,582 | defect | 3e379198640de461f188b9f8ef8987e3b426edf1 | a2652152d32cb55ce3465b61204b55955620b544 | #1579: Prefer CharSequence over String | Per #1579
- Prefer CharSequence as a parameter inside `org.cactoos.text` | diff --git a/src/main/java/org/cactoos/text/TextOf.java b/src/main/java/org/cactoos/text/TextOf.java
index 42ed8209c..aca4a5378 100644
--- a/src/main/java/org/cactoos/text/TextOf.java
+++ b/src/main/java/org/cactoos/text/TextOf.java
@@ -368,7 +368,7 @@ public TextOf(final InputStream input) {
*
* @param sca... | 1 | 1 | 0 | [{"id": "G0", "claim": "The pull request missed updating the javadoc in several places: parameter and field docs still say String/Text where this PR changed the types to CharSequence.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1593 | yegor256/cactoos | 1,593 | defect | 8a34d58a8ff0aa34ed7a90a7cbe3c4b8aceed072 | 8b8009017239effceeebf019ce7bd642d53ae2cf | Make `RangeOf` & `Matched` immutable | Per #1592
- Make `RangeOf` immutable
- Make `Matched` immutable | diff --git a/src/main/java/org/cactoos/iterable/Matched.java b/src/main/java/org/cactoos/iterable/Matched.java
index 70fb1dbe95..869ff39f8c 100644
--- a/src/main/java/org/cactoos/iterable/Matched.java
+++ b/src/main/java/org/cactoos/iterable/Matched.java
@@ -62,7 +62,7 @@ public <Y> Matched(
) {
super(
... | 5 | 5 | 2 | [{"id": "G0", "claim": "The new MatchedTest tests should not use org.junit.jupiter.api.Assertions (an API heading for the project's forbidden-api list); find an alternative way of testing, e.g. drop the null-content checks that are not what the test is about.", "category": "testing", "verdict": "supported", "priority":... | null |
yegor256__cactoos__1596 | yegor256/cactoos | 1,596 | defect | 2a963ed9fca2abfbe29706967e41170c6c437a19 | c8ba6dbb31d8f556856993715f42c7641c9c91a4 | (#1538) - replace the constructor to use an iterable | The PR is related to #1538, but also has solution for #1537, because they are interconnected. | diff --git a/src/main/java/org/cactoos/iterable/Paged.java b/src/main/java/org/cactoos/iterable/Paged.java
index 21ed0094e..de2dff58b 100644
--- a/src/main/java/org/cactoos/iterable/Paged.java
+++ b/src/main/java/org/cactoos/iterable/Paged.java
@@ -23,7 +23,6 @@
*/
package org.cactoos.iterable;
-import java.util.I... | 1 | 1 | 1 | [{"id": "G0", "claim": "The Iterable/Paged constructor should wrap the iterator in a `Scalar<Iterator>` instead of creating `org.cactoos.iterator.Paged` directly inside `IterableOf` (as done in #1592).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
yegor256__cactoos__1599 | yegor256/cactoos | 1,599 | defect | 2a963ed9fca2abfbe29706967e41170c6c437a19 | 40209ef556a7d85fa2e05abaa16f6d19a9443b3d | (#1560) Delegate `TextOf(Iterator)` to `TextOf(Iterable)` | For #1560:
- Constructor `TextOf(Iterator)` now delegates to `TextOf(Iterable)`
- Constructor `TextOf` parameter is typed as `Iterable<Character>` instead of `Iterable<?>`
- Add extra test for `TextOf(Iterable)`
- Replace usages of `TextOf(Iterable<?>)` with `Joined` and `Concatenated`
| diff --git a/src/main/java/org/cactoos/iterable/IterableOf.java b/src/main/java/org/cactoos/iterable/IterableOf.java
index 183ddca2d..329e9e795 100644
--- a/src/main/java/org/cactoos/iterable/IterableOf.java
+++ b/src/main/java/org/cactoos/iterable/IterableOf.java
@@ -33,7 +33,7 @@
import org.cactoos.scalar.ScalarWith... | 5 | 5 | 2 | [{"id": "G0", "claim": "TextOf(Iterator) should delegate to TextOf(Iterable) rather than the other way round, because otherwise the Text object can be consumed only once before its iterator is exhausted.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Map... | null |
yegor256__cactoos__1625 | yegor256/cactoos | 1,625 | defect | 445cf166a5a43b483524b4df7e25ece05e12dca3 | 022b9cb61f4746fa3ebcdd92519ed257e98d45d8 | (#1618) MapOf(map, X, Y) and MapOf(X, Y) new ctors | For issue #1618
Added new constructors:
* `MapOf(map, X, Y)`
* `MapOf(X, Y)`
And tests | diff --git a/src/main/java/org/cactoos/map/MapOf.java b/src/main/java/org/cactoos/map/MapOf.java
index d49d7d68df..bbd0d8f3a4 100644
--- a/src/main/java/org/cactoos/map/MapOf.java
+++ b/src/main/java/org/cactoos/map/MapOf.java
@@ -47,6 +47,15 @@
*/
public final class MapOf<X, Y> extends MapEnvelope<X, Y> {
+ /*... | 1 | 1 | 0 | [{"id": "G0", "claim": "The javadoc of the MapOf class should be updated as explained in the ticket, because it does not reflect the behaviour of the class.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
yegor256__cactoos__1626 | yegor256/cactoos | 1,626 | defect | 445cf166a5a43b483524b4df7e25ece05e12dca3 | d84fa3f6dcda6f0ee7923f2893286934d168800f | (#1569) Generify `org.cactoos.scalar` package | For #1569.
Relaxed parameter types by adding wildcards in constructors of classes of `org.cactoos.scalar` package:
- `And`
- `AndInThreads`
- `AndWithIndex`
- `FirstOf`
- `IoChecked`
- `ItemAt`
- `NoNulls`
- `PropertiesOf`
- `Repeated`
- `Retry`
- `ScalarOfSupplier`
- `Solid`
- `Sticky`
- `Synced`
-... | diff --git a/src/main/java/org/cactoos/scalar/And.java b/src/main/java/org/cactoos/scalar/And.java
index dd33598d1..cb023ab63 100644
--- a/src/main/java/org/cactoos/scalar/And.java
+++ b/src/main/java/org/cactoos/scalar/And.java
@@ -68,7 +68,7 @@ public final class And implements Scalar<Boolean> {
/**
* The ... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new ItemAt ctor's fallback parameter should be typed Func<? super Iterable<? extends T>, ? extends T>, with 'extends' rather than 'super' for the Iterable type parameter.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The... | null |
yegor256__cactoos__1635 | yegor256/cactoos | 1,635 | defect | 2d3d898c7fa656b565d13b4ce49359a925c8078b | 96afa40b7f878fee7a1f678ec2526e65ecd7ba73 | (#1566) Generify org.cactoos.list package | For #1566:
Generify some classes in org.cactoos.list package:
- org.cactoos.list.Immutable
- org.cactoos.list.ImmutableListIterator
- org.cactoos.list.Joined
- org.cactoos.list.JoinedListIterator
| diff --git a/src/main/java/org/cactoos/list/Immutable.java b/src/main/java/org/cactoos/list/Immutable.java
index 15220af0d..716e6f432 100644
--- a/src/main/java/org/cactoos/list/Immutable.java
+++ b/src/main/java/org/cactoos/list/Immutable.java
@@ -49,13 +49,13 @@ public final class Immutable<T> implements List<T> {
... | 3 | 1 | 0 | [{"id": "G0", "claim": "The generified varargs constructor ListIterator<? extends T>... now permits new JoinedListIterator<Number>(an Integer ListIterator, a Double ListIterator), which the author offers as a counter-example to the change.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "intr... | null |
yegor256__cactoos__1647 | yegor256/cactoos | 1,647 | defect | e9125cd0a826a99ccd4c73ef018eaa2faa3ca0bc | 53cc2c2e5f523b7de14d0ab48dfb2b0fbea186e3 | (#1564) Exploit generic variance of IO package | For #1564 "Exploit generic variance for package org.cactoos.io".
Generify classes in `org.cactoos.io` package
- `CheckedInput`
- `CheckedOutput`
- `InputWithFallback`
- `Joined`
- `OutputStreamTo`
- `ReaderOf`
- `TempFolder`
- `Zip`
- To be able to generify `io` package I had to update `IoCheckedFunc` from `f... | diff --git a/src/main/java/org/cactoos/func/IoCheckedFunc.java b/src/main/java/org/cactoos/func/IoCheckedFunc.java
index 126009d81..b62a51f26 100644
--- a/src/main/java/org/cactoos/func/IoCheckedFunc.java
+++ b/src/main/java/org/cactoos/func/IoCheckedFunc.java
@@ -42,13 +42,13 @@ public final class IoCheckedFunc<X, Y> ... | 3 | 3 | 2 | [{"id": "G0", "claim": "The Zip overload accepting an arbitrary path list deserves a test case covering that behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The Zip(Directory) constructor with its cast to Iterable<? extends Path> is unnecessar... | null |
yegor256__cactoos__174 | yegor256/cactoos | 174 | defect | a12bc619f8892e31c46243b88b5abb380e10b60c | 6492b8dc513d487fe3468abd579a3b68f0c8e873 | ComposedFunc | https://github.com/yegor256/cactoos/pull/15 reincarnation | diff --git a/src/main/java/org/cactoos/func/ComposedFunc.java b/src/main/java/org/cactoos/func/ComposedFunc.java
new file mode 100644
index 000000000..a7ba5b1e2
--- /dev/null
+++ b/src/main/java/org/cactoos/func/ComposedFunc.java
@@ -0,0 +1,109 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Yegor Bugayenk... | 6 | 6 | 1 | [{"id": "G0", "claim": "The class should be generic over three type parameters (e.g. ComposedFunc<X, Y, Z>) instead of the two-parameter design that erases the intermediate types to Object.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Don't use the inl... | null |
yegor256__cactoos__1743 | yegor256/cactoos | 1,743 | defect | 2c07c52afe46cb119b9b156a00dd1531a6671506 | 979663dfb9690f2a3c9433f4b2a0380218546582 | Adding an OOP analogue for StringUtils.splitPreserveAllTokens ISSUE #1722 | Rationale of some decisions made:
1) Functional Interface allows use of custom String splitter function avoiding the static method calls
2) A new class created as modifying already existing Split class would not be shorter : if we add some checking for flags would create just as many constructors as with 2 distinct c... | diff --git a/src/main/java/org/cactoos/TriFunc.java b/src/main/java/org/cactoos/TriFunc.java
new file mode 100644
index 000000000..e500276b8
--- /dev/null
+++ b/src/main/java/org/cactoos/TriFunc.java
@@ -0,0 +1,47 @@
+/*
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2024 Yegor Bugayenko
+ *
+ * Permission is her... | 1 | 1 | 0 | [{"id": "G0", "claim": "Add a more detailed explanation, with an example, to the TriFuncSplitPreserve class Javadoc because it is currently hard to understand what the class is for.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__1782 | yegor256/cactoos | 1,782 | defect | f7990c3052623496fe4250b99690bda07a4bae5b | 7363b8f9e207d55631fef46f1f10a42631d0d5ef | Add Union class for set operations | This PR adds a new `Union` class to the package that represents the union of two sets. The implementation follows the same pattern as the existing Diff class.
The Union class:
Extends `SetEnvelope<T>`
Provides constructors for various input types (iterables, iterators, scalar suppliers)
Includes a private static m... | diff --git a/src/main/java/org/cactoos/set/Union.java b/src/main/java/org/cactoos/set/Union.java
new file mode 100644
index 000000000..870654345
--- /dev/null
+++ b/src/main/java/org/cactoos/set/Union.java
@@ -0,0 +1,92 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2017-2025 Yegor Bugayenko
+ * SPDX-License-Identifi... | 1 | 1 | 1 | [{"id": "G0", "claim": "The @since tags this PR adds to the new Union code are inaccurate and should be corrected everywhere in Union to the actual next release version, 0.58.0, instead of 0.49 (or the author's interim 1.0).", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}... | null |
yegor256__cactoos__1784 | yegor256/cactoos | 1,784 | defect | f7990c3052623496fe4250b99690bda07a4bae5b | c4ef50d8de4e9f78b40cf5324883755e807a25d3 | Implement MapDiff class for map difference operations | This PR introduces a new `MapDiff` class that allows computing the difference between two maps. The implementation follows the functional programming principles of Cactoos.
Features
Computes the difference between two maps (entries in the first map that are not in the second map)
Supports various input types:
Maps
... | diff --git a/src/main/java/org/cactoos/map/MapDiff.java b/src/main/java/org/cactoos/map/MapDiff.java
new file mode 100644
index 000000000..c48f38c02
--- /dev/null
+++ b/src/main/java/org/cactoos/map/MapDiff.java
@@ -0,0 +1,114 @@
+/*
+ * SPDX-FileCopyrightText: Copyright (c) 2017-2025 Yegor Bugayenko
+ * SPDX-License-I... | 4 | 4 | 0 | [{"id": "G0", "claim": "The class-level `@since 1.0` tag on MapDiff.java is inaccurate and should say `@since 0.58.0`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The redundant `@since 1.0` tags on the constructors' and computeDiff's Javadoc in... | null |
yegor256__cactoos__1855 | yegor256/cactoos | 1,855 | defect | 369a114a0ee652d5942f61f28fba601a4881fb39 | 0171e710d296de8abf662988d6e368da6489d592 | #1852: Fix Solid does not compute null value only once | @yegor256 Fix Solid does not compute null value only once | diff --git a/src/main/java/org/cactoos/scalar/Solid.java b/src/main/java/org/cactoos/scalar/Solid.java
index 1bb0b141d..7abf575fb 100644
--- a/src/main/java/org/cactoos/scalar/Solid.java
+++ b/src/main/java/org/cactoos/scalar/Solid.java
@@ -28,6 +28,11 @@ public final class Solid<T> implements Scalar<T> {
*/
... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new computed-flag caching in Solid.value() is not thread-safe, and a concurrent test with 100 threads should verify it; sooner or later a race condition will be hit.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
yegor256__cactoos__275 | yegor256/cactoos | 275 | defect | e58e7e1ffad0537b7562439b4404401e485a65d5 | 440f7f2d908f70a8f98f9a23eaebdaa13322fd33 | #262: LoggingInput and LoggingOutput | As per #262:
- `FakeLogger` introduced. This a logger for tests
- `LoggingInput` introduced.
- `LoggingOutput` introduced. | diff --git a/src/main/java/org/cactoos/io/LoggingInput.java b/src/main/java/org/cactoos/io/LoggingInput.java
new file mode 100644
index 0000000000..c29ba02d62
--- /dev/null
+++ b/src/main/java/org/cactoos/io/LoggingInput.java
@@ -0,0 +1,87 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Yegor Bugayenko
+ *... | 13 | 7 | 2 | [{"id": "G0", "claim": "LoggingInput.stream() and LoggingOutput.stream() should declare `throws IOException` instead of wrapping the origin in UncheckedInput/UncheckedOutput.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new classes' @since javadoc ... | null |
yegor256__cactoos__543 | yegor256/cactoos | 543 | defect | ef4086f5ff64852c84c40140b1a48ce0392b1b31 | cb8bfa424ba65742110fa4c2200232bd52bd40e5 | #532 AvgOf() bug on Double edge values fixed | Fixing Issue #532
After reading @vmotsak comments and also considering @svendiedrichsen input and reading a few more things on the theme, like [here](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html), [here](https://en.wikipedia.org/wiki/IEEE_754-1985) and [here](https://en.wikipedia.org/wik... | diff --git a/src/main/java/org/cactoos/scalar/AvgOf.java b/src/main/java/org/cactoos/scalar/AvgOf.java
index 623e193b8..1547c6a8d 100644
--- a/src/main/java/org/cactoos/scalar/AvgOf.java
+++ b/src/main/java/org/cactoos/scalar/AvgOf.java
@@ -210,15 +210,15 @@ public AvgOf(final Double... src) {
return sum /... | 4 | 3 | 1 | [{"id": "G0", "claim": "The pull request fixes the edge-value averaging bug only for Double and leaves the same problem in Integer, Float and Long unfixed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G3", "claim": "Averaging 100.0 and 100.266 does not return ... | null |
yegor256__cactoos__581 | yegor256/cactoos | 581 | defect | c34b676935c064cdaceca276e03e0197ecc65077 | fdd3766bdf13a700e324565e98d5fcfb37b9c39b | #532 Declarative fix of AvgOf() bug on Double edge values | #532 is mine now: https://github.com/yegor256/cactoos/issues/532#issuecomment-360486873 Based on #543
Close #532 close #543 | diff --git a/src/main/java/org/cactoos/scalar/AvgOf.java b/src/main/java/org/cactoos/scalar/AvgOf.java
index 44b37a0b3..478beaec5 100644
--- a/src/main/java/org/cactoos/scalar/AvgOf.java
+++ b/src/main/java/org/cactoos/scalar/AvgOf.java
@@ -23,9 +23,12 @@
*/
package org.cactoos.scalar;
-import java.util.Iterator;
... | 5 | 4 | 0 | [{"id": "G0", "claim": "The reduction should probably use BigDecimal#add(BigDecimal, MathContext) so the addition is consistent in precision with the divide below.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The lambda parameters are wrapped in unnece... | null |
yegor256__cactoos__601 | yegor256/cactoos | 601 | defect | 6360f7fd4d7a156fc64f768c0f2cbb4dbcf8eae9 | 50bb0e3453fef861bcf49d33bc74e5078978514d | #413 add normal Mapped.toString() | Close #413
| diff --git a/src/main/java/org/cactoos/collection/Mapped.java b/src/main/java/org/cactoos/collection/Mapped.java
index 6dca3b4f0..a57449987 100644
--- a/src/main/java/org/cactoos/collection/Mapped.java
+++ b/src/main/java/org/cactoos/collection/Mapped.java
@@ -27,6 +27,7 @@
import java.util.Iterator;
import org.cacto... | 3 | 3 | 1 | [{"id": "G0", "claim": "Provide more declarative failure messages in the new Mapped string() tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the copy-pasted test code in the Mapped string() tests.", "category": "maintainability", "verdict":... | null |
yegor256__cactoos__602 | yegor256/cactoos | 602 | defect | 6360f7fd4d7a156fc64f768c0f2cbb4dbcf8eae9 | dd1708ae4027a53a503311787c69b6942ec11050 | #600 fixing overflow error with int value | Using BigDecimal for summation of values. Similar to `AvgOf` processing. | diff --git a/src/main/java/org/cactoos/scalar/SumOf.java b/src/main/java/org/cactoos/scalar/SumOf.java
index 887b5678a..48248ef07 100644
--- a/src/main/java/org/cactoos/scalar/SumOf.java
+++ b/src/main/java/org/cactoos/scalar/SumOf.java
@@ -23,8 +23,9 @@
*/
package org.cactoos.scalar;
-import java.util.Iterator;
+... | 1 | 1 | 0 | [{"id": "G0", "claim": "The tests should pass the ListOf (an Iterable) directly to SumOf without the toArray conversion the change introduced, which would be more OOP style.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__605 | yegor256/cactoos | 605 | defect | f45afb81436b3d0aa5199e272c45c9c26e764029 | 33786ca78cfcbc778e8ea57f7a4cba8c273b75d7 | #502 GzipInput and GzipOutput | #502 is mine now as per https://github.com/yegor256/cactoos/issues/502#issuecomment-360621144 and #503 seems to be dead at this point.
Based on #503. Fixed the remaining remarks: formating + more tests.
Close #502, close #503 | diff --git a/src/main/java/org/cactoos/io/GzipInput.java b/src/main/java/org/cactoos/io/GzipInput.java
new file mode 100644
index 000000000..fef44cb43
--- /dev/null
+++ b/src/main/java/org/cactoos/io/GzipInput.java
@@ -0,0 +1,77 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *
+ * P... | 3 | 3 | 0 | [{"id": "G0", "claim": "Update the writeToClosedGzipOutput test to create its temporary file with org.cactoos.io.TempFile instead of Files.createTempFile.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Correct the class javadocs to proper Englis... | null |
yegor256__cactoos__647 | yegor256/cactoos | 647 | defect | ba5f0559c7c507217811e45c53c8567800316950 | c8ec616c21a2894dac89bc23e4d8888a9a16a7d9 | #595 Implemented Grouped class for grouping iterable elements | #595 Implemented class `Grouped` for grouping elements of iterable object.
Usage:
```
new Grouped<>(
new IterableOf<>(1, 1, 1, 4, 5, 6, 7, 8, 9),
number -> number,
Object::toString
)
``` | diff --git a/src/main/java/org/cactoos/map/Grouped.java b/src/main/java/org/cactoos/map/Grouped.java
new file mode 100644
index 000000000..81b5f556d
--- /dev/null
+++ b/src/main/java/org/cactoos/map/Grouped.java
@@ -0,0 +1,74 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *
+ * Perm... | 4 | 4 | 2 | [{"id": "G0", "claim": "The Javadoc `@since` tag should say 0.30 (next release after the last one, 0.29), not 0.4.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The type parameters of Grouped are named and ordered misleadingly: the parameter type... | null |
yegor256__cactoos__691 | yegor256/cactoos | 691 | defect | 017b6907b0256e0ca7e30005a42d6083297fd65e | 3708a71d43dcf47629fc1fcc5a48756c7b7b4069 | (#666) Added unit tests for CallableOf | As per #666:
Added missing tests for these ctors:
* `CallableOf(final Runnable runnable)`
* `CallableOf(final Proc<X> proc)`
* `CallableOf(final Func<X, T> fnc, final X ipt)`
| diff --git a/README.md b/README.md
index 006339b68..a6dfe4d91 100644
--- a/README.md
+++ b/README.md
@@ -263,6 +263,7 @@ Note: [Checkstyle](https://en.wikipedia.org/wiki/Checkstyle) is used as a static
- [@alex-semenyuk](https://github.com/alex-semenyuk) as Alexey Semenyuk
- [@smallcreep](https://github.com/small... | 4 | 2 | 0 | [{"id": "G0", "claim": "The explicit casts like (Runnable) in the new tests are unnecessary and may mislead readers into thinking the cast is required, so they should be removed since the test names already say what is being converted.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": ... | null |
yegor256__cactoos__697 | yegor256/cactoos | 697 | defect | 29819e46450ca50e81bf3c07d61f460a93b84eab | d6f89501ee05c96e9c4a2a41a8b392ca907b24ba | #655 - Added toString() method to CollectionEnvelope class. | As per #655
I have added the `toString()` method to the parent class (`CollectionEnvelope`).
There is no need to add it to the `CollectionOf` class.
The parent class uses the `toString` method of` java.util.collection`.
Empty collection: `[]`
Non-empty collection: `[1, 2, 3, 4]` | diff --git a/src/main/java/org/cactoos/collection/CollectionEnvelope.java b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
index 15e102db2..7475497e3 100644
--- a/src/main/java/org/cactoos/collection/CollectionEnvelope.java
+++ b/src/main/java/org/cactoos/collection/CollectionEnvelope.java
@@ -137,4 +137,... | 3 | 1 | 1 | [{"id": "G0", "claim": "The reviewer questions why the new `// @checkstyle DesignForExtensionCheck (5 lines)` suppression comment above toString() is needed, implying it may be unnecessary.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new to... | null |
yegor256__cactoos__698 | yegor256/cactoos | 698 | defect | eff4166619b68780d963d807d29fb751ed2a4e33 | e8590a35df0e1bc15430994953e066d4d65c75cd | #631: TeeInput test class is incomplete | Pull request for the issue #631.
Started adding tests for TeeInput's ctors. Added test cases for ctors which use Byte and ByteArray as inputs and left puzzles for continuing implementing tests. | diff --git a/src/test/java/org/cactoos/io/TeeInputPartATest.java b/src/test/java/org/cactoos/io/TeeInputPartATest.java
new file mode 100644
index 000000000..23cd43475
--- /dev/null
+++ b/src/test/java/org/cactoos/io/TeeInputPartATest.java
@@ -0,0 +1,979 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 ... | 3 | 2 | 1 | [{"id": "G0", "claim": "The pull request is far too big and its tests are not grouped: split the TeeInput tests into test classes by the source of the TeeInput and keep only a couple of such classes in this PR (the rest via puzzles or separate PRs).", "category": "design", "verdict": "supported", "priority": "P1", "sco... | null |
yegor256__cactoos__701 | yegor256/cactoos | 701 | defect | eff4166619b68780d963d807d29fb751ed2a4e33 | a59fb55a9fec3b594081f38ecd0a7a9b2bae52c1 | #636: LengthOfTest.java:89-91: Fix calculation of length for | This pull request fixes issue #636. It adds a check of passed `max` for equality to `0` and if `max` equals to `0` - throws an error. | diff --git a/src/main/java/org/cactoos/io/LengthOf.java b/src/main/java/org/cactoos/io/LengthOf.java
index e8de73105..db53e1767 100644
--- a/src/main/java/org/cactoos/io/LengthOf.java
+++ b/src/main/java/org/cactoos/io/LengthOf.java
@@ -65,6 +65,11 @@ public LengthOf(final Input input) {
)
public LengthOf(fin... | 2 | 2 | 0 | [{"id": "G0", "claim": "The exception message added in LengthOf contains the typo \"Cant\" and should be spelled either \"can't\" or \"cannot\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request description does not explain the propo... | null |
yegor256__cactoos__731 | yegor256/cactoos | 731 | defect | 72597f9a38d83def80f5acdcc7ec97032b7c93ab | 7379a29e4da688ee2d64edc7536f6d6744db3556 | #721: Add matcher for TeeInput class | It is for issue #721: adds a new matcher that checks result of TeeInput class: compares both TeeInput's results (direct and copied) to the expected value. As well this new matcher has been applied to existing tests of TeeInput class. | diff --git a/src/main/java/org/cactoos/matchers/TeeInputHasResult.java b/src/main/java/org/cactoos/matchers/TeeInputHasResult.java
new file mode 100644
index 000000000..d93752e8c
--- /dev/null
+++ b/src/main/java/org/cactoos/matchers/TeeInputHasResult.java
@@ -0,0 +1,136 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyri... | 4 | 3 | 0 | [{"id": "G0", "claim": "The formatting of the TeeInputHasResult constructors is not consistent (the closing bracket placement differs between constructors).", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The matcher should use org.cactoos.scalar... | null |
yegor256__cactoos__740 | yegor256/cactoos | 740 | defect | 72597f9a38d83def80f5acdcc7ec97032b7c93ab | e9f70723beea743cb4e277ca8562d93f9926cc29 | #638 Zip a list of files (or a Directory) | For #638
**Problem**
There aren't any OOP way to create ZIP archive from `Directory`.
**Solution**
Add `Zip implements Input` which wraps the `Directory` to `Input` as result of work with `ZipOutputStream`. | diff --git a/src/main/java/org/cactoos/io/Zip.java b/src/main/java/org/cactoos/io/Zip.java
new file mode 100644
index 000000000..7b0550075
--- /dev/null
+++ b/src/main/java/org/cactoos/io/Zip.java
@@ -0,0 +1,96 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *
+ * Permission is hereb... | 4 | 4 | 1 | [{"id": "G0", "claim": "In Zip.stream(), `@Override` should be placed on its own line above `public`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Why does the code assume the first path from the directory is the root and skip it when zipping?... | null |
yegor256__cactoos__750 | yegor256/cactoos | 750 | defect | 41400a5bbd416c7e71024fe747e338f945a91220 | b8cbe1cc2018611d20e7a190f0b49ed7f522369f | #726 Bytes from hex missed | For #726
**Problem**
There isn't any way to convert `HexOf` to `Bytes`.
**Solution**
Added new class `HexBytes` because ctor `BytesOf(final Text text)` already exists. | diff --git a/src/main/java/org/cactoos/bytes/HexBytes.java b/src/main/java/org/cactoos/bytes/HexBytes.java
new file mode 100644
index 000000000..c732bb319
--- /dev/null
+++ b/src/main/java/org/cactoos/bytes/HexBytes.java
@@ -0,0 +1,93 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *... | 1 | 1 | 0 | [{"id": "G0", "claim": "Use Arrays.equals instead of the hand-written comparison loop to compare the byte arrays in the validHex test, to simplify that bit of code.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
yegor256__cactoos__778 | yegor256/cactoos | 778 | defect | b4223ce3e096424397e33058568b587844d93b24 | 4915b5a1363b3dde51f39e697e88eb84202f5c31 | #760 Add vararg constructors to Folded and Reduced. | This PR adds vararg constructors for the `Folded` and `Reduced` classes, as per #760
| diff --git a/src/main/java/org/cactoos/scalar/Folded.java b/src/main/java/org/cactoos/scalar/Folded.java
index e8b901b8a..7f80fecfe 100644
--- a/src/main/java/org/cactoos/scalar/Folded.java
+++ b/src/main/java/org/cactoos/scalar/Folded.java
@@ -27,6 +27,7 @@
import java.util.NoSuchElementException;
import org.cactoos... | 4 | 3 | 0 | [{"id": "G0", "claim": "The explicit type arguments `<T, Scalar<T>>` in Folded's new vararg constructor and `<T>` in Reduced's new vararg constructor can be replaced with the diamond operator `<>`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "... | null |
yegor256__cactoos__784 | yegor256/cactoos | 784 | defect | 63cf7cba5720096f9c42086a433f793bba6c09a4 | c8e4ac1cb344e8e80671775cf01312d0594f0128 | #765 added TailInput | For #765.
Created `TailInput` class that provides last N bytes of given `Input`. | diff --git a/src/main/java/org/cactoos/io/TailInput.java b/src/main/java/org/cactoos/io/TailInput.java
new file mode 100644
index 000000000..013b0d849
--- /dev/null
+++ b/src/main/java/org/cactoos/io/TailInput.java
@@ -0,0 +1,138 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *
+ * ... | 7 | 6 | 0 | [{"id": "G0", "claim": "The default buffer size is written as the magic number 16 << 10 — the reviewer asks where the number comes from and finds it too magic, and suggests changing it to just 16384.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim":... | null |
yegor256__cactoos__785 | yegor256/cactoos | 785 | defect | 9c783abd7a8f861f45503e15bbae3a27c3881822 | 5bfea74dde6905bedddee57077fffc5f6444501a | #736: Implement CheckedFunc, CheckedBiFunc, CheckedInput, CheckedOutp… | Pull request for issue #736. I've added CheckedInput, CheckedOutput and CheckedBytes which allow the user to wrap checked exception thrown by the original func/proc/etc into required type. As well I've added a new puzzle to implement CheckedFunc, CheckedBiFunc, CheckedProc and CheckedBiProc. | diff --git a/src/main/java/org/cactoos/io/CheckedBytes.java b/src/main/java/org/cactoos/io/CheckedBytes.java
new file mode 100644
index 000000000..664dd2056
--- /dev/null
+++ b/src/main/java/org/cactoos/io/CheckedBytes.java
@@ -0,0 +1,68 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
... | 5 | 5 | 3 | [{"id": "G0", "claim": "The pull request's new Checked* classes have no unit tests, so the author has to add tests to improve code coverage.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The tests for CheckedBiFunc, CheckedBiProc, CheckedFunc and Check... | null |
yegor256__cactoos__789 | yegor256/cactoos | 789 | defect | 675db96c0b2d8161329e5a37f55e9a882366106c | 7b7b647a15b89c08effcbc4adbf5691697808b5e | #755 Fix problem with Joined | Fix problem with org.cactoos.iterable.Joined for #755
| diff --git a/src/main/java/org/cactoos/iterator/Joined.java b/src/main/java/org/cactoos/iterator/Joined.java
index 05a384d57..5a9ba3c2b 100644
--- a/src/main/java/org/cactoos/iterator/Joined.java
+++ b/src/main/java/org/cactoos/iterator/Joined.java
@@ -77,6 +77,7 @@ public boolean hasNext() {
@Override
publ... | 3 | 2 | 1 | [{"id": "G0", "claim": "Replace the explicit `Joined<Integer>` type witness with `<>` in callsNextDirectlyOnNonEmptyIterator.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a test that a call to next() on an empty Joined throws NoSuchElementEx... | null |
yegor256__cactoos__800 | yegor256/cactoos | 800 | defect | 9c783abd7a8f861f45503e15bbae3a27c3881822 | d2cd0ea68998a88467b09042d021b11c2626d6dc | #759: Implement ScalarWithFallback | Pull request for issue #759.
- created ScalarWithFallback and FallbackFrom which allow the user to create a Scalar with multiple fallbacks (for different types of exceptions)
- added new tests to reach 83% of coverage
- added a new puzzle to refactor existing FuncWithFallback | diff --git a/src/main/java/org/cactoos/func/FuncWithFallback.java b/src/main/java/org/cactoos/func/FuncWithFallback.java
index 35ae5a70d..8cf1739e2 100644
--- a/src/main/java/org/cactoos/func/FuncWithFallback.java
+++ b/src/main/java/org/cactoos/func/FuncWithFallback.java
@@ -35,6 +35,11 @@
* @param <X> Type of input... | 5 | 5 | 0 | [{"id": "G0", "claim": "Add a blank line between the class description and the <p> tag in FallbackFrom's Javadoc, like in other classes.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The Javadoc of the FallbackFrom constructor reads 'Ctow.' where... | null |
yegor256__cactoos__801 | yegor256/cactoos | 801 | defect | eb314491adc421bd94e2fc241e8612ab0f0d5529 | e54bef96ff42eb735130cb7db33abfefd1c5eb55 | #764: Implement HeadInput | Pull request for issue #764.
- added new classes HeadInput and HeadInputStream
- added test cases to reach 83% of test coverage | diff --git a/src/main/java/org/cactoos/io/HeadInput.java b/src/main/java/org/cactoos/io/HeadInput.java
new file mode 100644
index 000000000..220f07f0b
--- /dev/null
+++ b/src/main/java/org/cactoos/io/HeadInput.java
@@ -0,0 +1,63 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *
+ * P... | 6 | 5 | 1 | [{"id": "G0", "claim": "HeadInput should be implemented on top of a ByteArrayInputStream instead of wrapping a custom HeadInputStream.", "category": "design", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "HeadInputStream.skip does not account for the origin stream skipping few... | null |
yegor256__cactoos__820 | yegor256/cactoos | 820 | defect | ced96f1a959fdafe95637c78b1438dc31e44c64f | 50dbb7c57a3030657af6a6ed639da99a962836d4 | #454 TeeInput class should not close the OutputStream | For #454
**Problem**
`TeeInput` closes output stream after work.
**Solution**
I have replaced `close` with `flush` for output stream in `TeeInputStream.close()`
Valuable changes only in files: `TeeInputStream` and `TeeInputStreamTest`.
All other files just tests which had broken after the fix because they di... | diff --git a/src/main/java/org/cactoos/io/TeeInputStream.java b/src/main/java/org/cactoos/io/TeeInputStream.java
index cad3d3bb6..19861a1b0 100644
--- a/src/main/java/org/cactoos/io/TeeInputStream.java
+++ b/src/main/java/org/cactoos/io/TeeInputStream.java
@@ -96,7 +96,7 @@ public int available() throws IOException {
... | 5 | 2 | 0 | [{"id": "G0", "claim": "Use `new IsEqual<>(false)` here instead of the static method call `Matchers.equalTo(false)` in the leftInputUnclosed assertion.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The StringWriterMock method `isClosed()` shoul... | null |
yegor256__cactoos__828 | yegor256/cactoos | 828 | defect | 7cb1e842d72a1878d8bf2f2b0d351068a78b1fbe | dcd703b73186144d9395926292d9a9774f8a3718 | Resolve of #788: Using Text as Map key is impossible. | Created `TextEnvelope` which provides `equals()` and `hashCode()` method to `Text`.
Created `TextEnvelopeTest`which tests above behaviors. | diff --git a/src/main/java/org/cactoos/text/TextEnvelope.java b/src/main/java/org/cactoos/text/TextEnvelope.java
new file mode 100644
index 000000000..08635d7e1
--- /dev/null
+++ b/src/main/java/org/cactoos/text/TextEnvelope.java
@@ -0,0 +1,65 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Buga... | 6 | 5 | 3 | [{"id": "G0", "claim": "TextEnvelope should be public abstract, since envelope classes exist to remove boilerplate through inheritance and should only be accessible by extending them, with a private dummy subclass used to test its methods.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "intr... | null |
yegor256__cactoos__831 | yegor256/cactoos | 831 | defect | 4738a00c1953795024ebb0af1820d22d36027f17 | 241d49f4ac007ffa807b5ce3d21fce40798218ec | #803 added iterator of booleans and chars | #803
- added `IteratorOfBooleans` and `IteratorOfChars` and used them in appropriate IterablesOf
- added tests for those
- added todo to implement similar iterators for bytes and doubles | diff --git a/src/main/java/org/cactoos/iterable/IterableOfBooleans.java b/src/main/java/org/cactoos/iterable/IterableOfBooleans.java
index 9a3aa33e0..db9330388 100644
--- a/src/main/java/org/cactoos/iterable/IterableOfBooleans.java
+++ b/src/main/java/org/cactoos/iterable/IterableOfBooleans.java
@@ -23,8 +23,8 @@
*/
... | 3 | 3 | 0 | [{"id": "G0", "claim": "The IterableOfBooleans and IterableOfChars constructors should use `super(() -> new IterableOf<>(new IteratorOfBooleans(values)))` instead of the nested lambda wrapping the iterator in an UncheckedScalar, since it does the same thing underneath.", "category": "maintainability", "verdict": "suppo... | null |
yegor256__cactoos__833 | yegor256/cactoos | 833 | defect | b0f97d7c9b3044d733995da4815b04c34d87c331 | 1ccfa0198965284abb3253aab0574d16a35abc5e | #811: InheritanceLevel for unrelated classes should be negative | Pull request for #811.
I've changed the logic of InheritanceLevel.java so that it returns Integer.MIN_VALUE (instead of MAX_VALUE) when the classes are not related. As well I've fixed all dependencies which rely on this logic. And finally, I've fixed affected tests. | diff --git a/src/main/java/org/cactoos/scalar/CheckedScalar.java b/src/main/java/org/cactoos/scalar/CheckedScalar.java
index 5a10b1f77..3b729940f 100644
--- a/src/main/java/org/cactoos/scalar/CheckedScalar.java
+++ b/src/main/java/org/cactoos/scalar/CheckedScalar.java
@@ -111,8 +111,7 @@ private E wrappedException(fina... | 2 | 2 | 0 | [{"id": "G0", "claim": "The bare `>` characters in the javadoc of InheritanceLevel.java (e.g. `Integer.MIN_VALUE -> classes are not related`) should be written as `>`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the javadoc of Inheritance... | null |
yegor256__cactoos__840 | yegor256/cactoos | 840 | defect | 4738a00c1953795024ebb0af1820d22d36027f17 | c9b9b580c7ef45725232362bbaa2e335eaa08b00 | #793 added FirstOf | #793
- added `FirstOf` (as defined in the issue) and tests covering the functionality | diff --git a/src/main/java/org/cactoos/scalar/FirstOf.java b/src/main/java/org/cactoos/scalar/FirstOf.java
new file mode 100644
index 000000000..6058d3c07
--- /dev/null
+++ b/src/main/java/org/cactoos/scalar/FirstOf.java
@@ -0,0 +1,91 @@
+/**
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017-2018 Yegor Bugayenko
+ *... | 4 | 4 | 1 | [{"id": "G0", "claim": "The @since javadoc tag in FirstOf and FirstOfTest says 0.31, but 0.31 is already released, so it should say 0.32.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The class javadoc states that FirstOf is thread-safe, but the ... | null |
yegor256__cactoos__843 | yegor256/cactoos | 843 | defect | fc157ce6941a0881faa9d11256bea485654172bc | 416a654c1611934e2301cf60e57783e380a44a3d | #551 FuncOf returning null on apply | For #551
**Problem**
`FuncOf` can wrap `Proc` without result value. And in such case `null` result was an expected behavior.
But `null` is prohibited by the design principles.
**Solution**
- I have removed ctors from `FuncOf` without result value, and add ctors with result value in connected classes (as `BiFunc... | diff --git a/src/main/java/org/cactoos/func/BiFuncOf.java b/src/main/java/org/cactoos/func/BiFuncOf.java
index d33edc630c..43ce3b475a 100644
--- a/src/main/java/org/cactoos/func/BiFuncOf.java
+++ b/src/main/java/org/cactoos/func/BiFuncOf.java
@@ -73,14 +73,6 @@ public BiFuncOf(final Func<X, Z> fnc) {
this((fir... | 3 | 3 | 1 | [{"id": "G0", "claim": "The pull request is too big: the SyncProc enhancement belongs in its own issue, and only a handful of classes should be refactored here together with their tests, with puzzles created for the remaining classes.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduce... | null |
yegor256__cactoos__856 | yegor256/cactoos | 856 | defect | 26fd17aeb8133329382fd61a9e4c0c0fb8dfea9f | 1fa147906e53af6a477aeb0a6364b8249901e527 | FuncWithFallbacks uses ScalarWithFallbacks | This is for #821.
This:
- Replace the ad-hoc implementation of `FuncWithFallbacks` with use of `ScalarWithFallbacks`.
- Add more tests to `FuncWithFallbackTest` in order to cover the new extra behaviours of `FuncWithFallbacks`
- Rework some of the tests of `FuncWithFallbackTest` to be more object-oriented (less c... | diff --git a/src/main/java/org/cactoos/func/FuncWithFallback.java b/src/main/java/org/cactoos/func/FuncWithFallback.java
index 8cf1739e26..e647e331c9 100644
--- a/src/main/java/org/cactoos/func/FuncWithFallback.java
+++ b/src/main/java/org/cactoos/func/FuncWithFallback.java
@@ -24,6 +24,9 @@
package org.cactoos.func;
... | 2 | 2 | 0 | [{"id": "G0", "claim": "Replace the single-fallback constructor with FuncWithFallback(final Func<X, Y> fnc, final FallbackFrom<Y>... fbks) to simplify usage.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Replace the (fnc, fbk, flw) constructor with publ... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.