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__860
yegor256/cactoos
860
defect
2541fa2978761521253b2d05a80b6f764d67d666
b2d6b1f8d8f607cfae903c69054056fdf7e4d54d
#849 Makeing Text classes extend TextEnvelope
#849 * made `JoinedText`, `TextOf`, `LowerText`, `NormalizedText`, `RepeatedText` extend TextEvelope (and tuned the code in those to work correctly) * added `toString` to `TextEnvelope`
diff --git a/src/main/java/org/cactoos/text/JoinedText.java b/src/main/java/org/cactoos/text/JoinedText.java index 814ab104a..b736b8568 100644 --- a/src/main/java/org/cactoos/text/JoinedText.java +++ b/src/main/java/org/cactoos/text/JoinedText.java @@ -24,6 +24,7 @@ package org.cactoos.text; import java.util.String...
3
1
0
[{"id": "G0", "claim": "The Text transformations (lower-casing, joining, normalizing, repeating) should not be written in the constructors of LowerText, JoinedText, NormalizedText and RepeatedText but applied outside the constructor, as ctors must be code-free.", "category": "design", "verdict": "opposed", "priority": ...
null
yegor256__cactoos__865
yegor256/cactoos
865
defect
a1d668482dcee79481f46533312243a0917da528
cd42e15f8bbbdac87bbfddd8104c5165a792d1a3
#844: Implement equals and hashCode for MapEnvelope
Pull request for #844. - implemented methods `equals` and `hashCode` for `MapEnvelope` class. Implementation depends on the entries of the map. - added new test cases to cover implemented methods - added a new puzzle to add equals/hashCode for CollectionEnvelope
diff --git a/src/main/java/org/cactoos/collection/CollectionEnvelope.java b/src/main/java/org/cactoos/collection/CollectionEnvelope.java index fc16a8285..f024782ad 100644 --- a/src/main/java/org/cactoos/collection/CollectionEnvelope.java +++ b/src/main/java/org/cactoos/collection/CollectionEnvelope.java @@ -36,6 +36,10...
2
2
0
[{"id": "G0", "claim": "In mapEqualsToMapWithSameEntries the two maps should be built from two distinct MapEntry instances holding the same key/value pair, so that value (not identity) comparison is enforced.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
yegor256__cactoos__894
yegor256/cactoos
894
defect
62e1fa40c653767850816f3383d27558cdb6e17e
d51aa6b0d52d908edadb0e5ff1f3d5b6977ec35d
#881 equals and hashCode for CollectionEnvelope
Introduced `equals` and `hashCode` in `CollectionEnvelope` for #881
diff --git a/src/main/java/org/cactoos/collection/CollectionEnvelope.java b/src/main/java/org/cactoos/collection/CollectionEnvelope.java index f024782ad..3cdca5ca5 100644 --- a/src/main/java/org/cactoos/collection/CollectionEnvelope.java +++ b/src/main/java/org/cactoos/collection/CollectionEnvelope.java @@ -27,19 +27,1...
2
2
2
[{"id": "G0", "claim": "The equals implementation's InheritanceLevel check cannot recognize classes that merely implement Collection, so CollectionEnvelope compares unequal to regular JDK Collections; llorllale asked that this be left as a puzzle before merging.", "category": "correctness", "verdict": "supported", "pri...
null
yegor256__cactoos__952
yegor256/cactoos
952
defect
32c96d908d850eac9380200c16c6ee71a2e7514c
f1faeca71f2876931f48f134f4682d0902a0f8a9
For #942: Fixed `TextEnvelope.equals()` misbehavior.
For #942: - Fixed `TextEnvelope.equals()` misbehavior; - Fixed `TextEnvelopeTests` tests regarding `TextEnvelope.equals()`; - Added puzzle for refactoring and making code more elegant.
diff --git a/src/main/java/org/cactoos/text/TextEnvelope.java b/src/main/java/org/cactoos/text/TextEnvelope.java index c92c6a0e5..ae2985c80 100644 --- a/src/main/java/org/cactoos/text/TextEnvelope.java +++ b/src/main/java/org/cactoos/text/TextEnvelope.java @@ -73,8 +73,23 @@ public final int hashCode() { retur...
2
2
0
[{"id": "G0", "claim": "equals() (and, by extension, the code around it) should be programmed against the Text interface rather than the TextEnvelope implementation.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @todo #942 puzzle comment does not fo...
null
yegor256__cactoos__959
yegor256/cactoos
959
defect
1dfd0766c34fe3c3255b1a8cbba318cf383d08c8
e07fcdea252c91851a568aa6a737ad29f98e59b4
# 955 Refactor text envelope equals
I did not handle null in the equals method because it wasn't handle before. I am new to this project and to this way of coding, even if I road your two books, I am a bit disoriented. I am a bit puzzle by the fact your linter does not accept variable namedLikeThat, would be happy to know why ? Because previous cod...
diff --git a/src/main/java/org/cactoos/text/TextEnvelope.java b/src/main/java/org/cactoos/text/TextEnvelope.java index 830896d799..244f4dbe3b 100644 --- a/src/main/java/org/cactoos/text/TextEnvelope.java +++ b/src/main/java/org/cactoos/text/TextEnvelope.java @@ -26,7 +26,9 @@ import java.io.IOException; import org.ca...
2
2
1
[{"id": "G0", "claim": "The equality logic should not be split over the equalsOther/equalsOtherText helper methods but kept entirely inside the equals method.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The equals method should also handle th...
null
yegor256__cactoos__970
yegor256/cactoos
970
defect
6d67e67be437df720866b21cba7916041468f3cc
fe8134fd63fe62863d6df85e435af75f805730da
Setting up set package
I have not seen anything related to sets in cactoos and I think that it is a good idea to give them full support to make cactoos fully compatible with java collections.
diff --git a/src/main/java/org/cactoos/set/SetEnvelope.java b/src/main/java/org/cactoos/set/SetEnvelope.java new file mode 100644 index 000000000..11e472528 --- /dev/null +++ b/src/main/java/org/cactoos/set/SetEnvelope.java @@ -0,0 +1,55 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017-2018 Yegor Bugayenko +...
5
5
1
[{"id": "G0", "claim": "Remove the word \"tests\" from the set package description in package-info.java.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the extra space prepended to the javadoc lines in SetOfTest.java.", "category": "maintai...
null
yegor256__cactoos__973
yegor256/cactoos
973
defect
6d67e67be437df720866b21cba7916041468f3cc
7152ee3ef3df70a803a5577d895d20a09fb3eb11
Implement a new scalar: MultiplicationOf (#864)
MultiplicationOf and DivisionOf for supporting more math operations as described in #864 .
diff --git a/src/main/java/org/cactoos/scalar/DivisionOf.java b/src/main/java/org/cactoos/scalar/DivisionOf.java new file mode 100644 index 000000000..0ca0d4443 --- /dev/null +++ b/src/main/java/org/cactoos/scalar/DivisionOf.java @@ -0,0 +1,59 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017-2018 Yegor Bugay...
2
2
1
[{"id": "G0", "claim": "Javadocs should be added to the test methods of the new test classes DivisionOfTest and MultiplicationOfTest.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MultiplicationOf should not silently return 1 for an empty input: ...
null
yegor256__cactoos__990
yegor256/cactoos
990
defect
91331735a6826def281554180d8423043a3baaa7
95f817e73913585e9f3f7b62d70d6ff03d3eb96c
#852: Fix the NoNulls classes API inconsistency
This PR for #852 contains: - 1 todo task for modification of Bytes, Input, Output - 1 todo task for modification of Collection, Iterator (all others implementation of collections are already fixed) - 1 todo task for modification of Proc, Func, BiFunc, BiProc - Moved NoNulls for Scalar and Text, with fixes for t...
diff --git a/src/main/java/org/cactoos/Func.java b/src/main/java/org/cactoos/Func.java index 6c5a7f50b..3609d81f0 100644 --- a/src/main/java/org/cactoos/Func.java +++ b/src/main/java/org/cactoos/Func.java @@ -62,6 +62,9 @@ public interface Func<X, Y> { * @param <X> Type of input * @param <Y> Type of output ...
2
2
0
[{"id": "G0", "claim": "The NoNulls tests in ScalarTest and TextTest should match the exception class and message instead of only declaring the class in @Test(expected=...), using ExpectedException as a @Rule, and this should be done for all exceptions.", "category": "testing", "verdict": "supported", "priority": "P2",...
null
yegor256__cactoos__993
yegor256/cactoos
993
defect
91331735a6826def281554180d8423043a3baaa7
55909837bd9b1ccd31bff1c8ab3d89f30bf7518c
#980 Avoid compound names for packages with scalar, set, text, and time
This PR for #980 contains: - 1 todo task for the renaming of Text(s) - 1 todo task for the renaming of Scalar(s) - 1 todo task for the renaming of Set(s) - 1 todo task for the renaming of `org.cactoos.time` classes - Renaming of few Text implementations
diff --git a/src/main/java/org/cactoos/package-info.java b/src/main/java/org/cactoos/package-info.java index a0921b61e..203886a3c 100644 --- a/src/main/java/org/cactoos/package-info.java +++ b/src/main/java/org/cactoos/package-info.java @@ -35,9 +35,5 @@ * @since 0.1 * @see <a href="http://www.cactoos.org">Project ...
2
1
0
[{"id": "G0", "claim": "The planned renaming of Base64Text/TextBase64 is undefined and should be settled, starting with what sort of change the author has in mind.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new text-decorator class should be name...
null
yegor256__cactoos__995
yegor256/cactoos
995
defect
8855bd25c83c09967e276c7c47d9b03ed8e12168
1a7622eb4c8cc173e88078cee8974bc53ad170e1
#941 Strict with tests for validating Text
Strict that implements Text as described in #941. It encapsulates Text and validates it using predicate which is Func<String, Boolean>.
diff --git a/src/main/java/org/cactoos/text/Strict.java b/src/main/java/org/cactoos/text/Strict.java new file mode 100644 index 000000000..83f946e7d --- /dev/null +++ b/src/main/java/org/cactoos/text/Strict.java @@ -0,0 +1,73 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2017-2018 Yegor Bugayenko + * + * Permi...
7
6
1
[{"id": "G0", "claim": "Throw IllegalArgumentException instead of the raw Exception on validation failure, and remove the @SuppressWarnings(\"PMD.AvoidThrowingRawExceptionTypes\") that is then unneeded.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The ...
null
yegor256__takes__1003
yegor256/takes
1,003
defect
d540ade05836b6316a87bce05c8faf1c5719164e
8a94e62071e8e4f010a8c12c307c63e94d9471dd
#1002 refactor TkSlf4j
Actually it is my first opensource PR, and more like a training of Yegor's OOP style. I'll be grateful for some critics https://github.com/yegor256/takes/issues/1002
diff --git a/src/main/java/org/takes/tk/TkSlf4j.java b/src/main/java/org/takes/tk/TkSlf4j.java index 685fb925f7..f5023d6a7b 100644 --- a/src/main/java/org/takes/tk/TkSlf4j.java +++ b/src/main/java/org/takes/tk/TkSlf4j.java @@ -25,6 +25,9 @@ package org.takes.tk; import java.io.IOException; +import java.util.ArrayLi...
5
4
2
[{"id": "G0", "claim": "The build fails because the pull request's code contains many checkstyle/PMD violations; fix them and submit a new commit so the build passes.", "category": "build", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Build the log arguments and message with ...
null
yegor256__takes__1092
yegor256/takes
1,092
defect
7866dcc1aa1fde6756e405e5a772dc1050c8011f
ac256bb1fdc8bb6ad977e97ade20fe056b825ecf
(#1074, #1075) Refactor RsPrint and introduce tests for HeadPrint and BodyPrint
For #1074, #1075 - Remove print methods from RsPrint, HeadPrint and BodyPrint - Introduce test for HeadPrint and BodyPrint
diff --git a/src/main/java/org/takes/http/BkBasic.java b/src/main/java/org/takes/http/BkBasic.java index 72dbe69242..89a7e2830a 100644 --- a/src/main/java/org/takes/http/BkBasic.java +++ b/src/main/java/org/takes/http/BkBasic.java @@ -29,6 +29,7 @@ import java.io.OutputStream; import java.net.HttpURLConnection; impo...
6
5
0
[{"id": "G0", "claim": "In BkBasic.print the response bytes could be obtained via BytesOf, or better, RsPrint should implement Bytes itself so asBytes() can be used instead of asString().getBytes(UTF_8) (possibly as a separate todo).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced...
null
yegor256__takes__1094
yegor256/takes
1,094
defect
7866dcc1aa1fde6756e405e5a772dc1050c8011f
77e5a343b6b642b87c8ba385a256e37640ab4b6c
(#1088) Improve test coverage
For #1088 - Improve test coverage of packages xe, fork and tk
diff --git a/pom.xml b/pom.xml index f67a2d1fb9..46d3005d48 100644 --- a/pom.xml +++ b/pom.xml @@ -486,7 +486,7 @@ SOFTWARE. <goal>report</goal> </goals> <!-- - @todo #1067:30m This limits are set according to + @todo #1088:30m T...
3
1
0
[{"id": "G0", "claim": "The assertion added to XeWhenTest should use cactoos instead of commons-io IOUtils to convert the response body to a string.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The 'sudo update-java-alternatives -s java-1.8.0-...
null
yegor256__takes__1101
yegor256/takes
1,101
defect
925e1a2cdef20afecb4b55a650a6b749dc390b1c
c88d9c808eec97d6ab4ef08394364c70438c2cca
(#997) Introduce a test to show bug
For #997 : - Create `CopyBytesUntilBoundary` to extract `copy` function - Introduce a test to show bug
diff --git a/src/main/java/org/takes/rq/multipart/CopyBytesUntilBoundary.java b/src/main/java/org/takes/rq/multipart/CopyBytesUntilBoundary.java new file mode 100644 index 0000000000..563f6520ea --- /dev/null +++ b/src/main/java/org/takes/rq/multipart/CopyBytesUntilBoundary.java @@ -0,0 +1,119 @@ +/* + * The MIT Licens...
1
1
0
[{"id": "G0", "claim": "JUnit 5 test classes and methods in CopyBytesUntilBoundaryTest should not be declared 'public'.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__1135
yegor256/takes
1,135
defect
41df45d24458acb82b4043966cc91afd8d03e25e
4f4b1be0e44d850de65f9427e0e79b7f9a330268
Construct RqHeaders.Smart from Request
Remove unnecessary `new RqHeaders.Base(req)` calls if we construct `RqHeaders.Smart`.
diff --git a/src/main/java/org/takes/facets/auth/PsBasic.java b/src/main/java/org/takes/facets/auth/PsBasic.java index 2fd1eadb09..1e960bf13d 100644 --- a/src/main/java/org/takes/facets/auth/PsBasic.java +++ b/src/main/java/org/takes/facets/auth/PsBasic.java @@ -88,9 +88,7 @@ public PsBasic(final String rlm, final PsBa...
2
1
0
[{"id": "G0", "claim": "Line 91 of PsBasic.java, added by this pull request, is 105 characters long and must be at most 100.", "category": "style", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test modifications should be submitted first in a separate pull request and onl...
null
yegor256__takes__131
yegor256/takes
131
defect
28b27161ba785c9f03a9a45e3d414eb943402466
af0ddd2c4a97861a289b315352e21d683a7dac13
#129 PsCookie doesn't set HttpOnly
task #129 added HttpOnly flag to cookie produced by PsCookie updated unit test
diff --git a/src/main/java/org/takes/facets/auth/PsCookie.java b/src/main/java/org/takes/facets/auth/PsCookie.java index d6d66409ac..7afa6d2274 100644 --- a/src/main/java/org/takes/facets/auth/PsCookie.java +++ b/src/main/java/org/takes/facets/auth/PsCookie.java @@ -125,7 +125,8 @@ public Response exit(final Response r...
2
2
0
[{"id": "G0", "claim": "In PsCookie.java, the \"HttpOnly\" cookie attribute should be placed before the Expires attribute instead of after it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In PsCookieTest.java, the assertion should be folded into a sing...
null
yegor256__takes__1320
yegor256/takes
1,320
defect
fed1d870a4b474a9f49066fff2cf568eebcbbc04
ccea8144bfdeaaabd42b5c3ac6e4842de80813d9
fixed #1293 'Takes framework has an XSLT injection vulnerability'
@yegor256 Please review. Fix for https://github.com/yegor256/takes/issues/1293 >> Takes framework has an XSLT injection vulnerability
diff --git a/src/main/java/org/takes/rs/RsXslt.java b/src/main/java/org/takes/rs/RsXslt.java index e572b85ae9..0c88ca99cc 100644 --- a/src/main/java/org/takes/rs/RsXslt.java +++ b/src/main/java/org/takes/rs/RsXslt.java @@ -29,6 +29,7 @@ import java.net.URI; import java.util.Map; import java.util.concurrent.Concurren...
1
1
0
[{"id": "G0", "claim": "The new XXE test should be placed as a test method inside the existing RsXsltTest class instead of a new RsXsltXxeTest class, since all test methods that belong to one class belong in one *Test class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__143
yegor256/takes
143
defect
5a9a2377888e6b2443c9a42503ed62bdfe074e80
80a4d1c6cd892e5217965d17b7e28f720b378d19
Pull request for issue #114 "RsWithHeader doesn't validate header correctness"
@yegor256 here is fix for issue #114 @elenavolokhova description: Problem: RsWithHeader must validate header validity, through some regular expression. At the moment, we let any header to go into the response, which is error-prone. Resolution: during creating instance of RsWithHeader additional header validate throw ...
diff --git a/src/main/java/org/takes/rs/RsWithHeader.java b/src/main/java/org/takes/rs/RsWithHeader.java index 431d20f627..891677dc9d 100644 --- a/src/main/java/org/takes/rs/RsWithHeader.java +++ b/src/main/java/org/takes/rs/RsWithHeader.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.util.LinkedList; ...
6
5
0
[{"id": "G0", "claim": "Add a description of what was fixed, as the QA rules require, and ultimately put it in the ticket's own description instead of leaving it in a comment.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "unclear"}, {"id": "G1", "claim": "Add javadoc for the class R...
null
yegor256__takes__162
yegor256/takes
162
defect
354a45382acd9deb5115b0f7627042de8512cc39
c448b2401bc6a786316786d376ded75ba036afbd
#140 RqCookies must be an interface
for #140 - refactored RqCookies as an interface - created RqCookies.Base which implement RqCookies
diff --git a/src/main/java/org/takes/facets/auth/PsCookie.java b/src/main/java/org/takes/facets/auth/PsCookie.java index bad0914ff6..93a6bd2edd 100644 --- a/src/main/java/org/takes/facets/auth/PsCookie.java +++ b/src/main/java/org/takes/facets/auth/PsCookie.java @@ -97,7 +97,7 @@ public PsCookie(final Codec cdc, final ...
3
3
0
[{"id": "G0", "claim": "The @since tags of the new RqCookies interface and its Base class should be changed to 0.14, since the interface is provided only starting from the next version.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The name param...
null
yegor256__takes__175
yegor256/takes
175
defect
080ae2ea334afdb93c0d6ee4a356ebc5c970abc3
06863fbdeda9d5b3d6d8339ca81d229b9735e099
11: Pass for Twitter added.
Pass for twitter added. Todo: PsTwitterTest has to be implemented or XeTwitterLink & XeTwitterLinkTest have to be implemented which will test PsTwitter too. PR #175 for issue #11.
diff --git a/pom.xml b/pom.xml index 88af4d59f8..b708a80bff 100644 --- a/pom.xml +++ b/pom.xml @@ -135,6 +135,11 @@ <scope>compile</scope> <optional>true</optional> </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId...
6
6
3
[{"id": "G0", "claim": "The pull request is not allowed to add the external commons-codec dependency with compile scope; it should use javax.xml.bind.DatatypeConverter instead, which would also make the Base64 import and the prepareAuthKey method unnecessary.", "category": "design", "verdict": "supported", "priority": ...
null
yegor256__takes__177
yegor256/takes
177
defect
489ce961de04e9b16b5d423fc5bf3875a629ee3a
4c929e3e0c4e961b21281fbe6711e527da7c6e42
#137 RqMethod must be an interface
For task #137 - refactored RqMethod as interface - created RqMethod.Base which implements RqMethod
diff --git a/src/main/java/org/takes/facets/fork/FkMethods.java b/src/main/java/org/takes/facets/fork/FkMethods.java index b7a3a71298..2b16321fa7 100644 --- a/src/main/java/org/takes/facets/fork/FkMethods.java +++ b/src/main/java/org/takes/facets/fork/FkMethods.java @@ -87,7 +87,7 @@ public FkMethods(final Collection<S...
2
2
1
[{"id": "G0", "claim": "The HTTP method constants should stay in the RqMethod interface instead of being declared inside the nested Base class.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test should reference the constant as RqMethod.POST rather ...
null
yegor256__takes__178
yegor256/takes
178
defect
489ce961de04e9b16b5d423fc5bf3875a629ee3a
3e21604db32df0f493305ed01bc668261e6b320d
#138 - Refactored RqMultipart into an interface, implemented by RqMultipart.Base
I refactored `RqMultipart` into an interface, and added a `Base` implementation. I followed the example set by `RqHref`. Fixes #138
diff --git a/src/main/java/org/takes/facets/forward/package-info.java b/src/main/java/org/takes/facets/forward/package-info.java index 0cb4d71b8c..23f979499b 100644 --- a/src/main/java/org/takes/facets/forward/package-info.java +++ b/src/main/java/org/takes/facets/forward/package-info.java @@ -37,7 +37,7 @@ * &#64;...
1
1
0
[{"id": "G0", "claim": "The pull request adds javadoc comments to overridden methods in RqMultipart.Base (part() and names()), which is unnecessary and should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__179
yegor256/takes
179
defect
489ce961de04e9b16b5d423fc5bf3875a629ee3a
b15497e1be00e28f6a9e53e8149155bd50c60a51
RqForm must be an interface #135
This PR fixes https://github.com/yegor256/takes/issues/135 1. Refactored RqForm to interface 2. Moved RqForm implementation to RqForm.Base
diff --git a/src/main/java/org/takes/rq/RqForm.java b/src/main/java/org/takes/rq/RqForm.java index c3ee25c8c5..e05b30b689 100644 --- a/src/main/java/org/takes/rq/RqForm.java +++ b/src/main/java/org/takes/rq/RqForm.java @@ -57,94 +57,101 @@ * @link <a href="http://www.w3.org/TR/html401/interact/forms.html">Forms in HT...
4
3
0
[{"id": "G0", "claim": "The RqForm.Base class added by this pull request lacks its own javadoc block and should have one.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should be reformatted to comply with the teamed.io QA rules."...
null
yegor256__takes__186
yegor256/takes
186
defect
489ce961de04e9b16b5d423fc5bf3875a629ee3a
089aa550fdcfbc8fa08c868138d01071823c3c25
#132 CcXOR is not strong enough
@davvd , implementation of AES algorithm using JCE has been done for this task #132 . Would you please review? Thanks.
diff --git a/src/main/java/org/takes/facets/auth/codecs/CcAES.java b/src/main/java/org/takes/facets/auth/codecs/CcAES.java new file mode 100644 index 0000000000..c46f651208 --- /dev/null +++ b/src/main/java/org/takes/facets/auth/codecs/CcAES.java @@ -0,0 +1,167 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 20...
7
6
0
[{"id": "G0", "claim": "The constant value that is used only in a single method should not be extracted as a field; it should be inlined.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The encrypt and decrypt Cipher instances should be initialized once i...
null
yegor256__takes__188
yegor256/takes
188
defect
77373875f5a7e78c51f3efeebbe319085ae957e7
b186671679e1b68d95fc6e3d1d709e5df4d6ed99
#187 Iterator is a wrong concept for Fork.route()
For #187 - created interface Opt - created decorator Opt.Holder - created Opt.Empty - replaced Iterator<> to Opt<> in route() for all implementations of Fork
diff --git a/src/main/java/org/takes/facets/fork/FkAnonymous.java b/src/main/java/org/takes/facets/fork/FkAnonymous.java index 0711558619..570c58f60a 100644 --- a/src/main/java/org/takes/facets/fork/FkAnonymous.java +++ b/src/main/java/org/takes/facets/fork/FkAnonymous.java @@ -24,15 +24,13 @@ package org.takes.facets...
4
4
1
[{"id": "G0", "claim": "The @since tag on the newly added Opt interface says 0.13.8 but the class is introduced in 0.14, so the tag should be corrected to 0.14.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The Holder javadoc should say that the ...
null
yegor256__takes__197
yegor256/takes
197
defect
9aa1d51a830e48616cf88176bf7ec7793a6b3151
5b1c9f6e2815b375da285ba7e47580c244943003
#94 BkTimeable
For #94 - created BkTimeable - Back decorator with maximum lifetime - created unit test for BkTimeable - added a new argument to FtCLI to configure this behavior from command line
diff --git a/src/main/java/org/takes/http/BkTimeable.java b/src/main/java/org/takes/http/BkTimeable.java new file mode 100644 index 0000000000..96c2bb0659 --- /dev/null +++ b/src/main/java/org/takes/http/BkTimeable.java @@ -0,0 +1,138 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * ...
6
5
0
[{"id": "G0", "claim": "The class javadoc should close its `<p>` tag with `</p>`.", "category": "documentation", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "BkTimeable should avoid extracting variables that are used only once, such as the single-use constant and the single-use...
null
yegor256__takes__208
yegor256/takes
208
defect
7ec2ee336d140bdace388460ddd463b9658f2481
24bf030911cb9a6bba409f2a59da38caea839e9b
#206 RqLengthAware doesn't intercept the other two read() methods
for #206 - implemented the other two InputStream.read() methods
diff --git a/src/main/java/org/takes/rq/RqLengthAware.java b/src/main/java/org/takes/rq/RqLengthAware.java index 2d6cda4e37..c4acb30dbf 100644 --- a/src/main/java/org/takes/rq/RqLengthAware.java +++ b/src/main/java/org/takes/rq/RqLengthAware.java @@ -128,6 +128,21 @@ public int read() throws IOException { ...
2
2
1
[{"id": "G0", "claim": "The pull request implements the two extra InputStream.read() methods with no tests at all, and several tests should be created for them.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new tests do not need to specify a Conten...
null
yegor256__takes__212
yegor256/takes
212
defect
1c3810094315eb33abaf1bfc0eb15f53ec84f432
73bcce07d0eca7da2f9f06358703f98cad9e49aa
RsMatchStatus matcher refactored to HmRsStatus
RsMatchStatus matcher refactored to HmRsStatus. It is now encapsulating to another matcher #166
diff --git a/src/main/java/org/takes/facets/hamcrest/HmRsStatus.java b/src/main/java/org/takes/facets/hamcrest/HmRsStatus.java index 4b0770785e..6789ede7f1 100644 --- a/src/main/java/org/takes/facets/hamcrest/HmRsStatus.java +++ b/src/main/java/org/takes/facets/hamcrest/HmRsStatus.java @@ -25,13 +25,14 @@ import jav...
7
7
0
[{"id": "G0", "claim": "Rename the field `expected` to `matcher` in HmRsStatus.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rename the constructor parameter `matcher` to `mtchr` in HmRsStatus.", "category": "maintainability", "verdict": "supp...
null
yegor256__takes__214
yegor256/takes
214
defect
cdb1013da8b67d5aa959e708386b9f5569818d67
27d4526047078fcebc0e630d619db313465f5d08
#105 Create CcGzip coded decorator which compress and uncompress data.
Create CcGzip codec decorator which compress and decompress data. #105 - original issue.
diff --git a/src/main/java/org/takes/facets/auth/codecs/CcGzip.java b/src/main/java/org/takes/facets/auth/codecs/CcGzip.java new file mode 100644 index 0000000000..b323d5d0ea --- /dev/null +++ b/src/main/java/org/takes/facets/auth/codecs/CcGzip.java @@ -0,0 +1,113 @@ +/** + * The MIT License (MIT) + * + * Copyright (c)...
6
6
1
[{"id": "G0", "claim": "The private `compress` helper should be inlined into `encode` since it is not used anywhere else.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The private `uncompress` helper should be inlined into `decode` since it is short and...
null
yegor256__takes__232
yegor256/takes
232
defect
59b79400f256c467afc2c0ac9fa65a139fe09147
b4c1752b63774a01f1878828f4ba273976498cbd
#160 let's get rid of List.add() - Part 1
For task #160, replacing List.add() usage with Concat. This PR is split from #183
diff --git a/src/main/java/org/takes/misc/Concat.java b/src/main/java/org/takes/misc/Concat.java new file mode 100644 index 0000000000..2389a34da2 --- /dev/null +++ b/src/main/java/org/takes/misc/Concat.java @@ -0,0 +1,117 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Permission i...
6
6
0
[{"id": "G0", "claim": "The javadoc of ConcatIterator's fields misspells 'from' as 'form' and should be corrected.", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The ConcatIterator ctor javadoc should not repeat the class description; just 'Ctor.'...
null
yegor256__takes__234
yegor256/takes
234
defect
59b79400f256c467afc2c0ac9fa65a139fe09147
fe6a251db06b34ff61d1f5c33bb50c27dea1b329
#160 let's get rid of List.add() - Part 3
For task #160, introducing Transform for eliminating the use of `List.add()` in `RsWithHeaders`. This PR is split from #183
diff --git a/src/main/java/org/takes/misc/Transform.java b/src/main/java/org/takes/misc/Transform.java new file mode 100644 index 0000000000..61876552d5 --- /dev/null +++ b/src/main/java/org/takes/misc/Transform.java @@ -0,0 +1,109 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Per...
3
3
0
[{"id": "G0", "claim": "Move the //@todo #160 comment that sits above the Ctor into the javadoc below it in RsWithHeaders.java.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The build is red with failing tests and a PMD violation that, as asaen...
null
yegor256__takes__235
yegor256/takes
235
defect
2e57ea822a1e27083a50e6578ef7871bbe23aeba
4153627cb08ec7cb29f4321c9c3e1a606467ecfe
Implementation of #106 (TkMethods decorator)
Implementation of https://github.com/yegor256/takes/issues/106. (TkMethods) 1. Created TkMethods decorator 2. Created test case for TkMethods
diff --git a/src/main/java/org/takes/facets/fork/TkMethods.java b/src/main/java/org/takes/facets/fork/TkMethods.java new file mode 100644 index 0000000000..a2b33a47db --- /dev/null +++ b/src/main/java/org/takes/facets/fork/TkMethods.java @@ -0,0 +1,50 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor B...
9
9
2
[{"id": "G0", "claim": "The argument indentation in the Mockito.verify(...) block of TkMethodsTest does not match the style of the surrounding lines and should be aligned with them.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tests use Ra...
null
yegor256__takes__255
yegor256/takes
255
defect
fe57e6a23cb6128c0b13a016a724def0487c517b
63e952e8dc23ebccdae3922902dc61ea38fe0d46
#248 RqMultipart.Base is too slow with big requests
For #248 - made some speed optimization in RqMultipart.Base - java.io.\* has been replaced for java.nio.* - parsing time for a 100mb request reduced from 14s to 1s I used the code below to measure execution time ``` final int length = 100000000; final long start = System.currentTimeMillis(); final Request req = ne...
diff --git a/src/main/java/org/takes/rq/RqMultipart.java b/src/main/java/org/takes/rq/RqMultipart.java index 2bf0c96f0f..1b8744c61a 100644 --- a/src/main/java/org/takes/rq/RqMultipart.java +++ b/src/main/java/org/takes/rq/RqMultipart.java @@ -23,15 +23,16 @@ */ package org.takes.rq; -import java.io.BufferedOutputS...
5
4
1
[{"id": "G0", "claim": "The buffer size computation should use Math.min(8192, stream.available()) instead of the verbose if-statement that shrinks 8192 to stream.available().", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add the author's time-m...
null
yegor256__takes__289
yegor256/takes
289
defect
c0b445a2de8cf5a3e233f632d4223cf52015cda9
76a5bee38f2325911214c50e9b700b3e9da25cd6
Fixed RsWithType duplicating headers.
For #217 RsWithType will now also use RsWithoutHeader to make sure it replaces any previous types before adding the new one. I also added tests for RsWithType. As it is my first change for the team, feel free to point out anything so I can improve present and future work. Thanks.
diff --git a/src/main/java/org/takes/rs/RsWithType.java b/src/main/java/org/takes/rs/RsWithType.java index 4c54aaa8f4..9a4d307b43 100644 --- a/src/main/java/org/takes/rs/RsWithType.java +++ b/src/main/java/org/takes/rs/RsWithType.java @@ -39,6 +39,11 @@ @EqualsAndHashCode(callSuper = true) public final class RsWithTy...
3
2
0
[{"id": "G0", "claim": "The test should avoid string concatenation by using String.format(\"Content-Type: %s\", type) instead of header + type, which also removes the single-use header variable.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The...
null
yegor256__takes__299
yegor256/takes
299
defect
87cb6336fd39aa26e28311f6a9d4890082d6758b
f224e1c594ec8ffb9ed8baa3ea34765bdf75d18c
Fix for "RsWithType overrides status code"
Please review this PR fixing "RsWithType overrides status code" #298 The fix actually removes passing HTTP OK status code.
diff --git a/src/main/java/org/takes/rs/RsWithType.java b/src/main/java/org/takes/rs/RsWithType.java index f4dd85a483..393d565bab 100644 --- a/src/main/java/org/takes/rs/RsWithType.java +++ b/src/main/java/org/takes/rs/RsWithType.java @@ -23,7 +23,6 @@ */ package org.takes.rs; -import java.net.HttpURLConnection; ...
6
6
0
[{"id": "G0", "claim": "The two arguments on lines 55 and 56 of the RsWithType constructor can be inlined into line 54.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Lines 61-64 of replaceTypeToResponse are indented four spaces too much and sho...
null
yegor256__takes__300
yegor256/takes
300
defect
87cb6336fd39aa26e28311f6a9d4890082d6758b
b511c7c4ddab211dc2cb47a21dcb24f972fedaac
#285: add support for multi-line headers (RqLive)
#285: Checks if a new line starts with SP and has not colon. Then appends it to last header value.
diff --git a/src/main/java/org/takes/rq/RqLive.java b/src/main/java/org/takes/rq/RqLive.java index 123f0b7849..eea42cc1ba 100644 --- a/src/main/java/org/takes/rq/RqLive.java +++ b/src/main/java/org/takes/rq/RqLive.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.io.InputStream; import java.net.HttpURLC...
6
5
2
[{"id": "G0", "claim": "Changing head from Collection to List is unnecessary because no List-specific operations are used.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The single-use local variable header should be inlined into the checkAndAddHeader meth...
null
yegor256__takes__308
yegor256/takes
308
defect
05c25499f3d0ff5f694517b54b7cf4633428bb7f
8bad8389d3cf8428ce2ea4a9c68ddb3a9c7e3a27
RsPrettyXML created
This is fix for https://github.com/yegor256/takes/issues/296. Added new `RsPrettyXML` class and test `RsPrettyXMLTest` for it.
diff --git a/src/main/java/org/takes/rs/RsPrettyXML.java b/src/main/java/org/takes/rs/RsPrettyXML.java new file mode 100644 index 0000000000..a28ed194e3 --- /dev/null +++ b/src/main/java/org/takes/rs/RsPrettyXML.java @@ -0,0 +1,123 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Per...
3
2
0
[{"id": "G0", "claim": "Synchronizing operations on the already thread-safe CopyOnWriteArrayList is unnecessary, and addIfAbsent(E) could be used to avoid the synchronized block.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test name comparesObjects ...
null
yegor256__takes__314
yegor256/takes
314
defect
fa53b8bec6d282f48bcca960d8566c254af3d2fb
4d95a44261e613260629ee0775c1a56ce262154f
Made RsWithCookie able to combine the given value with previous ones. #293
For #293 RsWithCookie is now capable to override the decorated response head part, combining any potential previous value of the `Set-Cookie:` header with the new one. The new cookie value will be added after a comma. ','. Eg: Before: `Set-Cookie: foo=test1` After: `Set-Cookie: foo=test1,bar=test2` The decorator is...
diff --git a/src/main/java/org/takes/rs/RsWithCookie.java b/src/main/java/org/takes/rs/RsWithCookie.java index 3f68288b4b..33ea1540f8 100644 --- a/src/main/java/org/takes/rs/RsWithCookie.java +++ b/src/main/java/org/takes/rs/RsWithCookie.java @@ -23,6 +23,8 @@ */ package org.takes.rs; +import java.io.IOException; ...
4
4
1
[{"id": "G0", "claim": "previousValue() should not swallow the IOException from res.head() and silently return inside the catch block instead of propagating it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Keep the existing addsCookieToResponse un...
null
yegor256__takes__326
yegor256/takes
326
defect
43b3a19d2885c2c03f4357bb387031a19fe1fcf1
7478971d0b1d956604d1684edb103886e08b3f92
Implemented a take action to check CORS parameters. Issue #258
Implemented a take action to check CORS parameters. Issue #258
diff --git a/src/main/java/org/takes/tk/TkCORS.java b/src/main/java/org/takes/tk/TkCORS.java new file mode 100644 index 0000000000..6f72c7b4ee --- /dev/null +++ b/src/main/java/org/takes/tk/TkCORS.java @@ -0,0 +1,118 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Permission is here...
20
20
0
[{"id": "G0", "claim": "Rename the `alloweddomains` field to simply `allowed` and update the `@EqualsAndHashCode` declaration accordingly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use the `isEmpty()` method instead of comparing `size()` to...
null
yegor256__takes__328
yegor256/takes
328
defect
43b3a19d2885c2c03f4357bb387031a19fe1fcf1
4c0e4a005b2a88da5ae7a368cf3cd407dcd79b55
#323 RqMultipart.Fake expecting Request as ctor. input
<code>RqMultipart.Fake </code> accepting Request as ctor. input type. String type version is removed. Issue #323
diff --git a/src/main/java/org/takes/rq/RqMultipart.java b/src/main/java/org/takes/rq/RqMultipart.java index a3e1ccb1f8..cf29dfe4e3 100644 --- a/src/main/java/org/takes/rq/RqMultipart.java +++ b/src/main/java/org/takes/rq/RqMultipart.java @@ -309,6 +309,7 @@ private static ConcurrentMap<String, List<Request>> asMap( ...
1
1
0
[{"id": "G0", "claim": "The multipart fake body should be assembled with chained builder.append calls (e.g. builder.append(CRLF).append(body).append(CRLF)) instead of String.format, reusing the CRLF constant.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
yegor256__takes__340
yegor256/takes
340
defect
fa66e824617ced44ce3bb2c43a416ae36694dfea
071195932ad3d6be68a671938cc483b36f8807cb
#263: extract method and make cacheable
#263 Extract map method creator and make it cacheable.
diff --git a/src/main/java/org/takes/rq/RqForm.java b/src/main/java/org/takes/rq/RqForm.java index 281c396854..eb2f0f7d4f 100644 --- a/src/main/java/org/takes/rq/RqForm.java +++ b/src/main/java/org/takes/rq/RqForm.java @@ -37,6 +37,7 @@ import java.util.Locale; import java.util.concurrent.ConcurrentHashMap; import j...
5
5
1
[{"id": "G0", "claim": "The map created in map() should be initialized with an initial size of 1 instead of 0.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In Smart.param, the parameter should stay on the line above and the throws clause be declared on...
null
yegor256__takes__347
yegor256/takes
347
defect
cbee4b59f288e285ab28da5ab136e08bba977a09
64a796ebccd47391c8682a388a23f117087b1173
#346 RSJson must close the JsonWriter
For #346 - added a call to the JsonWriter.close() to flush the write to the underlying BAOS. - added unit test
diff --git a/src/main/java/org/takes/rs/RsJSON.java b/src/main/java/org/takes/rs/RsJSON.java index b00c1f2370..2c8dfd5c3a 100644 --- a/src/main/java/org/takes/rs/RsJSON.java +++ b/src/main/java/org/takes/rs/RsJSON.java @@ -28,6 +28,7 @@ import java.net.HttpURLConnection; import javax.json.Json; import javax.json.Jso...
1
1
1
[{"id": "G0", "claim": "The JsonWriter created in print() should be managed with try-with-resources since it is Closeable, or failing that, closed in a finally block.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
yegor256__takes__358
yegor256/takes
358
defect
31f3bd18ab45096693db12b9ed29b3613602297e
34d405d4b2fcd851cec38d3c5ae4593e6ca75a8d
#321 RqForm fake created to create form request with param
RqForm.Fake allows form params on constructor, please see details on #321
diff --git a/README.md b/README.md index e943b1f690..19ecc1d685 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,17 @@ public final class AppTest { } ``` + +You can create a fake request with form parameters like this: + +```java +new RqForm.Fake( + new RqFake(), + "foo", "value-1", + "bar", "value-2" +) +`...
5
5
0
[{"id": "G0", "claim": "Remove the unneeded closing </p> tag from the RqForm class javadoc, since the project's javadoc style does not use it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Extend the existing MultipleStringLiteralsCheck suppressi...
null
yegor256__takes__365
yegor256/takes
365
defect
ea7c5f8db2512590e8424957bbccf6694662ebc6
c1d8b528302bad84d186f3951872d0c99737adbc
Implement PsBasic.Default
Implement `PsBasic.Default`. This class is a Pass that maintains a collection of login/password pairs and checks a login attempt for correctness. Fixes #349
diff --git a/src/main/java/org/takes/facets/auth/PsBasic.java b/src/main/java/org/takes/facets/auth/PsBasic.java index a8575ad6c7..8c4113d14f 100644 --- a/src/main/java/org/takes/facets/auth/PsBasic.java +++ b/src/main/java/org/takes/facets/auth/PsBasic.java @@ -25,6 +25,9 @@ import java.io.IOException; import java...
5
5
1
[{"id": "G0", "claim": "The test method names (e.g. defaultPassCanAcceptCorrectLoginPasswordPair) violate the test-naming convention described in the linked article and should be renamed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "PsBasic.De...
null
yegor256__takes__366
yegor256/takes
366
defect
d33e87b36b813963a49388f1a8f3f74a7316c15a
f7bccfc9eb8db7d3c56507d21f3313f8a2a58b2b
Implement PsAll
Implement `PsAll`. This class is a `Pass` implementatoin that combines multiple `Pass`es. It can be entered if every underlying `Pass` can be entered. Fixes #350
diff --git a/src/main/java/org/takes/facets/auth/PsAll.java b/src/main/java/org/takes/facets/auth/PsAll.java new file mode 100644 index 0000000000..c6df57e523 --- /dev/null +++ b/src/main/java/org/takes/facets/auth/PsAll.java @@ -0,0 +1,111 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + ...
4
4
3
[{"id": "G0", "claim": "The test should check that PsAll.enter() returns the Identity from the 3rd (indexed) Pass.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Tests should be added for the PsAll.exit() method.", "category": "testing", "verdict": "sup...
null
yegor256__takes__381
yegor256/takes
381
defect
2ad6e912b4dba62c602eea77606cd5c77522cdcb
415298c23d0df96d6962b6c0c939a28da2238fa5
#339 RsPrettyXML is losing <!DOCTYPE html>
Fix for https://github.com/yegor256/takes/issues/339 (#339 RsPrettyXML is losing <!DOCTYPE html>)
diff --git a/pom.xml b/pom.xml index 12fa4a9e5e..ee20dc079d 100644 --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ </distributionManagement> <properties> <timestamp>${maven.build.timestamp}</timestamp> - <saxon.version>9.1.0.8</saxon.version> + <saxon.version>9.6.0-7</saxon.version> ...
2
1
0
[{"id": "G0", "claim": "The reviewer asks what happens when exactly one of the DOCTYPE's systemId and publicId is null, since the new HTML5 branch requires both ids to be null (and the name to be html).", "category": "correctness", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
yegor256__takes__404
yegor256/takes
404
defect
e3f1155574929fd02e79a7f0b5f1493984950d13
73a35134c89c2fa043456e05e1d0de78b3670dfe
#120: RqFake equals()
#120: Two RqFake instances are equal if they contain the same head and byte array body.
diff --git a/src/main/java/org/takes/rq/RqFake.java b/src/main/java/org/takes/rq/RqFake.java index 19b16c7874..08a2dc45c6 100644 --- a/src/main/java/org/takes/rq/RqFake.java +++ b/src/main/java/org/takes/rq/RqFake.java @@ -99,18 +99,7 @@ public RqFake(final List<String> head, final CharSequence body) { * @param b...
3
2
1
[{"id": "G0", "claim": "The hand-written pairwise-equality test should be replaced with an EqualsVerifier-based test that verifies the full Object.equals() contract (\"let's do it like this\").", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Instead of a...
null
yegor256__takes__411
yegor256/takes
411
defect
3978812fffc5d69f572c04848d55b3d876b71150
1ace5d0881e47210c9027843e4552bfba098ed3e
unit tests for persistent connections
#306 unit tests for persistent connections. Tests `@Ignore`-d and puzzle for implementation prepared.
diff --git a/pom.xml b/pom.xml index 2183ba5189..4be154dd9a 100644 --- a/pom.xml +++ b/pom.xml @@ -214,7 +214,6 @@ <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> - <scope>test</scope> </dependency> </dependenci...
8
8
1
[{"id": "G0", "claim": "The test should use Hamcrest matchers (e.g. RegexMatchers from jcabi-matchers) instead of java.util.regex.Pattern with JUnit Assert for consistency.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "BkReuse.accept should thr...
null
yegor256__takes__426
yegor256/takes
426
defect
50efd095b5c85764c4aaeb8e4b9b2baa8d9d3e3a
352137c765645f60fe5f50f592468f646906d3cc
Replacing Mockito statements with own fake socket object
#417 I replaced Mockito statements in [BkReuseTest.java](https://github.com/prondzyn/takes/blob/417/src/test/java/org/takes/http/BkReuseTest.java) with [MkSocket](https://github.com/prondzyn/takes/blob/417/src/main/java/org/takes/mock/MkSocket.java) according to [Built-in Fake Objects](http://www.yegor256.com/2014/09/2...
diff --git a/src/main/java/org/takes/mock/MkSocket.java b/src/main/java/org/takes/mock/MkSocket.java new file mode 100644 index 0000000000..33c477b2df --- /dev/null +++ b/src/main/java/org/takes/mock/MkSocket.java @@ -0,0 +1,49 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Permiss...
3
3
1
[{"id": "G0", "claim": "The new mock classes (MkSocket, MkSocketImpl and package-info) are missing the @since 0.26 Javadoc tag and it should be added.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MkSocket and MkSocketImpl should be made final si...
null
yegor256__takes__434
yegor256/takes
434
defect
49460128910560cb7fe6ba0d21e129e3b290bc1a
5d3222b492d0523712a9c9c174e4d3f562f13754
#412: Added additional constructors to HmRsHeader
#412: Added additional constructors to HmRsHeader.
diff --git a/pom.xml b/pom.xml index 9bebdc2644..7060af2dd9 100644 --- a/pom.xml +++ b/pom.xml @@ -125,6 +125,11 @@ <artifactId>hamcrest-core</artifactId> <optional>true</optional> </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactI...
3
1
0
[{"id": "G0", "claim": "The @since tag on the new classes should read 0.27, the current release, rather than 0.25.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Wrapping headers.next() in a hasNext() check may change the behaviour of matchesSafel...
null
yegor256__takes__440
yegor256/takes
440
defect
e68605230e271147da4683c08efab7c667f44dff
49af8fa273d00edf66f2a4ad0598e79821b8a0e0
#413: Added additional constructors to HmRqHeader
#413: Added additional constructors to HmRqHeader.
diff --git a/src/main/java/org/takes/facets/hamcrest/HmRqHeader.java b/src/main/java/org/takes/facets/hamcrest/HmRqHeader.java index b062ad368f..c19bf7fda4 100644 --- a/src/main/java/org/takes/facets/hamcrest/HmRqHeader.java +++ b/src/main/java/org/takes/facets/hamcrest/HmRqHeader.java @@ -24,12 +24,16 @@ package org....
10
10
0
[{"id": "G0", "claim": "Add an early exit in the outer loop with `if (result) { break; }`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the `outer` label from the nested loops in EntryHeaderMatcher.matches.", "category": "maintainabilit...
null
yegor256__takes__451
yegor256/takes
451
defect
fd2f1842d7c90fbcebd70c7abd8f552bb2c66fba
7dd8031396ce185af88ca38260f2fe1882f6f32e
#392: RqMethod validates the HTTP request method line.
#392: RqMethod validates the HTTP request method line.
diff --git a/src/main/java/org/takes/rq/RqMethod.java b/src/main/java/org/takes/rq/RqMethod.java index 125653ca9e..5df28bcd7a 100644 --- a/src/main/java/org/takes/rq/RqMethod.java +++ b/src/main/java/org/takes/rq/RqMethod.java @@ -25,6 +25,8 @@ import java.io.IOException; import java.util.Locale; +import java.util....
4
3
3
[{"id": "G0", "claim": "The pull request should handle HTTP extension methods, which the ticket reporter mentioned, and add a test covering them.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The supported-methods list and its test should also cove...
null
yegor256__takes__457
yegor256/takes
457
defect
c1f090a3e05f2cae6c343b476466bd386357ca69
9aad6012de244e3de2af93bad7c094c1e9956a99
#439 MainRemote should allow additional arguments to be passed
#439 MainRemote modification to allow additional arguments and its unit test
diff --git a/src/main/java/org/takes/http/MainRemote.java b/src/main/java/org/takes/http/MainRemote.java index f3b459d2a0..04b422b6f1 100644 --- a/src/main/java/org/takes/http/MainRemote.java +++ b/src/main/java/org/takes/http/MainRemote.java @@ -30,6 +30,7 @@ import java.lang.reflect.InvocationTargetException; impor...
1
1
0
[{"id": "G0", "claim": "The compound names `addArgs` (test local) and `addargs` (MainRemote field) should be renamed to just `args`, per the compound-name-is-code-smell rule.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__459
yegor256/takes
459
defect
dcc064d516bbef385528a985e5e05167bb37213a
c3e3161cd8bae1f8707ed0d4dcf9e6cab6a1bf7d
#419 create FbLog4j class, similar to FbSlf4j
Created FbLog4j and FbLog4jTest classes with implementation and test of Log4J logger. https://github.com/yegor256/takes/issues/419
diff --git a/pom.xml b/pom.xml index fb310219b9..6217de0dd8 100644 --- a/pom.xml +++ b/pom.xml @@ -214,6 +214,13 @@ <scope>compile</scope> <optional>true</optional> </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + ...
10
9
2
[{"id": "G0", "claim": "There are checkstyle violations failing the Travis build; check the build log and get it to pass.", "category": "style", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Remove the extra blank line in the FbLog4j class javadoc.", "category": "style", "verd...
null
yegor256__takes__466
yegor256/takes
466
defect
d6d4c56cfca8c20bf2ab6a14f79d90bb29ad5d4d
02dd570059474aff5fadd35cd33b0e71a6b6e758
RqHref.Base validates Request-Line format
- Issue #445 fix: `RqHref.Base` throws `HttpException` if Request-Line is absent or has invalid format. - todo suggestion. @davvd Please proceed with code review.
diff --git a/src/main/java/org/takes/rq/RqHref.java b/src/main/java/org/takes/rq/RqHref.java index 6a84fa1076..a6a7b383a2 100644 --- a/src/main/java/org/takes/rq/RqHref.java +++ b/src/main/java/org/takes/rq/RqHref.java @@ -27,6 +27,8 @@ import java.io.InputStream; import java.net.HttpURLConnection; import java.util....
3
3
1
[{"id": "G0", "claim": "The @todo puzzle comment should follow the format `#445:30min/DEV`, otherwise rultor will not merge the PR.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The compound variable names `uriMatcher` and `requestLine` in RqHref...
null
yegor256__takes__477
yegor256/takes
477
defect
ebbbdaf95cf49b220441fc94be37dede9b6f01c3
479fe64516a807ea12518cdc3c0779e21ad00a93
RsXembly can modify DOM documents
Fix for #462: `RsXembly` can modify DOM documents.
diff --git a/src/main/java/org/takes/rs/xe/RsXembly.java b/src/main/java/org/takes/rs/xe/RsXembly.java index 4ef9131874..161379d4ef 100644 --- a/src/main/java/org/takes/rs/xe/RsXembly.java +++ b/src/main/java/org/takes/rs/xe/RsXembly.java @@ -30,8 +30,13 @@ import java.io.OutputStreamWriter; import java.net.HttpURLCo...
3
2
1
[{"id": "G0", "claim": "RsXembly modifies the DOM Document provided to it as a side effect of rendering instead of only generating an XML page; the reviewer asks for a unit test proving this and for the code to be fixed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id...
null
yegor256__takes__484
yegor256/takes
484
defect
9e461a5ef780d82126db660aa0cd6dcfe7609c17
f43f53b39297089e3c86e0bedd7cb075b047d80c
#473 Refactoring Request-Line validation
Refactoring for #473 `RqHref.java:83-86: RqMethod already validates Request-Line and... #473` I created RqRequestLine interface that 2 methods: String requestLineHeader() throws IOException; // returns valid Request-line String requestLineHeaderToken(Token token) throws IOException; // returns specified token from R...
diff --git a/src/main/java/org/takes/rq/RqHref.java b/src/main/java/org/takes/rq/RqHref.java index f52b613213..4f2895fd94 100644 --- a/src/main/java/org/takes/rq/RqHref.java +++ b/src/main/java/org/takes/rq/RqHref.java @@ -27,8 +27,6 @@ import java.io.InputStream; import java.net.HttpURLConnection; import java.util....
7
6
0
[{"id": "G0", "claim": "The pull request description should describe the proposed solution in more detail and contain a link to the original ticket it is related to.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @since tag should carry the ne...
null
yegor256__takes__489
yegor256/takes
489
defect
9e461a5ef780d82126db660aa0cd6dcfe7609c17
b75e903551fe2f6621012f477479b3236015e54f
#453 - Connection reset if request body wasn't read from POST
Fix for issue #453 - Implemented TkReadAlways Take decorator as requested. After the origin take creates the response available body() content from request is skipped using InputStream.skip() method. - Added TkReadAlwaysTest test for the implemented decorator.
diff --git a/src/main/java/org/takes/tk/TkReadAlways.java b/src/main/java/org/takes/tk/TkReadAlways.java new file mode 100644 index 0000000000..1b6767e245 --- /dev/null +++ b/src/main/java/org/takes/tk/TkReadAlways.java @@ -0,0 +1,69 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * P...
3
2
0
[{"id": "G0", "claim": "The @since Javadoc tag should read 0.30 instead of 1.0 in both TkReadAlways and TkReadAlwaysTest.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The literal \"response ok\" should be extracted into a variable and reused in ...
null
yegor256__takes__507
yegor256/takes
507
defect
6a2ddb032cdf46ba0f1398f19d65801190ed89f0
adf9058cad0a512a5406ab7c1ef4f48b3c62488e
#492 moved RqWithDefault header from Netbout to Takes + added tests
#492 moved RqWithDefault header from Netbout to Takes + added tests
diff --git a/src/main/java/org/takes/rq/RqWithDefaultHeader.java b/src/main/java/org/takes/rq/RqWithDefaultHeader.java new file mode 100644 index 0000000000..c581b0ce0c --- /dev/null +++ b/src/main/java/org/takes/rq/RqWithDefaultHeader.java @@ -0,0 +1,68 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yego...
8
7
0
[{"id": "G0", "claim": "The copyright year in the added license headers should be 2016 rather than 2015, though the author raises that changing it to 2016 makes the checkstyle build fail.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The Javadoc of...
null
yegor256__takes__525
yegor256/takes
525
defect
3223ab8d433b3388ca0d1fe530c3b053f9919c06
761bf319e0545175f205c3cef3e2e13372d37a54
Fix for #433 - TkFallback crashes when there is no fallback.
Fix for #433: - Updated TkFallback to check the Opt<Response> from the given fallback, and if empty throw a message with a proper message. - Updated TkFallbackTest to run the snippet and check if the exception has the proper message.
diff --git a/src/main/java/org/takes/facets/fallback/TkFallback.java b/src/main/java/org/takes/facets/fallback/TkFallback.java index b6f6e478d2..00c590b049 100644 --- a/src/main/java/org/takes/facets/fallback/TkFallback.java +++ b/src/main/java/org/takes/facets/fallback/TkFallback.java @@ -32,6 +32,7 @@ import org.tak...
3
2
0
[{"id": "G0", "claim": "The javadoc of the new test should read `TkFallback can thrown an IOException when no fallback is available.` instead of `TkFallback can fall back.`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The indentation of `).act(...
null
yegor256__takes__526
yegor256/takes
526
defect
3223ab8d433b3388ca0d1fe530c3b053f9919c06
9069c2693baf690ad2729aa53d9a441ed5d352f7
Fix for #516 - Slashes in BkBasic
Fix for #516. Added slashes fix + junit test for this check. Maybe it will be nice to expose header name for future reuse.
diff --git a/src/main/java/org/takes/http/BkBasic.java b/src/main/java/org/takes/http/BkBasic.java index aac8d9a696..9f821cfb5a 100644 --- a/src/main/java/org/takes/http/BkBasic.java +++ b/src/main/java/org/takes/http/BkBasic.java @@ -50,9 +50,9 @@ * * @author Yegor Bugayenko (yegor@teamed.io) * @version $Id$ - *...
7
6
3
[{"id": "G0", "claim": "The pull request has checkstyle issues that fail the AppVeyor/Travis builds and must be fixed.", "category": "style", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The reformatted @todo puzzle block in BkBasicTest has an invalid format (missing space on...
null
yegor256__takes__527
yegor256/takes
527
defect
286b2d8b4159a7a21948b4849a3c895d6e1c692e
dac81a5efa664ca66d2d127acfc04f36b83217c9
#438
Resolving #438 . Added a puzzle to implement chunked bodies.
diff --git a/src/main/java/org/takes/rq/RqChunk.java b/src/main/java/org/takes/rq/RqChunk.java new file mode 100644 index 0000000000..70094e997f --- /dev/null +++ b/src/main/java/org/takes/rq/RqChunk.java @@ -0,0 +1,80 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Permission is he...
2
2
1
[{"id": "G0", "claim": "The header lines built by RqMultipart.Fake have no space before the header value (\"Content-Type:multipart/...\", \"Content-Length:%s\"); there should be one space after the colon.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
yegor256__takes__536
yegor256/takes
536
defect
9fed710a58ed3d27c42027f98dfcfd9dcada0d68
67697cc92129ed79cb2c7da8590d37e890337d1f
#254 - temp file removal and stream closure in RqMultipart
#254 - temp file removal and stream closure in RqMultipart
diff --git a/src/main/java/org/takes/rq/CapInputStream.java b/src/main/java/org/takes/rq/CapInputStream.java index 54c0b17b8c..f1b2ea461d 100644 --- a/src/main/java/org/takes/rq/CapInputStream.java +++ b/src/main/java/org/takes/rq/CapInputStream.java @@ -34,6 +34,10 @@ * @author Yegor Bugayenko (yegor@teamed.io) * ...
8
6
0
[{"id": "G0", "claim": "The javadoc of the new TempInputStream class wrongly says \"All implementations of this interface\" although the class is a final class, not an interface.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR needlessly ref...
null
yegor256__takes__543
yegor256/takes
543
defect
3276fa8f8a002492a3e02a5ab28c6a366491c88f
d131399814bf52f1ea7a3b84a2db4dce12808652
#520: Move common headers matcher logic to AbstractHmHeader
Fix for #520. - Move common headers matcher logic to `AbstractHmHeader` - Unify error messages between `HmRqHeader` and `HsRqHeader`
diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmHeader.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmHeader.java new file mode 100644 index 0000000000..25f6e2a568 --- /dev/null +++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmHeader.java @@ -0,0 +1,164 @@ +/** + * The MIT License (MIT) ...
4
4
0
[{"id": "G0", "claim": "In AbstractHmHeader.matchesSafely the variable type `final List<String> values` can be relaxed to `Collection`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The Javadoc of HmRqHeader wrongly calls it 'Response Header Ma...
null
yegor256__takes__571
yegor256/takes
571
defect
d03a1d21795fa07689327c08f7ac563e8b33f325
38b8b955bf6d9de9340360369caae1ae4f3f196a
#524: Added the ability to specify the charset if needed
For #524 The goal of this PR is to add the charset into the content type header by using the new constructor of RsWithType allowing to explicitly specify the charset.
diff --git a/src/main/java/org/takes/rs/RsWithBody.java b/src/main/java/org/takes/rs/RsWithBody.java index 3a6e8fc639..90ab5e088a 100644 --- a/src/main/java/org/takes/rs/RsWithBody.java +++ b/src/main/java/org/takes/rs/RsWithBody.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.InputStream; import j...
7
5
0
[{"id": "G0", "claim": "The single-argument HTML constructor should be expressed as a delegation to the charset-taking HTML constructor (the reviewer suggests this(res, StandardCharsets.UTF_8)) instead of calling RsWithType.make directly.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope...
null
yegor256__takes__572
yegor256/takes
572
defect
d03a1d21795fa07689327c08f7ac563e8b33f325
9b8002a6076cd7d18b489de90e11d0cf2799d8aa
#548: Prevent getting URISyntaxException due to bad urls by automatically fixing them
For #548 The goal of this PR is to prevent getting URISyntaxException when we have to deal with not properly encoded url. It fixes that by encoding all the invalid characters until we get a parseable URI.
diff --git a/src/main/java/org/takes/misc/Href.java b/src/main/java/org/takes/misc/Href.java index d9d5f7c20a..11a534b25b 100644 --- a/src/main/java/org/takes/misc/Href.java +++ b/src/main/java/org/takes/misc/Href.java @@ -25,6 +25,7 @@ import java.io.UnsupportedEncodingException; import java.net.URI; +import java....
2
1
0
[{"id": "G0", "claim": "Inline the local `url` and `result` variables in `acceptsNonProperlyEncodedURL` by adding a `@checkstyle LineLength (2 lines)` suppression so the long strings can sit on one line without the local variables.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "int...
null
yegor256__takes__583
yegor256/takes
583
defect
453f031c2057998deefc22b261254d57efe947ad
217d039521a962f810f3f5e87d33d977a6bec293
Solving the FindBug violations.
Fixed the FindBug issues with PrintWriter and OutputStreams encoding. Fixing the issue(https://github.com/yegor256/takes/issues/574)
diff --git a/pom.xml b/pom.xml index ad7e141994..fc0403460d 100644 --- a/pom.xml +++ b/pom.xml @@ -306,44 +306,80 @@ <artifactId>qulice-maven-plugin</artifactId> <!-- @todo #558:30min Upgrade Qulice to 0.16. Fix all checkstyle - ...
3
2
2
[{"id": "G0", "claim": "One of the Travis jobs, Java 7, failed on this pull request, and the author believes the failure is related to an earlier build of the repository rather than to this change.", "category": "correctness", "verdict": "uncertain", "priority": "P0", "scope": "pre_existing"}, {"id": "G1", "claim": "A ...
null
yegor256__takes__611
yegor256/takes
611
defect
31c1ad15ce4b2ed02b616e5f2fdce10033411ebe
d7d450709b23540496b1fb1dfb9f7d32734f3718
#604 remove all lines except variables initialization from PsAll constructor.
#604 Parameter validation was moved to separate private method `validate`.
diff --git a/src/main/java/org/takes/facets/auth/PsAll.java b/src/main/java/org/takes/facets/auth/PsAll.java index 45fb092e8f..9b620b290d 100644 --- a/src/main/java/org/takes/facets/auth/PsAll.java +++ b/src/main/java/org/takes/facets/auth/PsAll.java @@ -53,28 +53,10 @@ public class PsAll implements Pass { * @par...
3
3
1
[{"id": "G0", "claim": "The 'Index must be >= 0' IllegalArgumentException message would be nicer if it showed the value that was provided, per the rethrow-exceptions practice.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It is better to use %d...
null
yegor256__takes__630
yegor256/takes
630
defect
5c77b3d487fec25922c120f488f840b1bb256783
b535a6bbfae1b03cc29e17587019b632b5f932a1
495: Store the content of the stream into a temporary file for reuse
Fix for https://github.com/yegor256/takes/issues/495 this issue is related to the fact that the code in the use case relies on [this constructor](https://github.com/yegor256/takes/blob/31c1ad15ce4b2ed02b616e5f2fdce10033411ebe/src/main/java/org/takes/rs/RsWithBody.java#L155) to build its response so when the InputStrea...
diff --git a/src/main/java/org/takes/rs/BodyContent.java b/src/main/java/org/takes/rs/BodyContent.java new file mode 100644 index 0000000000..8b10b0e33a --- /dev/null +++ b/src/main/java/org/takes/rs/BodyContent.java @@ -0,0 +1,182 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayenko + * + * Per...
17
15
6
[{"id": "G0", "claim": "The @since tag of the new BodyContent class should say 0.32, not 0.31.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "URLContent.length() relies on InputStream.available(), which is unreliable and may not return the whole f...
null
yegor256__takes__634
yegor256/takes
634
defect
b2ee751ab18b8b7130b0603de888c75e8eae9240
79a8d7c6745fef31907c3848cce21291a1db54de
#575 implement close and skip method on CapinputStream
#575 is solved by this. - Implemented `close` and `skip` on `CapInputStream` - Added tests verifying that those actually delegate the `close` and `skip` to the stream the class wraps as requested by the Puzzle **Caveat(?)** - This entailed removing the finally call closing `stream` from `org.takes.rq.RqMultipart.Base...
diff --git a/src/main/java/org/takes/rq/CapInputStream.java b/src/main/java/org/takes/rq/CapInputStream.java index f1b2ea461d..78cb6a0287 100644 --- a/src/main/java/org/takes/rq/CapInputStream.java +++ b/src/main/java/org/takes/rq/CapInputStream.java @@ -34,10 +34,6 @@ * @author Yegor Bugayenko (yegor@teamed.io) * ...
3
2
0
[{"id": "G0", "claim": "The multi-line constructor argument lines in the new tests should be joined onto one line.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new tests should declare throws Exception instead of throws IOException, as Yeg...
null
yegor256__takes__636
yegor256/takes
636
defect
b2ee751ab18b8b7130b0603de888c75e8eae9240
129bcb5df5c226caf85dc8196c78571da716709a
#590 Added Fork chain implementation and tests
Fixes for #590: - Added `FkChain` class. - Added corresponding unit tests. - Simplified `TkFork` implementation by the use of `FkChain`.
diff --git a/src/main/java/org/takes/facets/fork/FkChain.java b/src/main/java/org/takes/facets/fork/FkChain.java new file mode 100644 index 0000000000..8260f469f1 --- /dev/null +++ b/src/main/java/org/takes/facets/fork/FkChain.java @@ -0,0 +1,83 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Yegor Bugayen...
9
5
1
[{"id": "G0", "claim": "The newly added test code should follow the qulice rule referenced in teamed/qulice#689, which means the test methods should declare `throws Exception` rather than `throws IOException`.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim...
null
yegor256__takes__644
yegor256/takes
644
defect
d9e7bddc0d4c65e8f209a8a1d903881f34a004dd
130fa20b0cb3c7d139724a7724fb1b396a30296a
#576: Close all the parts on request's body close
Fix for https://github.com/yegor256/takes/issues/576 The goal of this PR is to close all the parts of the request in order to ensure that all the temporary files are properly deleted.
diff --git a/src/main/java/org/takes/rq/RqMultipart.java b/src/main/java/org/takes/rq/RqMultipart.java index d2edc2398e..c2a1e12614 100644 --- a/src/main/java/org/takes/rq/RqMultipart.java +++ b/src/main/java/org/takes/rq/RqMultipart.java @@ -26,6 +26,7 @@ import java.io.ByteArrayInputStream; import java.io.File; im...
7
5
2
[{"id": "G0", "claim": "The closesAllParts test uses @Test(expected = IOException.class), so it would still pass if an IOException were thrown by the first line of the test; a more precise assertion is needed and the expected=IOException mechanism should be removed.", "category": "testing", "verdict": "supported", "pri...
null
yegor256__takes__649
yegor256/takes
649
defect
640809d66d246a6cc7b2d4e698ab512a082d5de3
d3baf44b3631eed72397501cc6b15915b88c5d7b
Supporting HTTP persistent connections
Fixing the issue(https://github.com/yegor256/takes/issues/519) - Removed the input stream is closing to single place. - Make the connection alive until the stream is active.
diff --git a/src/main/java/org/takes/http/BkBasic.java b/src/main/java/org/takes/http/BkBasic.java index 06330ec9c4..7989fc5207 100644 --- a/src/main/java/org/takes/http/BkBasic.java +++ b/src/main/java/org/takes/http/BkBasic.java @@ -71,18 +71,29 @@ public BkBasic(final Take tks) { this.take = tks; } +...
4
3
1
[{"id": "G0", "claim": "Use try-with-resources in BkBasic.accept for the socket streams, since the project is on Java 7, covering both `input` and `output`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The explicit output.flush() in the finall...
null
yegor256__takes__663
yegor256/takes
663
defect
6ef7e7e8353d656059e75adfc944d0c597f8138c
9a29ff0dce4b84fafe9d42ef27bc8c3330b82ad0
#625 Removing RqGreedy from RqMultipartTest.
Issue #625. Puzzle 620-91883c6a in src/test/java/org/takes/rq/RqMultipartTest.java:91-98. This test is using RqGreedy in order to survive. Let's remove RqGreedy from this test and three other test methods below. This PR do the following changes: - Removes RqGreedy from RqMultipartTest. - Refactoring 'RqMultipart.Fake.F...
diff --git a/src/main/java/org/takes/rq/RqMultipart.java b/src/main/java/org/takes/rq/RqMultipart.java index 298ff87723..d67cbafb5b 100644 --- a/src/main/java/org/takes/rq/RqMultipart.java +++ b/src/main/java/org/takes/rq/RqMultipart.java @@ -492,21 +492,6 @@ public Iterable<String> head() throws IOException { ...
4
2
0
[{"id": "G0", "claim": "Add a proper description of what the precise issue was and how the change fixes it to the PR description, as the puzzle asks, before continuing — it is not evident from the fix alone.", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cla...
null
yegor256__takes__668
yegor256/takes
668
defect
b128721606d12ca82f1d8118dc4adafd29e56e90
47a176134d712ae1d8e0066f27968519659d0498
#666: Refactored the class RqMtBase to reduce the coupling
Fix for #666 The goal of this PR is to refactor the class RqMtBase in order to reduce the overall coupling pf this class
diff --git a/src/main/java/org/takes/rq/RqHeaders.java b/src/main/java/org/takes/rq/RqHeaders.java index 9f43703c45..986e502dce 100644 --- a/src/main/java/org/takes/rq/RqHeaders.java +++ b/src/main/java/org/takes/rq/RqHeaders.java @@ -181,6 +181,13 @@ final class Smart implements RqHeaders { public Smart(final...
6
5
1
[{"id": "G0", "claim": "The deletesTempFile test can be implemented more shortly now that Takes moved to Java 7, using Files.write(file.toPath(), ...) instead of the BufferedWriter/FileWriter boilerplate.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "cl...
null
yegor256__takes__670
yegor256/takes
670
defect
b895567c1ea991230cd1f82bfaa453aa2c0c353a
83780246ecbc9573725a86b7c275f93a8375101a
#664 Remove StandardCharsets.UTF_8. Add UTF8String
#664 I created `UTF8String` class and replaced `StandardCharsets.UTF_8` usage in all `String`s. Also I created one puzzle, to continue work on #664.
diff --git a/src/main/java/org/takes/facets/auth/PsBasic.java b/src/main/java/org/takes/facets/auth/PsBasic.java index 3a5dcc7fce..127421785f 100644 --- a/src/main/java/org/takes/facets/auth/PsBasic.java +++ b/src/main/java/org/takes/facets/auth/PsBasic.java @@ -28,7 +28,6 @@ import java.net.HttpURLConnection; import...
5
5
0
[{"id": "G0", "claim": "The Javadoc of the new UTF8String class violates the convention described in qulice issue 708 (the comment anchors on the empty line inside the class Javadoc before the @author tags).", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "c...
null
yegor256__takes__675
yegor256/takes
675
defect
6eb2e715a3ee292a88454e225228bf5ea14a15cf
82285d413cfca3bc5304ea628f896142e7fcaebc
#674 Get rid of StandardCharsets.UTF_8.
Issue #674. Puzzle 664-ddd2c9b3 in src/main/java/org/takes/rs/RsXSLT.java:143-145. Removes usage of StandardCharsets.UTF_8 from takes code (remove usage not only from this class but also from other parts of project). This PR do the following changes: - Create new classes Utf8InputStreamReader, Utf8OutputStreamWriter, U...
diff --git a/src/main/java/org/takes/facets/fallback/FbLog4j.java b/src/main/java/org/takes/facets/fallback/FbLog4j.java index b7a5f11c08..10c64a32c7 100644 --- a/src/main/java/org/takes/facets/fallback/FbLog4j.java +++ b/src/main/java/org/takes/facets/fallback/FbLog4j.java @@ -26,11 +26,11 @@ import java.io.ByteArray...
1
1
0
[{"id": "G0", "claim": "In the new Utf8InputStreamReader, Utf8OutputStreamWriter and Utf8PrintStream classes, use StandardCharsets.UTF_8 (via toString() where the constructor needs a String) instead of the hand-rolled \"UTF-8\" String constant with Charset.forName.", "category": "design", "verdict": "supported", "prior...
null
yegor256__takes__689
yegor256/takes
689
defect
4e0274cd1675274645dcf4371288c9a5c153c9b0
4d1aedf874f8e447fe15b3b4519c8f4e4fb38e5b
Issue #686 - Removes excludes of PMD
Issue #686. After upgrade to qulice 0.16.4 we have to fix AvoidDuplicateLiterals PMD warings in several classes. This PR do the following changes: - Removes PMD exclusions from pom.xml. - Fix the PMD warnings in several classes that are removed from PMD exclusions. - Three new puzzles were created.
diff --git a/pom.xml b/pom.xml index f63bf7a48f..bde90f79fd 100644 --- a/pom.xml +++ b/pom.xml @@ -377,44 +377,26 @@ <exclude>checkstyle:/src/test/java/org/takes/http/FtBasicTest.java</exclude> <exclude>checkstyle:/src/test/java/org/takes/http/FtCLITest....
27
25
0
[{"id": "G0", "claim": "The now-unneeded '// @checkstyle MultipleStringLiteralsCheck' comment in PsLinkedin.enter() could be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The now-unneeded '// @checkstyle MultipleStringLiteralsCheck' co...
null
yegor256__takes__690
yegor256/takes
690
defect
c0ac5f1d39826f0a16f9e5af62ff8d6bd2635e59
13ceec078025d3d682751e506f6b517cb457c2df
#687 - Refactored RqForm into 1 interface and 3 smaller classes.
Issue #687: Removed checkstyle suppression ClassDataAbstractionCouplingCheck from RqForm, but is still needed in RqFormBase.
diff --git a/src/main/java/org/takes/rq/RqForm.java b/src/main/java/org/takes/rq/RqForm.java index c1e60cab9b..6799116ebe 100644 --- a/src/main/java/org/takes/rq/RqForm.java +++ b/src/main/java/org/takes/rq/RqForm.java @@ -23,29 +23,8 @@ */ package org.takes.rq; -import edu.umd.cs.findbugs.annotations.SuppressFBWa...
11
11
0
[{"id": "G0", "claim": "Remove the word 'closes' from the PR description, because only the author of the issue can close it.", "category": "process", "verdict": "supported", "priority": "P2", "scope": "unclear"}, {"id": "G1", "claim": "The javadoc formatting in package-info.java is wrong: per qulice issue 708 the empty...
null
yegor256__takes__743
yegor256/takes
743
defect
588837080d0b959124828ed080b19c2781e0353e
266bafa004aa1a79f13cbd4962a92b6656c1e50f
Implementation of JSON Web Token
These commits introduce the following things in order to make JSON Web Token (JWT, see https://jwt.io/) usable in takes: 1. A new Signature interface, similar to the Codec interface. The main difference is that while Codecs can encrypt and decrypt data, a Signature can only encrypt (aka sign) data. 2. An HMAC-SHA ...
diff --git a/src/main/java/org/takes/facets/auth/PsToken.java b/src/main/java/org/takes/facets/auth/PsToken.java new file mode 100644 index 0000000000..c2197f77d6 --- /dev/null +++ b/src/main/java/org/takes/facets/auth/PsToken.java @@ -0,0 +1,184 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2014-2017 Yegor B...
4
4
1
[{"id": "G0", "claim": "Token.Jwt's fields should be initialized in the constructor instead of via field initializers alongside the anonymous-class pattern.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Token.encoded() swallows IOException and ...
null
yegor256__takes__761
yegor256/takes
761
defect
883f7e93188020c65f048f04572d87f1f71d7423
dd3ebe0da26ba4d266f73970d6897d7d8867e785
#284 - FkAgent, fork based on User-Agent
PR with implementation of #284 Code is not so great, and requiers some guidance. And i believe time of 30m for this task is not correct, it requires like 4 times more, and splitting into smaller subtasks Maybe add cactoos lib to depedencies and use some text classes from threre?
diff --git a/src/main/java/org/takes/facets/fork/FkAgent.java b/src/main/java/org/takes/facets/fork/FkAgent.java new file mode 100644 index 0000000000..09d046dac1 --- /dev/null +++ b/src/main/java/org/takes/facets/fork/FkAgent.java @@ -0,0 +1,104 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2014-2018 Yegor B...
7
7
0
[{"id": "G0", "claim": "The method `extractMajorVersion` should be renamed to `majorVersion()` (or inlined), per the referenced naming guidance.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The local `parts` variable inside `extractMajorVersio...
null
yegor256__takes__792
yegor256/takes
792
defect
fa0f212766291609d4dcd39256c5f279d4cc2d10
c2aabd41c859f2cae3b36355af0fe6b6b1cf35ea
TkRedirect should carry on the query and the fragment #779
Closes #779
diff --git a/src/main/java/org/takes/tk/TkRedirect.java b/src/main/java/org/takes/tk/TkRedirect.java index 156f47129c..453be74e36 100644 --- a/src/main/java/org/takes/tk/TkRedirect.java +++ b/src/main/java/org/takes/tk/TkRedirect.java @@ -23,12 +23,14 @@ */ package org.takes.tk; +import java.io.IOException; impor...
2
2
0
[{"id": "G0", "claim": "TkRedirect could use the existing `RqHref(req).href()` instead of introducing a new RedirectParams helper class.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The assertion in redirectCarriesQueryAndFragment would be clearer if i...
null
yegor256__takes__797
yegor256/takes
797
defect
39c7c01d668d8507b9970c9ccf12460ae249e124
2f9b15e916107fd82b142130a693302f13887d16
#793 Href handles URI with fragment part
Fixing #793 Now `org.takes.misc.Href` can handle fragment part if exists in the URL. - Private ctors were changed to accept fragment part and store it in a `Opt<String>` field. - `private static URI removeQuery(URL)` was renamed to `private static URI createBare(URL)` which will create new URL from the given UR...
diff --git a/src/main/java/org/takes/misc/Href.java b/src/main/java/org/takes/misc/Href.java index 9cfabf76b1..87c62a1b0b 100644 --- a/src/main/java/org/takes/misc/Href.java +++ b/src/main/java/org/takes/misc/Href.java @@ -60,7 +60,7 @@ public final class Href implements CharSequence { private static final Pattern...
2
1
0
[{"id": "G0", "claim": "The new buildsUriWithFragment test contains two asserts and should be split into two different test methods, following the single-statement-unit-tests rule.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request descript...
null
yegor256__takes__809
yegor256/takes
809
defect
c0fc037b05e5478bc3f028f50dcc7d81fbe69547
2c41d2cf99c4a2891b910b607d169872483b9133
OutputStream in RsPrint may fail to flush() in case of IOException
PR for #778. Partially implemented by adding `try-finally` block for the `RsPrint.printBody()` method. The `try-finally` block works fine for `RsPrint.printBody()`, but for `RsPrint.printHead()` there should be additional work done as `OutputStreamWriter` which is used to write head contents do not call `flush()` metho...
diff --git a/src/main/java/org/takes/rs/RsPrint.java b/src/main/java/org/takes/rs/RsPrint.java index ad72cf8616..a14999199e 100644 --- a/src/main/java/org/takes/rs/RsPrint.java +++ b/src/main/java/org/takes/rs/RsPrint.java @@ -161,14 +161,17 @@ public void printBody(final OutputStream output) throws IOException { ...
4
4
1
[{"id": "G0", "claim": "The flushBodyEvenWhenExceptionHappens test should use a fake OutputStream implementation that throws on write instead of 9 lines of Mockito setup, which makes the test too complex.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "T...
null
yegor256__takes__813
yegor256/takes
813
defect
c0fc037b05e5478bc3f028f50dcc7d81fbe69547
76917b2e43ca8fbd672e051ae4054f604e4f21b1
AbstractHmBody doesn't allow to use different matchers for text bodies
Fix for #794. I've added `AbstractHmTextBody` matcher, that converts body contents to `String` and use that to match the contents with provided matcher. Added text body matchers for `Request` and `Response` with relevant test cases. However, there still not covered descriptions of the fails and `describeMismatch...
diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java index 15414e37cb..641c9d6e17 100644 --- a/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java +++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java @@ -40,21 +40,8 @...
2
1
1
[{"id": "G0", "claim": "The single-string constructors should use Hamcrest's standard default matcher `Matchers.equalTo()` instead of `Matchers.containsString()`, so the expected body is equal to the constructor parameter and the tests are obvious.", "category": "design", "verdict": "supported", "priority": "P1", "scop...
null
yegor256__takes__830
yegor256/takes
830
defect
a981208d0e92df7b14204e2cd4e4e2f1dd2036c2
6eb7b5f306de16226993d040221ebd4900363191
HmBodyMatchers doesn't show mismatch in readable way
Fix for #795. Improved describeTo and describeMismatchSafely so that they show the actual and expected bytes in the bodies to make it more readable.
diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java index 641c9d6e17..bf014fc410 100644 --- a/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java +++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmBody.java @@ -25,8 +25,10 @...
4
4
0
[{"id": "G0", "claim": "The new test method in HmRqBodyTest should be renamed to follow the 'Test Method Name' naming convention for consistency.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test method in HmRsBodyTest should also be r...
null
yegor256__takes__849
yegor256/takes
849
defect
341fb1b89833de6838cc2f535ffff81aa48f8351
c9058176eabd0a14072c2f35d7682f136c5064e1
For #806: Replace Select and Condition by cactoos analogues.
For #806: - Replaced `Select` and `Condition` by `Filtered`; - Corrected tests that needed; - Corrected java version so we can use cactoos.
diff --git a/pom.xml b/pom.xml index a171eb5f9b..d2fae52c13 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ SOFTWARE. </distributionManagement> <properties> <timestamp>${maven.build.timestamp}</timestamp> - <jdk.version>1.7</jdk.version> + <jdk.version>1.8</jdk.version> </properties> <depend...
6
5
1
[{"id": "G0", "claim": "The locale properties added to the surefire argLine should be configured via <systemPropertyVariables> instead of <argLine> if they are required for the origin task.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The FbStat...
null
yegor256__takes__857
yegor256/takes
857
defect
341fb1b89833de6838cc2f535ffff81aa48f8351
568f2eba8c419826e660f165c230ce9cc9a5867b
For #832: Added test to `describeTo` method.
For #832: - Added test to `describeTo` method. - Updated `appveyor.tml` with correct java version.
diff --git a/appveyor.yml b/appveyor.yml index e6907937d1..31927637cc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ skip_tags: true clone_depth: 10 environment: matrix: - - JAVA_HOME: C:\Program Files\Java\jdk1.7.0 + - JAVA_HOME: C:\Program Files\Java\jdk1.8.0 branches: only: - master...
1
1
0
[{"id": "G0", "claim": "The appveyor.yml JAVA_HOME change from JDK 1.7 to 1.8 may not be needed for the origin issue and is questioned as out of scope.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__860
yegor256/takes
860
defect
13bbd4eab3ef44f54c44512e3c1d7d7a4ddea4c6
1754a340936172f486089b9ebf5b42490648748d
For #826: Removed obsolete Base64 implementation and its tests.
For #826: Removed obsolete Base64 implementation and its tests.
diff --git a/src/main/java/org/takes/facets/auth/PsToken.java b/src/main/java/org/takes/facets/auth/PsToken.java index e1700c93d3..33d7064e9b 100644 --- a/src/main/java/org/takes/facets/auth/PsToken.java +++ b/src/main/java/org/takes/facets/auth/PsToken.java @@ -27,6 +27,7 @@ import java.io.StringReader; import java....
2
2
0
[{"id": "G0", "claim": "In joseEncoded the test should assert the actual value against a constant string instead of the result of the same dynamic Base64 encoding, so that JDK-implementation differences (e.g. returning null for invalid input where another JDK throws) would be caught.", "category": "testing", "verdict":...
null
yegor256__takes__867
yegor256/takes
867
defect
87f8ee3a80cb27136838f640677b1890f5adda79
5adae2e1a9874782b605c92b4c65568a3c98290b
#819: describe mismatch in AbstractHmTextBody
For #819 I've changed `AbstractHmTextBody` to properly describe mismatches, added corresponding test and removed `todo`.
diff --git a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java index cc5d6c4f4b..77616cb2e1 100644 --- a/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java +++ b/src/main/java/org/takes/facets/hamcrest/AbstractHmTextBody.java @...
2
2
2
[{"id": "G0", "claim": "Storing the item text in the mutable instance field `itext` during matchesSafely is not correct Hamcrest usage and may leave the matcher in an inconsistent state, so describeMismatchSafely should read the value from its `item` argument via `this.text(item)` instead of `this.itext`, which may poi...
null
yegor256__takes__870
yegor256/takes
870
defect
87f8ee3a80cb27136838f640677b1890f5adda79
01975208775f9840f95ebc0ad3954da68427e478
Fix flushHeadEvenWhenExceptionHappens in RsPrintTest
This is for #812. Because `OutputStreamWriter` is buffered, the `write` method which was throwing the test exception was called only when `flush()` was called and this prevented the test to validate its premises. I remove the need for `OutputStreamWriter` in the test to solve this situation. This is coherent w...
diff --git a/src/main/java/org/takes/rs/RsPrint.java b/src/main/java/org/takes/rs/RsPrint.java index a14999199e..5336d2fe88 100644 --- a/src/main/java/org/takes/rs/RsPrint.java +++ b/src/main/java/org/takes/rs/RsPrint.java @@ -115,41 +115,52 @@ public void print(final OutputStream output) throws IOException { } ...
3
3
2
[{"id": "G0", "claim": "The fix still relies on a simple try-finally block, which ticket #812 says the implementation could not rely on because OutputStreamWriter does not call the flush() of the OutputStream, so this fix goes against the requested changes.", "category": "correctness", "verdict": "supported", "priority...
null
yegor256__takes__873
yegor256/takes
873
defect
b358fcf50277cbd0c8c9d7f139078f0a7f9db384
f428498bd6eb0dadd153fb4aff24a059b6b08819
Start using Cactoos
Toward making Takes Cactoos-compliant for #804. This is better reviewed commit by commit. Basically I 1. Started removing uses of Guava as proposed by ARC (see https://github.com/yegor256/takes/issues/804#issuecomment-439715270) by: 1. Used `JoinedText` and `cactoos-matchers` in tests 2. Made `RsPrint` C...
diff --git a/pom.xml b/pom.xml index 5a8bc2c95b..a04b64aeb3 100644 --- a/pom.xml +++ b/pom.xml @@ -95,7 +95,7 @@ SOFTWARE. <dependency> <groupId>org.cactoos</groupId> <artifactId>cactoos</artifactId> - <version>0.29</version> + <version>0.38</version> </dependency> <dependency> ...
3
1
1
[{"id": "G0", "claim": "The slf4j-simple dependency added for tests may not be needed.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The @todo planning for Utf8String to implement Cactoos Bytes is incorrect given the class name, so the class should be ren...
null
yegor256__takes__879
yegor256/takes
879
defect
e6fc4cf67614fef972c45bc2ada248085f3375bf
977cb115fffd08e58882aa753b6e12765c870d27
#838 close body in RsPrint
For #838 I've made `RsPrint.printBody()` close body and added corresponding test.
diff --git a/src/main/java/org/takes/rs/RsPrint.java b/src/main/java/org/takes/rs/RsPrint.java index 5336d2fe88..554655fa9e 100644 --- a/src/main/java/org/takes/rs/RsPrint.java +++ b/src/main/java/org/takes/rs/RsPrint.java @@ -169,10 +169,9 @@ public void printHead(final Writer writer) throws IOException { * @thr...
3
3
0
[{"id": "G0", "claim": "The test should use MatcherAssert.assertThat to compare the caught exception with the expected one instead of throwing the exception when they differ.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The FakeInput method haveClosed...
null
yegor256__takes__885
yegor256/takes
885
defect
1a1125650819baf157361fb666fa00ef3c5c4482
44ac95745d01ac1137fa174ac963d7a9f6c477cb
#876 corrected test for PsFacebook
#876 * corrected test for PsFacebook to generate correct unicode characters (and not control sequences - `random()` was generating those and that's why the test was sometimes failing)
diff --git a/pom.xml b/pom.xml index 8ba91853f4..e9f344d10b 100644 --- a/pom.xml +++ b/pom.xml @@ -244,7 +244,13 @@ SOFTWARE. <version>2.6</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-text</artifactId> + <ve...
1
1
0
[{"id": "G0", "claim": "The test could replace its usage of RandomStringGenerator and RandomStringUtils with RandomText from cactoos.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
yegor256__takes__903
yegor256/takes
903
defect
990b23211b70df90e4e1a0e898d971a38d96aa40
ec5a55e76082a17f483e9340632ff22806e34936
Utf8String implements Cactoos Bytes and Text (#889)
Solving puzzle described in #889. Quoting "...places in Takes that use it be able to directly take either a Bytes or a Text depending on the situation. For example RsWithBody should take Bytes and Text in its constructors. " . I find it pretty vague to be honest. Utf8String is used in many classes inside their constru...
diff --git a/src/main/java/org/takes/facets/auth/PsBasic.java b/src/main/java/org/takes/facets/auth/PsBasic.java index f7c73f037b..7ccd5df2bd 100644 --- a/src/main/java/org/takes/facets/auth/PsBasic.java +++ b/src/main/java/org/takes/facets/auth/PsBasic.java @@ -102,7 +102,7 @@ public Opt<Identity> enter(final Request ...
7
6
0
[{"id": "G0", "claim": "The renamed code and prose inside Javadoc comments (string -> asString, bytes -> asBytes) should be reverted to the previous wording.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use `TrimmedText` instead of calling `tr...
null
yegor256__takes__941
yegor256/takes
941
defect
210c7ef74bcb019883eb1c09bd91eb318a772dcb
bade628a34e2392c2910829f56249f5bcf5f21b6
#865 Added RqFromTest and HttpServletRequestFake
As per #865. Created: - `RqFromTest` - `HttpServletRequestFake` and `ServletInputStreamOf` to support it - `HttpServletResquetFakTest`
diff --git a/src/main/java/org/takes/servlet/HttpServletRequestFake.java b/src/main/java/org/takes/servlet/HttpServletRequestFake.java new file mode 100644 index 0000000000..df2a17d114 --- /dev/null +++ b/src/main/java/org/takes/servlet/HttpServletRequestFake.java @@ -0,0 +1,513 @@ +/* + * The MIT License (MIT) + * + *...
8
7
0
[{"id": "G0", "claim": "In the new tests, instantiate concrete Hamcrest matcher classes (e.g. `new StringContains(...)`, `new IsEqual<>(...)`, `new StringStartsWith(...)`) instead of calling the static `Matchers.equalTo/startsWith/containsString` methods.", "category": "maintainability", "verdict": "supported", "priori...
null
yegor256__takes__942
yegor256/takes
942
defect
210c7ef74bcb019883eb1c09bd91eb318a772dcb
86d1a003a7a07abed9446257a9a5e5144b9f8f9d
Use Cactoos from Body and remove guava from test
Make `Body`extend `Input` from cactoos. This allows for tighter integration with cactoos. We can also remove the guava classes from the corresponding test class and use cactoos classes instead. This fixes #887
diff --git a/src/main/java/org/takes/rs/Body.java b/src/main/java/org/takes/rs/Body.java index 1c86e89167..16f5d483cf 100644 --- a/src/main/java/org/takes/rs/Body.java +++ b/src/main/java/org/takes/rs/Body.java @@ -32,19 +32,14 @@ import java.nio.file.StandardCopyOption; import java.util.UUID; import java.util.concu...
4
3
1
[{"id": "G0", "claim": "The MatcherAssert.assertThat calls in the Body tests carry no error message, so one should be put in to tell why the assertion failed.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "In future code the tests should use Assertion...
null
yegor256__takes__954
yegor256/takes
954
defect
afd95b0d5c40d0c40ad0fcfa9b21998268a37b87
5fee57b73d4797eaf621fd44907c2960151c3832
#953 SrvTake test and Grizzly update
As per #953: - Continuing integration with Servlet API - Grizzly dependency (test) updated (version 2.4.3.1) - `SrvTake` unit test - `TkServletApp` fake Takes servlet to test integration
diff --git a/pom.xml b/pom.xml index c040a9ac99..147752d67b 100644 --- a/pom.xml +++ b/pom.xml @@ -128,12 +128,6 @@ SOFTWARE. <version>1.17.1</version> <optional>true</optional> </dependency> - <dependency> - <groupId>com.sun.grizzly</groupId> - <artifactId>grizzly-servlet-webserver</art...
3
1
0
[{"id": "G0", "claim": "The test should use the `Text` matchers from cactoos-matchers to assert `Text` implementations instead of asserting the response body with a `String` matcher.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The standalone TkServlet...
null
yegor256__takes__960
yegor256/takes
960
defect
3fb3ff79a79e81073698982e2ea8d3eabd57deed
572b69448aaa0427fcf41f479844633fd5b26cb0
Update tests to replace guava with cactoos #888
In this PR I replaced several occurences of Joiner with JoinedText. See #888 I intentionally did not touch the other idiomatic problems in the tests cases. I left a puzzle that describes the tasks that still have to be done.
diff --git a/src/main/java/org/takes/rs/RsPrint.java b/src/main/java/org/takes/rs/RsPrint.java index 1b28344fe7..55ff709f61 100644 --- a/src/main/java/org/takes/rs/RsPrint.java +++ b/src/main/java/org/takes/rs/RsPrint.java @@ -42,7 +42,7 @@ * <p>The class is immutable and thread-safe. * * @since 0.1 - * @todo #80...
3
3
0
[{"id": "G0", "claim": "In the test at BkBasicTest.java:283 the request text should be written using cactoos `BytesOf` instead of `JoinedText(...).asString().getBytes()`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In the test at BkBasicTest.java:339 ...
null
yegor256__takes__971
yegor256/takes
971
defect
c7adbfeabfe484f8ce850e07c075b1fdde5ab149
1935bdcaf78e8cc4e7bcab55941c0f03f4e5af3e
Introduce RsSmartNotEmpty #952
#952 suggests to change the status code from `RsEmpty` from `200` to `204`. This breaks ~60 test cases which rely on `RsEmpty returning` 200. I had to edit a few classes that add content to the Response so that the status code is the expected (and correct) 200. I also had to edit a few tests that expected a 200 stat...
diff --git a/src/main/java/org/takes/rs/RsEmpty.java b/src/main/java/org/takes/rs/RsEmpty.java index b7044303fb..41c91fb442 100644 --- a/src/main/java/org/takes/rs/RsEmpty.java +++ b/src/main/java/org/takes/rs/RsEmpty.java @@ -43,7 +43,7 @@ public final class RsEmpty implements Response { @Override public I...
2
1
0
[{"id": "G0", "claim": "Use the cactoos `ListOf` instead of `Collections.singletonList` for the head lines of `RsEmpty`.", "category": "design", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The pull request's CI checks are failing and should be fixed before merge.", "category...
null