Skip to content

Commit

Permalink
refactor: Operator wrapping on end of line
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek and TeamModerne committed Sep 21, 2024
1 parent 542cf64 commit 41af19f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/openrewrite/analysis/InvocationMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public boolean isAnyArgument(Cursor cursor) {
return asExpression(
cursor,
expression -> nearestMethodCall(cursor).map(call ->
call.getArguments().contains(expression)
&& matcher.matches(call) // Do the matcher.matches(...) last as this can be expensive
call.getArguments().contains(expression) &&
matcher.matches(call) // Do the matcher.matches(...) last as this can be expensive
).orElse(false)
);
}
Expand Down
24 changes: 12 additions & 12 deletions src/test/resources/dataflow-functional-tests/ArchiveAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public void closeAnalyzer() throws Exception {
if (!success && tempFileLocation.exists()) {
final String[] l = tempFileLocation.list();
if (l != null && l.length > 0) {
LOGGER.warn("Failed to delete the Archive Analyzer's temporary files from `{}`, "
+ "see the log for more details", tempFileLocation.toString());
LOGGER.warn("Failed to delete the Archive Analyzer's temporary files from `{}`, " +
"see the log for more details", tempFileLocation.toString());
}
}
}
Expand Down Expand Up @@ -520,14 +520,14 @@ private void ensureReadableJar(final String archiveExt, BufferedInputStream in)
in.mark(7);
final byte[] b = new byte[7];
final int read = in.read(b);
if (read == 7
&& b[0] == '#'
&& b[1] == '!'
&& b[2] == '/'
&& b[3] == 'b'
&& b[4] == 'i'
&& b[5] == 'n'
&& b[6] == '/') {
if (read == 7 &&
b[0] == '#' &&
b[1] == '!' &&
b[2] == '/' &&
b[3] == 'b' &&
b[4] == 'i' &&
b[5] == 'n' &&
b[6] == '/') {
boolean stillLooking = true;
int chr;
int nxtChr;
Expand Down Expand Up @@ -655,8 +655,8 @@ private boolean isZipFileActuallyJarFile(Dependency dependency) {
ZipFile zip = null;
try {
zip = new ZipFile(dependency.getActualFilePath());
if (zip.getEntry("META-INF/MANIFEST.MF") != null
|| zip.getEntry("META-INF/maven") != null) {
if (zip.getEntry("META-INF/MANIFEST.MF") != null ||
zip.getEntry("META-INF/maven") != null) {
final Enumeration<ZipArchiveEntry> entries = zip.getEntries();
while (entries.hasMoreElements()) {
final ZipArchiveEntry entry = entries.nextElement();
Expand Down
16 changes: 8 additions & 8 deletions src/test/resources/dataflow-functional-tests/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1719,10 +1719,10 @@ public static void forceMkdir(File directory) throws IOException {
if (directory.exists()) {
if (!directory.isDirectory()) {
String message =
"File "
+ directory
+ " exists and is "
+ "not a directory. Unable to create directory.";
"File " +
directory +
" exists and is " +
"not a directory. Unable to create directory.";
throw new IOException(message);
}
} else {
Expand Down Expand Up @@ -1823,8 +1823,8 @@ public static boolean isFileNewer(File file, File reference) {
throw new IllegalArgumentException("No specified reference file");
}
if (!reference.exists()) {
throw new IllegalArgumentException("The reference file '"
+ reference + "' doesn't exist");
throw new IllegalArgumentException("The reference file '" +
reference + "' doesn't exist");
}
return isFileNewer(file, reference.lastModified());
}
Expand Down Expand Up @@ -1890,8 +1890,8 @@ public static boolean isFileOlder(File file, File reference) {
throw new IllegalArgumentException("No specified reference file");
}
if (!reference.exists()) {
throw new IllegalArgumentException("The reference file '"
+ reference + "' doesn't exist");
throw new IllegalArgumentException("The reference file '" +
reference + "' doesn't exist");
}
return isFileOlder(file, reference.lastModified());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ public static void addTarget( Commandline cl, List<File> files )
}
catch ( IOException ex )
{
throw new IllegalArgumentException( "Could not get canonical paths for workingDirectory = "
+ workingDirectory + " or files=" + files, ex );
throw new IllegalArgumentException( "Could not get canonical paths for workingDirectory = " +
workingDirectory + " or files=" + files, ex );
}
}

Expand Down

0 comments on commit 41af19f

Please sign in to comment.