Checkstyle fixes

This commit is contained in:
oowekyala
2017-07-15 16:50:46 +02:00
parent 31ed6fd565
commit ca41c67371
7 changed files with 6 additions and 11 deletions

View File

@ -155,8 +155,7 @@ public abstract class AbstractPropertyDescriptorFactory<T> implements PropertyDe
* @return True if the value must be considered missing, false otherwise * @return True if the value must be considered missing, false otherwise
*/ */
protected boolean isValueMissing(String value) { protected boolean isValueMissing(String value) {
// return StringUtil.isEmpty(value); return StringUtils.isBlank(value);
return false;
} }
@ -296,13 +295,13 @@ public abstract class AbstractPropertyDescriptorFactory<T> implements PropertyDe
* Returns a map describing which fields are required to build a property using this factory. The parameters are * Returns a map describing which fields are required to build a property using this factory. The parameters are
* added to the {@link PropertyDescriptor#CORE_EXPECTED_FIELDS}, which are required for all descriptors. * added to the {@link PropertyDescriptor#CORE_EXPECTED_FIELDS}, which are required for all descriptors.
* *
* @param otherKeys Additional keys * @param otherKeys Additional keys
* @param otherValues Whether the corresponding keys are required or not * @param otherValues Whether the corresponding keys are required or not
* *
* @return The complete map of expected fields. * @return The complete map of expected fields.
*/ */
static Map<PropertyDescriptorField, Boolean> expectedFieldTypesWith(PropertyDescriptorField[] otherKeys, static Map<PropertyDescriptorField, Boolean> expectedFieldTypesWith(PropertyDescriptorField[] otherKeys,
Boolean[] otherValues) { Boolean[] otherValues) {
Map<PropertyDescriptorField, Boolean> largerMap = new HashMap<>( Map<PropertyDescriptorField, Boolean> largerMap = new HashMap<>(
otherKeys.length + CORE_EXPECTED_FIELDS.size()); otherKeys.length + CORE_EXPECTED_FIELDS.size());
largerMap.putAll(CORE_EXPECTED_FIELDS); largerMap.putAll(CORE_EXPECTED_FIELDS);

View File

@ -26,7 +26,6 @@ import net.sourceforge.pmd.lang.LanguageVersion;
import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.ast.Node;
import net.sourceforge.pmd.lang.rule.RuleReference; import net.sourceforge.pmd.lang.rule.RuleReference;
import net.sourceforge.pmd.util.CollectionUtil; import net.sourceforge.pmd.util.CollectionUtil;
import net.sourceforge.pmd.util.StringUtil;
import net.sourceforge.pmd.util.filter.Filter; import net.sourceforge.pmd.util.filter.Filter;
import net.sourceforge.pmd.util.filter.Filters; import net.sourceforge.pmd.util.filter.Filters;

View File

@ -845,8 +845,9 @@ public class RuleSetFactory {
// populate a map of values for an individual descriptor // populate a map of values for an individual descriptor
for (PropertyDescriptorField field : valueKeys) { for (PropertyDescriptorField field : valueKeys) {
String valueStr = propertyElement.getAttribute(field.attributeName()); String valueStr = propertyElement.getAttribute(field.attributeName());
if (valueStr != null) if (valueStr != null) {
values.put(field, valueStr); values.put(field, valueStr);
}
} }
if (StringUtils.isBlank(values.get(DEFAULT_VALUE))) { if (StringUtils.isBlank(values.get(DEFAULT_VALUE))) {

View File

@ -16,7 +16,6 @@ import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import net.sourceforge.pmd.util.ResourceLoader; import net.sourceforge.pmd.util.ResourceLoader;
import net.sourceforge.pmd.util.StringUtil;
/** /**
* This class is used to parse a RuleSet reference value. Most commonly used for * This class is used to parse a RuleSet reference value. Most commonly used for

View File

@ -12,7 +12,6 @@ import org.apache.commons.lang3.StringUtils;
import net.sourceforge.pmd.PropertyDescriptorFactory; import net.sourceforge.pmd.PropertyDescriptorFactory;
import net.sourceforge.pmd.PropertyDescriptorField; import net.sourceforge.pmd.PropertyDescriptorField;
import net.sourceforge.pmd.util.StringUtil;
/** /**
* Defines a property type that supports single Character values. * Defines a property type that supports single Character values.

View File

@ -6,7 +6,6 @@ package net.sourceforge.pmd.lang.rule.properties;
import static net.sourceforge.pmd.lang.rule.properties.ValueParser.DOUBLE_PARSER; import static net.sourceforge.pmd.lang.rule.properties.ValueParser.DOUBLE_PARSER;
import java.util.Arrays;
import java.util.Map; import java.util.Map;
import net.sourceforge.pmd.PropertyDescriptorFactory; import net.sourceforge.pmd.PropertyDescriptorFactory;

View File

@ -10,7 +10,6 @@ import org.apache.commons.lang3.StringUtils;
import net.sourceforge.pmd.PropertyDescriptorFactory; import net.sourceforge.pmd.PropertyDescriptorFactory;
import net.sourceforge.pmd.PropertyDescriptorField; import net.sourceforge.pmd.PropertyDescriptorField;
import net.sourceforge.pmd.util.StringUtil;
/** /**
* Defines a datatype that supports single String values. * Defines a datatype that supports single String values.