Skip to content

Commit

Permalink
Upgrades checkstyle library
Browse files Browse the repository at this point in the history
  • Loading branch information
damianszczepanik committed Jan 2, 2024
1 parent e6f62a5 commit a536ed9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
12 changes: 6 additions & 6 deletions config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<property name="basedir" value="${basedir}"/>
-->

<property name="fileExtensions" value="java" />
<property name="fileExtensions" value="java"/>

<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
Expand Down Expand Up @@ -67,18 +67,18 @@
<module name="TreeWalker">

<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- See https://checkstyle.sourceforge.io/checks/javadoc/javadocmethod.html -->
<module name="JavadocMethod">
<property name="scope" value="protected"/>
<property name="accessModifiers" value="protected"/>
</module>
<module name="JavadocType">
<property name="scope" value="protected"/>
<property name="scope" value="protected"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="protected"/>
<property name="scope" value="protected"/>
</module>
<module name="JavadocStyle">
<property name="scope" value="protected"/>
<property name="scope" value="protected"/>
</module>

<!-- Checks for Naming Conventions. -->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<version>3.3.1</version>
<configuration>
<configLocation>config/checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
* @author Damian Szczepanik (damianszczepanik@github)
*/
public abstract class AbstractJacksonVisitor extends AbstractVisitor {

@SuppressWarnings("unchecked")

/**
* Process map or array/list objects.
*
* @param key key
* @param value value that should be converted
*/
protected void processComplex(String key, Object value) {
if (isMap(value)) {
processMap((Map<String, Object>) value);
Expand All @@ -26,6 +31,11 @@ protected void processComplex(String key, Object value) {
}
}

/**
* Process map object.
*
* @param map value that should be converted
*/
protected void processMap(Map<String, Object> map) {
for (Map.Entry<String, Object> keyMap : map.entrySet()) {
String key = keyMap.getKey();
Expand All @@ -39,6 +49,11 @@ protected void processMap(Map<String, Object> map) {
}
}

/**
* Process array/list object.
*
* @param list value that should be converted
*/
private void processArray(String key, List<Object> list) {
for (int i = 0; i < list.size(); i++) {
Object value = list.get(i);
Expand Down

0 comments on commit a536ed9

Please sign in to comment.