Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
<packaging>takari-jar</packaging>

<properties>
<!-- Checkstyle updated to 10.x - existing javadoc violations need fixing separately -->
<checkstyle.fail.on.violation>false</checkstyle.fail.on.violation>
<checkstyle.fail.on.error>false</checkstyle.fail.on.error>
<checkstyle.fail.on.violation>true</checkstyle.fail.on.violation>
<checkstyle.fail.on.error>true</checkstyle.fail.on.error>
<junit.version>5.14.4</junit.version>
<mockito.version>5.23.0</mockito.version>
<slf4j.version>2.0.18</slf4j.version>
Expand Down
10 changes: 6 additions & 4 deletions src/build/resources/checkstyle/checkstyle.rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="RightCurly">
<!-- LITERAL_DO omitted: a do-while's closing brace is always followed by 'while' -->
<property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
Expand Down Expand Up @@ -173,10 +174,11 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<!-- Many properties deprecated in Checkstyle 9.x - using minimal config -->
<!-- allowMissingParamTags, allowMissingThrowsTags, allowMissingReturnTag removed -->
<!-- Use validateThrows="false" for similar behavior -->
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="validateThrows" value="false"/>
<property name="allowedAnnotations" value="Override, Test, BeforeEach, AfterEach, BeforeAll, AfterAll"/>
<property name="tokens" value="METHOD_DEF,ANNOTATION_FIELD_DEF"/>
</module>
<module name="MethodName">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void addX12ErrorDetailForLoop(X12ErrorDetail errorDetail) {

/**
* helper method to add multiple X12ErrorDetail for looping errors
* @param errorDetail
* @param errorDetails
*/
public void addX12ErrorDetailForLoop(List<X12ErrorDetail> errorDetails) {
if (!CollectionUtils.isEmpty(errorDetails)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/walmartlabs/x12/X12Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface X12Parser<T extends X12Document> {
* was not the one that was expected
* @param expectedSegmentId
* @param actualSegmentId
* @throws {@link X12ParserException}
* @throws X12ParserException always, describing the mismatch
*/
default void handleUnexpectedSegment(String expectedSegmentId, String actualSegmentId) {
throw X12ParsingUtil.handleUnexpectedSegment(expectedSegmentId, actualSegmentId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public boolean registerTransactionSetParser(Collection<TransactionSetParser> tra
* to be registered w/ the parser
* Note: if a transaction set type does not have a registered parser it is ignored
*
* @param transactionParsers
* @param txParser
* @return true if non-null and added, otherwise false
*/
public boolean registerTransactionSetParser(TransactionSetParser txParser) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public X12TransactionSet parseTransactionSet(List<X12Segment> transactionSegment
*
* Note: if a transaction set type does not have a registered parser it is ignored
*
* @param transactionParser
* @param txParser
* @return true if non-null and added, otherwise false
*/
public boolean registerNextTransactionSetParser(TransactionSetParser txParser) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public static List<X12Segment> splitSourceDataIntoSegments(String sourceData) {
* @param sourceData
* @param segmentSeparatorRegEx a regex to split segments
* @return a {@link List} of {@link X12Segment} or empty is either parameter is missing
* @throws @{link PatternSyntaxException} if the regular expression is invalid
* @throws java.util.regex.PatternSyntaxException if the regular expression is invalid
*/
private static List<X12Segment> splitSourceDataIntoSegments(String sourceData, String segmentSeparatorRegEx) {
if (StringUtils.isEmpty(sourceData) || StringUtils.isEmpty(segmentSeparatorRegEx)) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/walmartlabs/x12/SegmentIteratorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import static org.junit.jupiter.api.Assertions.assertThrows;

public class SegmentIteratorTest {

Expand Down
Loading