Cleanup Javadoc warnings in the build

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7474 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Brian Remedios committed 2011-11-21 17:26:59 +00:00
1 parent 7860f88da5
commit 8a6e5539d6
8 files changed
+61 -24

No files matched your search

@@ -12,14 +12,16 @@ public interface PropertyDescriptorFactory {
/**
* Denote the identifiers of the expected fields paired with booleans denoting whether they are
* required (non-null) or not.
* @return
*
* @return Map
*/
Map<String, Boolean> expectedFields();
/**
* Create a property descriptor of the appropriate type using the values provided.
*
* @param valuesById
* @return
* @return PropertyDescriptor<?>
*/
PropertyDescriptor<?> createWith(Map<String, String> valuesById);
}
@@ -92,7 +92,7 @@ public interface PropertySource {
* Returns a description of why the receiver may be dysfunctional. Usually due to missing property
* values or some kind of conflict between values. Returns null if the receiver is ok.
*
* @return
* @return String
*/
String dysfunctionReason();
}
@@ -342,7 +342,7 @@ public abstract class AbstractNode implements Node {
/**
*
* @param types
* @return
* @return boolean
*/
public final boolean hasDecendantOfAnyType(Class<?>... types) {
for (Class<?> type : types) {
@@ -36,9 +36,10 @@ import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;
* from non-private constructors.
*
* @author CL Gilbert (dnoyeb@users.sourceforge.net)
* @todo match parameter types. Aggressively strips off any package names. Normal
*
* TODO match parameter types. Aggressively strips off any package names. Normal
* compares the names as is.
* @todo What about interface declarations which can have internal classes
* TODO What about interface declarations which can have internal classes
*/
public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRule {
/**
@@ -621,7 +622,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
* on types. just use name and num of arguments. will be some false hits,
* but oh well.
*
* @todo investigate limiting the number of passes through config.
* TODO investigate limiting the number of passes through config.
*/
private boolean evaluateDangerOfMethods(Map<MethodHolder, List<MethodInvocation>> classMethodMap) {
//check each method if it calls overridable method
@@ -655,7 +656,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
* marks constructors dangerous if they call any dangerous methods
* Requires only a single pass as methods are already marked
*
* @todo optimize by having methods already evaluated somehow!?
* TODO optimize by having methods already evaluated somehow!?
*/
private void evaluateDangerOfConstructors1(Map<ConstructorHolder, List<MethodInvocation>> classConstructorMap, Set<MethodHolder> evaluatedMethods) {
//check each constructor in the class
@@ -735,7 +736,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
}
/**
* This check must be evaluated independelty for each class. Inner classses
* This check must be evaluated independently for each class. Inner classes
* get their own EvalPackage in order to perform independent evaluation.
*/
@Override
@@ -763,7 +764,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
* just because it calls an unsafe public constructor. We want to show only
* 1 instance of an error, and this would be 2 instances of the same error.
*
* @todo eliminate the redundency
* TODO eliminate the redundancy
*/
@Override
public Object visit(ASTConstructorDeclaration node, Object data) {
@@ -835,7 +836,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
/**
* @return A method call on the class passed in, or null if no method call
* is found.
* @todo Need a better way to match the class and package name to the actual
* TODO Need a better way to match the class and package name to the actual
* method being called.
*/
private static MethodInvocation findMethod(ASTPrimaryExpression node, String className) {
@@ -851,7 +852,7 @@ public final class ConstructorCallsOverridableMethodRule extends AbstractJavaRul
// }
if (meth != null) {
//if it's a call on a variable, or on its superclass ignore it.
if (meth.getReferenceNames().size() == 0 && !meth.isSuper()) {
if (meth.getReferenceNames().isEmpty() && !meth.isSuper()) {
//if this list does not contain our class name, then its not referencing our class
//this is a cheezy test... but it errs on the side of less false hits.
List<String> packClass = meth.getQualifierNames();
@@ -54,7 +54,7 @@ public interface Renderer extends PropertySource {
/**
* Return the default filename extension to use.
*
* @return
* @return String
*/
String defaultFileExtension();
@@ -11,7 +11,7 @@ public class DateTimeUtil {
/**
*
* @param milliseconds
* @return
* @return String
*/
public static String asHoursMinutesSeconds(long milliseconds) {
@@ -11,9 +11,14 @@ import java.io.FileNotFoundException;
import java.io.InputStream;
import java.net.URL;
/**
*/
public final class ResourceLoader {
// Only static methods, so we shouldn't allow an instance to be created
/**
* Constructor for ResourceLoader.
*/
private ResourceLoader() {
}
@@ -21,6 +26,9 @@ public final class ResourceLoader {
* Method to find a file, first by finding it as a file
* (either by the absolute or relative path), then as
* a URL, and then finally seeing if it is on the classpath.
* @param name String
* @return InputStream
* @throws RuleSetNotFoundException
*/
public static InputStream loadResourceAsStream(String name) throws RuleSetNotFoundException {
InputStream stream = ResourceLoader.loadResourceAsStream(name, ResourceLoader.class.getClassLoader());
@@ -33,6 +41,10 @@ public final class ResourceLoader {
/**
* Uses the ClassLoader passed in to attempt to load the
* resource if it's not a File or a URL
* @param name String
* @param loader ClassLoader
* @return InputStream
* @throws RuleSetNotFoundException
*/
public static InputStream loadResourceAsStream(String name, ClassLoader loader) throws RuleSetNotFoundException {
File file = new File(name);
@@ -10,14 +10,13 @@ import java.util.List;
/**
* A number of String-specific utility methods for use by PMD or its IDE plugins.
*
* @author br
* @author BrianRemedios
*/
public final class StringUtil {
public static final String[] EMPTY_STRINGS = new String[0];
private static final boolean SUPPORTS_UTF8 = System.getProperty("net.sourceforge.pmd.supportUTF8", "no").equals("yes");
private StringUtil() {}
/**
@@ -26,7 +25,7 @@ public final class StringUtil {
*
* @param text
* @param prefixes
* @return
* @return boolean
*/
public static boolean startsWithAny(String text, String... prefixes) {
@@ -42,7 +41,7 @@ public final class StringUtil {
*
* @param text
* @param tests
* @return
* @return boolean
*/
public static boolean isAnyOf(String text, String... tests) {
@@ -59,7 +58,7 @@ public final class StringUtil {
*
* @param text
* @param prefixes
* @return
* @return String
*/
public static String withoutPrefixes(String text, String... prefixes) {
@@ -94,6 +93,11 @@ public final class StringUtil {
return true;
}
/**
*
* @param value String
* @return boolean
*/
public static boolean isNotEmpty(String value) {
return !isEmpty(value);
}
@@ -104,7 +108,7 @@ public final class StringUtil {
*
* @param a
* @param b
* @return boolean
* @return boolean
*/
public static boolean areSemanticEquals(String a, String b) {
@@ -114,6 +118,13 @@ public final class StringUtil {
return a.equals(b);
}
/**
*
* @param original String
* @param oldChar char
* @param newString String
* @return String
*/
public static String replaceString(final String original, char oldChar, final String newString) {
int index = original.indexOf(oldChar);
if (index < 0) {
@@ -133,6 +144,13 @@ public final class StringUtil {
}
}
/**
*
* @param original String
* @param oldString String
* @param newString String
* @return String
*/
public static String replaceString(final String original, final String oldString, final String newString) {
int index = original.indexOf(oldString);
if (index < 0) {
@@ -163,6 +181,11 @@ public final class StringUtil {
appendXmlEscaped(buf, src, SUPPORTS_UTF8);
}
/**
*
* @param string String
* @return String
*/
public static String htmlEncode(String string) {
String encoded = replaceString(string, '&', "&amp;");
encoded = replaceString(encoded, '<', "&lt;");
@@ -175,13 +198,12 @@ public final class StringUtil {
* @param src
* @param supportUTF8 override the default setting, whether special characters should be replaced
* with entities (<code>false</code>) or should be included as is (<code>true</code>).
*
* @see #appendXmlEscaped(StringBuffer, String)
* @see #appendXmlEscaped(StringBuilder, String)
*
* TODO - unify the method above with the one below
*
* public to support unit testing - make this package private, once the unit test classes are in the same package.
*/
* public to support unit testing - make this package private, once the unit test classes are in the same package.
*/
public static void appendXmlEscaped(StringBuilder buf, String src, boolean supportUTF8) {
char c;
for (int i = 0; i < src.length(); i++) {