Skip to content

Commit 9906e12

Browse files
committed
Fix spelling typos and grammar errors.
1 parent 3703dec commit 9906e12

File tree

13 files changed

+29
-30
lines changed

13 files changed

+29
-30
lines changed

java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions/AbstractJavaFileObjectAssert.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ public JavaFileObjectKindAssert kind() {
168168

169169
private byte[] rawContent() {
170170
return uncheckedIo(() -> {
171-
var baos = new ByteArrayOutputStream();
172-
try (var is = actual.openInputStream()) {
173-
is.transferTo(baos);
174-
return baos.toByteArray();
171+
var outputStream = new ByteArrayOutputStream();
172+
try (var inputStream = actual.openInputStream()) {
173+
inputStream.transferTo(outputStream);
174+
return outputStream.toByteArray();
175175
}
176176
});
177177
}

java-compiler-testing/src/main/java/io/github/ascopes/jct/assertions/PackageContainerGroupAssert.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ private <T> String fuzzySafePath(Iterable<T> parts) {
248248
}
249249

250250
private boolean fileNameIsPresent(@Nullable Path path) {
251-
// Path can be null if no path elements exist in ZipPath impls.
251+
// Path can be null if no path elements exist in ZipPath implementations.
252252
return Optional
253253
.ofNullable(path)
254254
.map(Path::getFileName)

java-compiler-testing/src/main/java/io/github/ascopes/jct/compilers/JctCompiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ default JctCompiler addCompilerOptions(String compilerOption, String... compiler
430430
* {@link #DEFAULT_PREVIEW_FEATURES}.
431431
*
432432
* <p>Generally, this feature should be avoided if testing across multiple versions
433-
* of Java, as preview features are oftenvnot finalised and may change without warning.
433+
* of Java, as preview features are often not finalised and may change without warning.
434434
*
435435
* @param enabled {@code true} to enable preview features, or {@code false} to disable them.
436436
* @return this compiler object for further call chaining.
@@ -650,7 +650,7 @@ default JctCompiler release(SourceVersion release) {
650650
*
651651
* @return this compiler object for further call chaining.
652652
* @throws UnsupportedOperationException if the current JVM version does not correspond to a
653-
* supported Jave release version in the compiler, or if the
653+
* supported Java release version in the compiler, or if the
654654
* compiler does not support integral version numbers.
655655
* @since 1.1.0
656656
*/

java-compiler-testing/src/main/java/io/github/ascopes/jct/compilers/impl/JctCompilationFactoryImpl.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public final class JctCompilationFactoryImpl implements JctCompilationFactory {
5656

5757
private static final Logger log = LoggerFactory.getLogger(JctCompilationFactoryImpl.class);
5858
private static final String ROOT_PACKAGE = "";
59-
59+
6060
private final JctCompiler compiler;
6161

6262
public JctCompilationFactoryImpl(JctCompiler compiler) {
@@ -132,7 +132,7 @@ public JctCompilation createCompilation(
132132
.addArgument(() -> success ? "completed successfully" : "failed")
133133
.addArgument(compilationExecutionTimeMs)
134134
.addArgument(() -> String.format(
135-
"%.2f",
135+
"%.2f",
136136
(1000.0 * compilationUnits.size()) / compilationExecutionTimeMs
137137
))
138138
.log();
@@ -219,7 +219,7 @@ private Collection<JavaFileObject> filterCompilationUnitsByBinaryNames(
219219
for (var className : classNames) {
220220
var compilationUnit = binaryNamesToCompilationUnits.get(className);
221221
if (compilationUnit == null) {
222-
throw new JctCompilerException("No compilation unit matching " + className
222+
throw new JctCompilerException("No compilation unit matching " + className
223223
+ " found in the provided sources");
224224
}
225225
}
@@ -239,9 +239,8 @@ private Collection<JavaFileObject> filterCompilationUnitsByBinaryNames(
239239
// interface does not expose this information consistently.
240240
// All JCT implementations should be using PathFileObject types internally
241241
// anyway, so this should be fine as a hack for now. In the future I may decide
242-
// to add an additional set of methods to PathFileObject to expose searching
243-
// for PathFileObjects directly to prevent the cast back to JavaFileObject that
244-
// makes us need this hack.
242+
// to add a set of methods to PathFileObject to expose searching for PathFileObjects
243+
// directly to prevent the cast back to JavaFileObject that makes us need this hack.
245244
private PathFileObject forceUpcastJavaFileObject(JavaFileObject jfo) {
246245
return (PathFileObject) jfo;
247246
}

java-compiler-testing/src/main/java/io/github/ascopes/jct/compilers/impl/JctCompilationImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public Builder diagnostics(
216216
/**
217217
* Set the file manager.
218218
*
219-
* <p>The file manager will not be closed once finshed with.
219+
* <p>The file manager will not be closed once finished with.
220220
*
221221
* @param fileManager the file manager.
222222
* @return this builder.

java-compiler-testing/src/main/java/io/github/ascopes/jct/containers/PackageContainerGroup.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ public interface PackageContainerGroup extends ContainerGroup {
138138
* // to achieve the same outcome with simpler syntax.
139139
*
140140
* ClassLoader cl = containerGroup.getClassLoader();
141-
* try (InputStream is = cl.getResourceAsStream("META-INF/spring.factories")) {
142-
* ByteArrayOutputStream baos = new ByteArrayOutputStream();
143-
* is.transferTo(baos);
144-
* String content = new String(baos.toByteArray(), ...);
141+
* try (InputStream inputStream = cl.getResourceAsStream("META-INF/spring.factories")) {
142+
* ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
143+
* inputStream.transferTo(outputStream);
144+
* String content = new String(outputStream.toByteArray(), ...);
145145
* ...
146146
* }
147147
* </code></pre>

java-compiler-testing/src/main/java/io/github/ascopes/jct/containers/impl/AbstractPackageContainerGroup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void addPackage(PathRoot path) {
108108
var actualPath = path.getPath();
109109

110110
// Null filename implies the path is the root directory of a file system (
111-
// like a JIMFS RAM file system we initialize elsewhere).
111+
// like a MemoryFileSystem RAM file system we initialize elsewhere).
112112
var isArchive = actualPath.getFileName() != null && ARCHIVE_EXTENSIONS
113113
.stream()
114114
.anyMatch(actualPath.getFileName().toString().toLowerCase(Locale.ROOT)::endsWith);

java-compiler-testing/src/main/java/io/github/ascopes/jct/filemanagers/config/JctFileManagerConfigurerChain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* This enables configurers to wrap file managers in proxies or delegating implementations
4646
* to intercept or override existing behaviours.
4747
*
48-
* <p>This class is not threadsafe.
48+
* <p>This class is not thread-safe.
4949
*
5050
* @author Ashley Scopes
5151
* @since 0.0.1

java-compiler-testing/src/main/java/io/github/ascopes/jct/utils/StringSlicer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* Utility to efficiently split strings using a delimiter without using regular expressions.
2727
*
28-
* <p>This implementation is stateless and threadsafe.
28+
* <p>This implementation is stateless and thread safe.
2929
*
3030
* @author Ashley Scopes
3131
* @since 0.0.1

java-compiler-testing/src/main/java/io/github/ascopes/jct/utils/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private StringUtils() {
6161
* <p>This is designed to be able to take an input such as {@code List.of("foo", "bar", "baz")},
6262
* and be able to produce a string result such as {@code "foo, bar, or baz"} (where
6363
* {@code connector} in this case would be {@code ", "} and {@code lastConnector} would be
64-
* {@code ", or "}.
64+
* {@code ", or "}).
6565
*
6666
* <p>If no arguments are available, then an empty string is output instead.
6767
*

0 commit comments

Comments
 (0)