Skip to content
Merged
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
7 changes: 7 additions & 0 deletions config/checkstyle-checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,13 @@
<property name="format" value="^(US-ASCII|ISO-8859-1|UTF-8|UTF-16BE|UTF-16LE|UTF-16)$"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="IllegalType">
<property name="illegalClassNames"
value="java.util.HashSet, HashSet, java.util.LinkedHashMap, LinkedHashMap,
java.util.TreeMap, TreeMap, java.util.HashMap, HashMap,
java.util.LinkedHashSet, LinkedHashSet, java.util.TreeSet, TreeSet,
java.lang.StringBuffer, StringBuffer"/>
</module>
<module name="InnerAssignment"/>
<module name="MagicNumber"/>
<module name="MatchXpath">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package net.sf.eclipsecs.core.transformer;

import java.util.HashMap;
import java.util.Map;

/**
* Abstract class which all transformationclasses have to implement. These classes handle how to
Expand Down Expand Up @@ -71,7 +71,7 @@ public final String getValue() {
* Properties of the module.
*/
public final void useTreeWalkerModule(final String name,
final HashMap<String, String> properties) {
final Map<String, String> properties) {

mCheckstyleSetting.addTreeWalkerModule(name, properties);
}
Expand All @@ -85,7 +85,7 @@ public final void useTreeWalkerModule(final String name,
* Properties of the module.
*/
public final void useCheckerModule(final String name,
final HashMap<String, String> properties) {
final Map<String, String> properties) {

mCheckstyleSetting.addCheckerModule(name, properties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import net.sf.eclipsecs.core.util.CheckstyleLog;

Expand Down Expand Up @@ -91,7 +91,7 @@ private void writeXMLFile(final OutputStream outStream) throws IOException {
* @throws IOException
* an I/O exception occurred
*/
private static void writeModules(final HashMap<String, HashMap<String, String>> modules,
private static void writeModules(final Map<String, Map<String, String>> modules,
final OutputStream outStream) throws IOException {

final Iterator<String> modit = modules.keySet().iterator();
Expand Down Expand Up @@ -120,7 +120,7 @@ private static void writeModules(final HashMap<String, HashMap<String, String>>
* @throws IOException
* an I/O exception occurred
*/
private static void writeProperty(final HashMap<String, String> properties,
private static void writeProperty(final Map<String, String> properties,
final OutputStream outStream) throws IOException {
final Iterator<String> propit = properties.keySet().iterator();
String prop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
* Class for storing all settings of a checkstyle-configuration file.
Expand All @@ -30,10 +31,10 @@
*/
public class CheckstyleSetting {
/** Map which holds all checker-modules of the configuration. */
private final HashMap<String, HashMap<String, String>> mCheckerModules = new HashMap<>();
private final Map<String, Map<String, String>> mCheckerModules = new HashMap<>();

/** Map which holds all treewalker-modules of the configuration. */
private final HashMap<String, HashMap<String, String>> mTreeWalkerModules = new HashMap<>();
private final Map<String, Map<String, String>> mTreeWalkerModules = new HashMap<>();

/**
* Method for adding a new treewalker-module.
Expand All @@ -43,7 +44,7 @@ public class CheckstyleSetting {
* @param properties
* A hashmap of properties of this module.
*/
public void addTreeWalkerModule(final String name, final HashMap<String, String> properties) {
public void addTreeWalkerModule(final String name, final Map<String, String> properties) {

mTreeWalkerModules.put(name, properties);
}
Expand All @@ -56,7 +57,7 @@ public void addTreeWalkerModule(final String name, final HashMap<String, String>
* @param properties
* A hashmap of properties of this module.
*/
public void addCheckerModule(final String name, final HashMap<String, String> properties) {
public void addCheckerModule(final String name, final Map<String, String> properties) {

mCheckerModules.put(name, properties);
}
Expand All @@ -66,7 +67,7 @@ public void addCheckerModule(final String name, final HashMap<String, String> pr
*
* @return A hashmap containing all checker-modules.
*/
public HashMap<String, HashMap<String, String>> getmCheckerModules() {
public Map<String, Map<String, String>> getmCheckerModules() {
return mCheckerModules;
}

Expand All @@ -75,7 +76,7 @@ public HashMap<String, HashMap<String, String>> getmCheckerModules() {
*
* @return A hashmap containing all treewalker-modules.
*/
public HashMap<String, HashMap<String, String>> getmTreeWalkerModules() {
public Map<String, Map<String, String>> getmTreeWalkerModules() {
return mTreeWalkerModules;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package net.sf.eclipsecs.core.transformer.ftransformerclasses;

import java.util.HashMap;
import java.util.Map;

import net.sf.eclipsecs.core.transformer.AbstractFTransformationClass;
import net.sf.eclipsecs.core.transformer.CheckstyleSetting;
Expand All @@ -35,7 +36,7 @@
public class MethodInvocationParenTransformer extends AbstractFTransformationClass {
@Override
public CheckstyleSetting transformRule() {
final HashMap<String, String> properties = new HashMap<>();
final Map<String, String> properties = new HashMap<>();
properties.put("tokens", "METHOD_CALL");
useTreeWalkerModule("MethodParamPad", properties);
return getCheckstyleSetting();
Expand Down
Loading