Issue #1555: Fix various typos
Fixes `SpellCheckingInspection` inspection violation. Description: >Spellchecker inspection helps locate typos and misspelling in your code, comments and literals
This commit is contained in:
parent
b372cfa0a8
commit
7b8a3aa5bb
|
|
@ -126,10 +126,10 @@ public abstract class BaseCheckTestSupport
|
|||
final int errs = aC.process(theFiles);
|
||||
|
||||
// process each of the lines
|
||||
final ByteArrayInputStream bais =
|
||||
final ByteArrayInputStream localStream =
|
||||
new ByteArrayInputStream(stream.toByteArray());
|
||||
final LineNumberReader lnr =
|
||||
new LineNumberReader(new InputStreamReader(bais, StandardCharsets.UTF_8));
|
||||
new LineNumberReader(new InputStreamReader(localStream, StandardCharsets.UTF_8));
|
||||
|
||||
for (int i = 0; i < aExpected.length; i++) {
|
||||
final String expected = aMessageFileName + ":" + aExpected[i];
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtils;
|
|||
*
|
||||
**/
|
||||
public final class Main {
|
||||
/** Exit code returned when excecution finishes with {@link CheckstyleException}*/
|
||||
/** Exit code returned when execution finishes with {@link CheckstyleException}*/
|
||||
private static final int EXIT_WITH_CHECKSTYLE_EXCEPTION_CODE = -2;
|
||||
|
||||
/** Name for the option 'v'. */
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ import com.puppycrawl.tools.checkstyle.api.CheckstyleException;
|
|||
|
||||
/**
|
||||
* A module factory creates Objects from a given name.
|
||||
* It's purpose is to map the shortnames like
|
||||
* {@code AvoidStarImport} to full classnames like
|
||||
* It's purpose is to map the short names like
|
||||
* {@code AvoidStarImport} to full class names like
|
||||
* {@code com.puppycrawl.tools.checkstyle.checks.AvoidStarImportCheck}.
|
||||
* A ModuleFactory can implement this name resolution by using naming
|
||||
* conventions, fallback strategies, etc.
|
||||
|
|
@ -38,7 +38,7 @@ public interface ModuleFactory {
|
|||
* is returned. If the name is not a class name the ModuleFactory uses
|
||||
* heuristics to find the corresponding class.
|
||||
*
|
||||
* @param name the name of the module, might be a shortname
|
||||
* @param name the name of the module, might be a short name
|
||||
* @return the created module
|
||||
* @throws CheckstyleException if no module can be instantiated from name
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import com.puppycrawl.tools.checkstyle.utils.CheckUtils;
|
|||
* Check has an option <b>ignorePrimitiveTypes</b> which allows ignoring lack of
|
||||
* final modifier at
|
||||
* <a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html">
|
||||
* primitive datatype</a> parameter. Default value <b>false</b>.
|
||||
* primitive data type</a> parameter. Default value <b>false</b>.
|
||||
* </p>
|
||||
* E.g.:
|
||||
* <p>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class JavadocStyleCheck
|
|||
|
||||
/** HTML tags that are allowed in java docs.
|
||||
* From http://www.w3schools.com/tags/default.asp
|
||||
* The froms and structure tags are not allowed
|
||||
* The forms and structure tags are not allowed
|
||||
*/
|
||||
private static final Set<String> ALLOWED_TAGS = ImmutableSortedSet.of(
|
||||
"a", "abbr", "acronym", "address", "area", "b", "bdo", "big",
|
||||
|
|
@ -183,7 +183,7 @@ public class JavadocStyleCheck
|
|||
}
|
||||
|
||||
/**
|
||||
* Performs the various checks agains the Javadoc comment.
|
||||
* Performs the various checks against the Javadoc comment.
|
||||
*
|
||||
* @param ast the AST of the element being documented
|
||||
* @param comment the source lines that make up the Javadoc comment.
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ class TagParser {
|
|||
final int column = pos.getColumnNo() + 1;
|
||||
final String text = javadocText[pos.getLineNo()];
|
||||
|
||||
//Character.isJavidentifier... may not be a valid HTML
|
||||
//Character.isJavaIdentifier... may not be a valid HTML
|
||||
//identifier but is valid for generics
|
||||
return column < text.length()
|
||||
&& (Character.isJavaIdentifierStart(text.charAt(column))
|
||||
|
|
@ -173,7 +173,7 @@ class TagParser {
|
|||
text = text.substring(column).trim();
|
||||
int position = 0;
|
||||
|
||||
//Character.isJavidentifier... may not be a valid HTML
|
||||
//Character.isJavaIdentifier... may not be a valid HTML
|
||||
//identifier but is valid for generics
|
||||
while (position < text.length()
|
||||
&& (Character.isJavaIdentifierStart(text.charAt(position))
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class FinalClassCheckTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testFianlClass() throws Exception {
|
||||
public void testFinalClass() throws Exception {
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(FinalClassCheck.class);
|
||||
final String[] expected = {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class HideUtilityClassConstructorCheckTest
|
|||
verify(checkConfig, getPath("design" + File.separator + "UtilityClassConstructorPrivate.java"), expected);
|
||||
}
|
||||
|
||||
/** Nonstatic methods - always OK */
|
||||
/** Non-static methods - always OK */
|
||||
@Test
|
||||
public void testNonUtilClass() throws Exception {
|
||||
final DefaultConfiguration checkConfig =
|
||||
|
|
@ -88,7 +88,7 @@ public class HideUtilityClassConstructorCheckTest
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testOnlyNonstaticFieldNonUtilClass() throws Exception {
|
||||
public void testOnlyNonStaticFieldNonUtilClass() throws Exception {
|
||||
final DefaultConfiguration checkConfig =
|
||||
createCheckConfig(HideUtilityClassConstructorCheck.class);
|
||||
final String[] expected = ArrayUtils.EMPTY_STRING_ARRAY;
|
||||
|
|
|
|||
|
|
@ -202,10 +202,10 @@ public class WriteTagCheckTest extends BaseCheckTestSupport {
|
|||
final int errs = checker.process(theFiles);
|
||||
|
||||
// process each of the lines
|
||||
final ByteArrayInputStream bais =
|
||||
final ByteArrayInputStream localStream =
|
||||
new ByteArrayInputStream(stream.toByteArray());
|
||||
try (final LineNumberReader lnr = new LineNumberReader(
|
||||
new InputStreamReader(bais, StandardCharsets.UTF_8))) {
|
||||
new InputStreamReader(localStream, StandardCharsets.UTF_8))) {
|
||||
|
||||
for (int i = 0; i < expected.length; i++) {
|
||||
final String expectedResult = messageFileName + ":" + expected[i];
|
||||
|
|
|
|||
Loading…
Reference in New Issue