Skip to content

Enforce and apply Google Java Style formatting #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 51 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
15e39ec
enable compiler warnings and linting
bpkroth Dec 7, 2023
d66eaba
address some trailing whitespace warnings
bpkroth Dec 7, 2023
9fde340
Merge branch 'main' into strict-compiler
bpkroth Dec 8, 2023
3b3906c
compiler fixups
bpkroth Dec 8, 2023
092e06d
compiler fixups
bpkroth Dec 8, 2023
8038636
add some warning suppressions for unused variables
bpkroth Dec 8, 2023
139c953
omit those entirely
bpkroth Dec 8, 2023
259cca6
fixups
bpkroth Dec 8, 2023
77c74ae
whitespace
bpkroth Dec 8, 2023
7abe2e8
use autoclose
bpkroth Dec 8, 2023
a3f7fec
remove more suppressed cast issues
bpkroth Dec 8, 2023
554406d
unnecessary cast
bpkroth Dec 8, 2023
79e7187
avoid unused errors
bpkroth Dec 8, 2023
d93caf7
add serialization requirements
bpkroth Dec 8, 2023
7f89237
whitespace
bpkroth Dec 8, 2023
ff5507d
more minor avoid raw type issues
bpkroth Dec 8, 2023
fc97c1e
in the couple of utility classes, just suppress more warnings
bpkroth Dec 8, 2023
5220c3f
convert throw type to avoid InterruptedException handling warnings
bpkroth Dec 8, 2023
df432f3
docs
bpkroth Dec 8, 2023
d93c61d
enable deprecations
bpkroth Dec 8, 2023
9b95f48
enable auto formatting on compile
bpkroth Dec 8, 2023
e894950
check formatting at ci time
bpkroth Dec 8, 2023
062f7a1
enable vscode configs for formatting
bpkroth Dec 8, 2023
500240d
do format checks in docker build step too
bpkroth Dec 8, 2023
b0398b1
more compiler warning fixups
bpkroth Dec 8, 2023
96ad74b
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 8, 2023
db891e9
Merge branch 'main' into strict-compiler
bpkroth Dec 8, 2023
9fed075
fixup
bpkroth Dec 8, 2023
c53ea80
revert order
bpkroth Dec 8, 2023
e5e9c00
need the col++
bpkroth Dec 8, 2023
94385e7
address some unused and other lint issues
bpkroth Dec 8, 2023
2a2006d
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 8, 2023
448ca24
fixup
bpkroth Dec 8, 2023
0e9174a
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 8, 2023
1e411d4
fixup
bpkroth Dec 8, 2023
121f547
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 8, 2023
2937b46
add a readme with additional developer notes per PR suggestion
bpkroth Dec 11, 2023
4b22f8d
tweak comment
bpkroth Dec 11, 2023
fa34754
add more developer notes
bpkroth Dec 11, 2023
be0f414
include some extension recommendations
bpkroth Dec 11, 2023
43b5cee
update extensions
bpkroth Dec 11, 2023
a5b755c
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 11, 2023
986c0fb
include style notes in the contributor file
bpkroth Dec 11, 2023
4556f10
address more unused warnings
bpkroth Dec 11, 2023
f5bcb19
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 11, 2023
5939e2d
ignore another error
bpkroth Dec 11, 2023
e277f99
Merge branch 'strict-compiler' into java-formatting
bpkroth Dec 11, 2023
cbbe401
Merge branch 'main' into java-formatting
bpkroth Dec 13, 2023
690b024
fixup toc
bpkroth Dec 13, 2023
b845c6d
also compile test sources
bpkroth Dec 13, 2023
a51a1ea
reformat java files
bpkroth Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
bpkroth committed Dec 8, 2023
commit 1e411d4978271d731d5893dd2deb222cd272b629
12 changes: 2 additions & 10 deletions src/main/java/com/oltpbenchmark/util/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,6 @@ public static String formatMaps(Map<?, ?>... maps) {
return (formatMaps(":", false, false, false, false, true, true, maps));
}

/**
* Simple generic class overload to avoid some cast warnings below.
*/
public static class Obj2StrArrMap extends HashMap<Object, String[]> {
// Required serialization field.
static final long serialVersionUID = 0;
}

/**
* Return key/value maps into a nicely formatted table
* The maps are displayed in order from first to last, and there will be a
Expand Down Expand Up @@ -117,8 +109,8 @@ public static String formatMaps(String delimiter, boolean upper, boolean box, bo
// Figure out the largest key size so we can get spacing right
int max_key_size = 0;
int max_title_size = 0;

final Map<Object, String[]>[] map_keys = new Obj2StrArrMap[maps.length];
@SuppressWarnings({"unchecked", "rawtypes"})
final Map<Object, String[]>[] map_keys = (Map<Object, String[]>[]) new Map[maps.length];
final boolean[] map_titles = new boolean[maps.length];
for (int i = 0; i < maps.length; i++) {
Map<?, ?> m = maps[i];
Expand Down