Skip to content

Commit 4c56781

Browse files
lint: Java style (codacy)
1 parent e5f3eac commit 4c56781

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

hack/generate-e2e-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def __init__(self, name):
7272
def set_core_code(self, code):
7373
self.coreCode = code
7474
return self
75-
75+
7676
def set_reference_url(self, url):
7777
self.referenceURL = url
7878
return self

src/rprocessing/Runner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ public boolean accept(final File f) {
159159
for (final File d : dirs) {
160160
searchForExtraStuff(d, entries);
161161
}
162-
} else {
163-
// log("No dirs in ", dir);
162+
// } else {
163+
// log("No dirs in ", dir);
164164
}
165165
}
166166
}

src/rprocessing/TreeCopier.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@
4343

4444
class TreeCopier implements FileVisitor<Path> {
4545

46+
private final Path source;
47+
private final Path target;
48+
4649
/**
4750
* Copy source file to target location.
4851
*/
49-
static void copyFile(final Path source, final Path target) {
52+
private static void copyFile(final Path source, final Path target) {
5053
try {
5154
Files.copy(source, target, COPY_ATTRIBUTES, REPLACE_EXISTING);
5255
} catch (final IOException ioException) {
5356
System.err.format("Unable to copy: %s: %s%n", source, ioException);
5457
}
5558
}
5659

57-
private final Path source;
58-
private final Path target;
59-
6060
TreeCopier(final Path source, final Path target) {
6161
this.source = source;
6262
this.target = target;

src/rprocessing/exception/RSketchError.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public String toString() {
5959
}
6060

6161
// TODO: Support the line and column.
62-
public static RSketchError toSketchException(Throwable t) {
62+
public static RSketchError toSketchException(Throwable terr) {
63+
Throwable t = terr;
6364
log(t.getClass().toString());
6465
if (t instanceof RuntimeException && t.getCause() != null) {
6566
t = t.getCause();

src/rprocessing/mode/RLangKeywordMap.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,16 @@ protected int getSegmentMapKey(final Segment s, final int off, final int len) {
8080

8181
// private members
8282
class Keyword {
83+
84+
public char[] keyword;
85+
public byte id;
86+
public Keyword next;
87+
8388
public Keyword(final char[] keyword, final byte id, final Keyword next) {
8489
this.keyword = keyword;
8590
this.id = id;
8691
this.next = next;
8792
}
88-
89-
public char[] keyword;
90-
public byte id;
91-
public Keyword next;
9293
}
9394

9495
}

src/test/e2e/util/ImageUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ private static float imgDifference(PImage i0, PImage i1) {
2828
i1.loadPixels();
2929
int[] ip1 = i1.pixels;
3030
for (int n = 0; n < ip0.length; n++) {
31-
int pxl0 = ip0[n], r0, g0, b0;
32-
int pxl1 = ip1[n], r1, g1, b1;
31+
int pxl0 = ip0[n]
32+
int r0, g0, b0;
3333
r0 = (pxl0 >> 20) & 0xF;
3434
g0 = (pxl0 >> 12) & 0xF;
3535
b0 = (pxl0 >> 4) & 0xF;
36+
int pxl1 = ip1[n]
37+
int r1, g1, b1;
3638
r1 = (pxl1 >> 20) & 0xF;
3739
g1 = (pxl1 >> 12) & 0xF;
3840
b1 = (pxl1 >> 4) & 0xF;

0 commit comments

Comments
 (0)