Issue #2080: Fix typos in code

This commit is contained in:
Michal Kordas 2015-09-11 23:48:13 +02:00 committed by Roman Ivanov
parent bc797f31e2
commit 0fc8b62a35
11 changed files with 18 additions and 18 deletions

View File

@ -104,7 +104,7 @@ public final class Main {
exitStatus = 0;
}
else {
// return error is smth is wrong in arguments
// return error if something is wrong in arguments
final List<String> messages = validateCli(commandLine);
cliViolations = !messages.isEmpty();
if (cliViolations) {
@ -124,7 +124,7 @@ public final class Main {
}
}
catch (ParseException pex) {
// smth wrong with arguments - print error and manual
// something wrong with arguments - print error and manual
cliViolations = true;
exitStatus = exitWithCliViolation;
errorCounter = 1;

View File

@ -114,7 +114,7 @@ public abstract class AbstractFileSetCheck
* filter of this FileSetCheck.
* @param extensions the set of file extensions. A missing
* initial '.' character of an extension is automatically added.
* @throws IllegalArgumentException is arument is null
* @throws IllegalArgumentException is argument is null
*/
public final void setFileExtensions(String... extensions) {
if (extensions == null) {

View File

@ -51,7 +51,7 @@ import com.google.common.collect.Maps;
*/
public abstract class AbstractLoader
extends DefaultHandler {
/** Maps public id to resolve to esource name for the DTD. */
/** Maps public id to resolve to resource name for the DTD. */
private final Map<String, String> publicIdToResourceNameMap;
/** Parser to read XML files. **/
private final XMLReader parser;

View File

@ -83,7 +83,7 @@ public abstract class AbstractViolationReporter
}
/**
* Returns the message bundle name resourcebundle that contains the messages
* Returns the message bundle name resource bundle that contains the messages
* used by this module.
* <p>
* The default implementation expects the resource files to be named

View File

@ -37,8 +37,8 @@ public interface Context {
Object get(String key);
/**
* Returns the names of all atttributes of this context.
* @return the names of all atttributes of this context.
* Returns the names of all attributes of this context.
* @return the names of all attributes of this context.
*/
ImmutableCollection<String> getAttributeNames();
}

View File

@ -338,7 +338,7 @@ public final class DetailAST extends CommonASTWithHiddenTokens {
branchTokenTypes = new BitSet();
branchTokenTypes.set(getType());
// add union of all childs
// add union of all children
DetailAST child = getFirstChild();
while (child != null) {
final BitSet childTypes = child.getBranchTokenTypes();

View File

@ -55,7 +55,7 @@ public final class LocalizedMessage
private static Locale sLocale = Locale.getDefault();
/**
* A cache that maps bundle names to RessourceBundles.
* A cache that maps bundle names to ResourceBundles.
* Avoids repetitive calls to ResourceBundle.getBundle().
*/
private static final Map<String, ResourceBundle> BUNDLE_CACHE =

View File

@ -104,9 +104,9 @@ public abstract class BaseCheckTestSupport {
verify(createChecker(aConfig), fileName, fileName, expected);
}
protected void verify(Configuration aConfig, boolean printSeveriy,
protected void verify(Configuration aConfig, boolean printSeverity,
String filename, String... expected) throws Exception {
verify(createChecker(aConfig, printSeveriy), filename, filename, expected);
verify(createChecker(aConfig, printSeverity), filename, filename, expected);
}
protected void verify(Checker checker, String fileName, String... expected)

View File

@ -88,10 +88,10 @@ public class CheckerTest {
assertTrue("Checker.fireFileFinished() doesn't call listener", auditAdapter.wasCalled());
auditAdapter.resetListener();
final SortedSet<LocalizedMessage> msgs = Sets.newTreeSet();
msgs.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
final SortedSet<LocalizedMessage> messages = Sets.newTreeSet();
messages.add(new LocalizedMessage(0, 0, "a Bundle", "message.key",
new Object[] {"arg"}, null, getClass(), null));
checker.fireErrors("Some File Name", msgs);
checker.fireErrors("Some File Name", messages);
assertTrue("Checker.fireErrors() doesn't call listener", auditAdapter.wasCalled());
}

View File

@ -75,13 +75,13 @@ public class CommitValidationTest {
private static final String ISSUE_COMMIT_MESSAGE_REGEX_PATTERN = "^Issue #\\d*: .*$";
private static final String PR_COMMIT_MESSAGE_REGEX_PATTERN = "^Pull #\\d*: .*$";
private static final String OTHER_COMMIT_MESSAGE_REGEXPATTERN =
private static final String OTHER_COMMIT_MESSAGE_REGEX_PATTERN =
"^(minor|config|infra|doc|spelling): .*$";
private static final String ACCEPTED_COMMIT_MESSAGE_REGEX_PATTERN =
"(" + ISSUE_COMMIT_MESSAGE_REGEX_PATTERN + ")|"
+ "(" + PR_COMMIT_MESSAGE_REGEX_PATTERN + ")|"
+ "(" + OTHER_COMMIT_MESSAGE_REGEXPATTERN + ")";
+ "(" + OTHER_COMMIT_MESSAGE_REGEX_PATTERN + ")";
private static final Pattern ACCEPTED_COMMIT_MESSAGE_PATTERN =
Pattern.compile(ACCEPTED_COMMIT_MESSAGE_REGEX_PATTERN, Pattern.DOTALL);
@ -234,7 +234,7 @@ public class CommitValidationTest {
+ " 1) Must match one of the following patterns:\n"
+ " " + ISSUE_COMMIT_MESSAGE_REGEX_PATTERN + "\n"
+ " " + PR_COMMIT_MESSAGE_REGEX_PATTERN + "\n"
+ " " + OTHER_COMMIT_MESSAGE_REGEXPATTERN + "\n"
+ " " + OTHER_COMMIT_MESSAGE_REGEX_PATTERN + "\n"
+ " 2) It contains only one line";
}

View File

@ -30,7 +30,7 @@ import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
/**
* Tests to ensure that default messagebundle is determined correctly.
* Tests to ensure that default message bundle is determined correctly.
*
* @author lkuehne
*/