Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mernst committed Aug 25, 2022
1 parent b51475a commit e6f6db8
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion changelog.md
Expand Up @@ -1660,7 +1660,7 @@ Version 3.2.6
------------------
[issues resolved](https://github.com/javaparser/javaparser/milestone/46?closed=1)
* `EmptyMemberDeclaration` is gone!
It was deprecated for a while because it it was in the AST, but doesn't have any meaning in a Java program.
It was deprecated for a while because it was in the AST, but doesn't have any meaning in a Java program.
`EmptyStmt` was also deprecated, but that has been reverted.
This node *does* have meaning.

Expand Down
Expand Up @@ -53,7 +53,7 @@ public void test() {
" }" ;
CompilationUnit cu = StaticJavaParser.parse(before);
LexicalPreservingPrinter.setup(cu);
// add method method declaration
// add method declaration
MethodDeclaration decl = cu.getChildNodesByType(ClassOrInterfaceDeclaration.class).get(0).addMethod("f", Keyword.PUBLIC);
// create body
BlockStmt body = new BlockStmt();
Expand Down
Expand Up @@ -49,7 +49,7 @@ default boolean hasParentNode() {
* Sets the parent node.
*
* @param parentNode the parent node, or {@code null} to set no parent.
* @return return {@code this}
* @return {@code this}
*/
T setParentNode(Node parentNode);

Expand Down
Expand Up @@ -91,7 +91,7 @@
* like where braces or comma's are exactly.
* Therefore there is no position information on everything in the original source file.
* <h2>Observers</h2>
* <p>It is possible to add observers to the the tree.
* <p>It is possible to add observers to the tree.
* Any change in the tree is sent as an event to any observers watching.
* <h2>Visitors</h2>
* <p>The most comfortable way of working with an abstract syntax tree is using visitors.
Expand Down
Expand Up @@ -36,7 +36,7 @@
import static com.github.javaparser.utils.Utils.assertNotNull;

/**
* An assignment expression. It supports the operators that are found the the AssignExpr.Operator enum.
* An assignment expression. It supports the operators that are found the AssignExpr.Operator enum.
* <br>{@code a=5}
* <br>{@code time+=500}
* <br>{@code watch.time+=500}
Expand Down
Expand Up @@ -37,7 +37,7 @@

/**
* An expression with an expression on the left, an expression on the right, and an operator in the middle.
* It supports the operators that are found the the BinaryExpr.Operator enum.
* It supports the operators that are found the BinaryExpr.Operator enum.
* <br>{@code a && b}
* <br>{@code 155 * 33}
*
Expand Down
Expand Up @@ -136,7 +136,7 @@ default List<ResolvedReferenceType> getAllAncestors(Function<ResolvedReferenceTy
};

/*
* breadth first search all all ancestors
* breadth first search all ancestors
* In the example above, this method returns B,C,D,E
*/
Function<ResolvedReferenceTypeDeclaration, List<ResolvedReferenceType>> breadthFirstFunc = (rrtd) -> {
Expand Down
Expand Up @@ -75,7 +75,7 @@ enum Result {
/**
* @param localPath the path to the file that was parsed, relative to the source root path.
* @param absolutePath the absolute path to the file that was parsed.
* @param result the result of of parsing the file.
* @param result the result of parsing the file.
*/
Result process(Path localPath, Path absolutePath, ParseResult<CompilationUnit> result);
}
Expand Down
Expand Up @@ -26,7 +26,7 @@ public List<PatternExpr> patternExprsExposedFromChildren() {
// Avoid infinite loop
if(!this.equals(innerContext)) {
// Note that `UnaryExpr.Operator.LOGICAL_COMPLEMENT` is `!`
// Previously negated pattern expressions are now now available (double negatives) -- e.g. if(!!("a" instanceof String s)) {}
// Previously negated pattern expressions are now available (double negatives) -- e.g. if(!!("a" instanceof String s)) {}
results.addAll(innerContext.negatedPatternExprsExposedFromChildren());
}
}
Expand Down
Expand Up @@ -614,7 +614,7 @@ private static boolean isSyntacticallyAAmbiguousName(Node name) {
//
// 4. In the default value clause of an annotation type element declaration (§9.6.2)
//
// 5. To the right of an "=" in an an element-value pair (§9.7.1)
// 5. To the right of an "=" in an element-value pair (§9.7.1)

if (whenParentIs(MemberValuePair.class, name, (p, c) -> p.getValue() == c)) {
return true;
Expand Down
Expand Up @@ -18,7 +18,7 @@ class JavaParserSymbolDeclarationTest {

/**
* Try to create a field using {@link JavaParserSymbolDeclaration#field(VariableDeclarator, TypeSolver)} and check
* if the returned declaration is marked as a field and can be converted converted to a
* if the returned declaration is marked as a field and can be converted to a
* {@link com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration} using {@link ResolvedValueDeclaration#asField()}.
*/
@Test
Expand All @@ -34,7 +34,7 @@ void createdFieldShouldBeMarkedAsField() {

/**
* Try to create a parameter using {@link JavaParserSymbolDeclaration#parameter(Parameter, TypeSolver)} and check
* if the returned declaration is marked as a parameter and can be converted converted to a
* if the returned declaration is marked as a parameter and can be converted to a
* {@link com.github.javaparser.resolution.declarations.ResolvedParameterDeclaration} using {@link ResolvedValueDeclaration#asParameter()}.
*/
@Test
Expand All @@ -60,7 +60,7 @@ void createdLocalVariableShouldBeMarkedAsVariable() {

/**
* Try to create a pattern variable using {@link JavaParserSymbolDeclaration#patternVar(PatternExpr, TypeSolver)} and check
* if the returned declaration is marked as a pattern and can be converted converted to a
* if the returned declaration is marked as a pattern and can be converted to a
* {@link com.github.javaparser.resolution.declarations.ResolvedPatternDeclaration} using {@link ResolvedValueDeclaration#asPattern()}.
*/
@Test
Expand Down
Expand Up @@ -101,7 +101,7 @@ public void setType(final Type type) {
* int @Ann1 [] @Ann2 [] array;
* }</pre></p>
*
* <p>in this this method will return a list with the annotation expressions <pre>@Ann1</pre>
* <p>in this method will return a list with the annotation expressions <pre>@Ann1</pre>
* and <pre>@Ann2</pre></p>
*
* <p>Note that the first list element of arraysAnnotations will refer to the first array modifier encountered.
Expand Down

0 comments on commit e6f6db8

Please sign in to comment.