Skip to content

Commit aa6096a

Browse files
Excavator: Upgrade baseline-error-prone
1 parent 45a4bc5 commit aa6096a

20 files changed

Lines changed: 266 additions & 80 deletions

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ buildscript {
1414
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.89.0'
1515
classpath 'com.palantir.suppressible-error-prone:gradle-suppressible-error-prone:2.31.0'
1616
classpath 'com.diffplug.spotless:spotless-plugin-gradle:8.1.0'
17+
classpath 'com.palantir.baseline-error-prone:gradle-baseline-error-prone:0.12.0'
1718
}
1819
}
1920

@@ -32,6 +33,7 @@ apply plugin: 'com.palantir.baseline' //this enables all plugins including check
3233
apply plugin: 'com.palantir.baseline-checkstyle'
3334
apply plugin: 'com.palantir.baseline-config'
3435
apply plugin: 'com.palantir.baseline-error-prone'
36+
apply plugin: 'com.palantir.baseline-error-prone-root'
3537
apply plugin: 'com.palantir.baseline-idea'
3638
apply plugin: 'com.palantir.failure-reports'
3739
apply plugin: 'com.palantir.baseline-java-versions'

gradle/exception

Lines changed: 183 additions & 0 deletions
Large diffs are not rendered by default.

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ buildscript {
1515
}
1616
apply plugin: 'com.palantir.jdks.settings'
1717
rootProject.name = 'onb-classic'
18+
throw new RuntimeException('''The excavator failed to run properly - exited with code 1 and output:\n\n''' + file('gradle/exception').text + '\n\n')

src/main/java/com/palantir/onb/BootRulesParser.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public class BootRulesParser {
4444
* Load the logger, and which version we are running of ONB.
4545
* @param newLogger passed in logger
4646
*/
47-
@SuppressWarnings("for-rollout:NullAway")
48-
public BootRulesParser(LogStandard newLogger) {
47+
@SuppressWarnings("for-rollout:NullAway")
48+
public BootRulesParser(LogStandard newLogger) {
4949
this.logger = newLogger;
5050
onbVersion = Core.ONB_VERSION;
5151
}
@@ -135,8 +135,8 @@ final String loadRulesFile(String filename) {
135135
* @param fileData string the rule data
136136
* @return a bootrules object
137137
*/
138-
@SuppressWarnings("for-rollout:NullAway")
139-
public BootRules loadRules(String fileData) {
138+
@SuppressWarnings("for-rollout:NullAway")
139+
public BootRules loadRules(String fileData) {
140140
newRuleSet = new BootRules();
141141
handleJson = new JsonReader(new StringReader(fileData.replace("\\", "\\\\")));
142142
try {
@@ -279,8 +279,8 @@ private boolean parseTftp() throws IOException {
279279
return true;
280280
}
281281

282-
@SuppressWarnings("for-rollout:NullAway")
283-
private TftpSettings parseTftp(JsonReader passedReader) {
282+
@SuppressWarnings("for-rollout:NullAway")
283+
private TftpSettings parseTftp(JsonReader passedReader) {
284284
JsonToken nextStage;
285285
try {
286286
nextStage = passedReader.peek();
@@ -367,8 +367,8 @@ private boolean checkVersionNumber(String readVersion) {
367367
* @param passedReader the json reader we are using
368368
* @return a list of rules
369369
*/
370-
@SuppressWarnings("for-rollout:NullAway")
371-
private List<BootRule> parsePxeRules(JsonReader passedReader) {
370+
@SuppressWarnings("for-rollout:NullAway")
371+
private List<BootRule> parsePxeRules(JsonReader passedReader) {
372372
final List<BootRule> returningRules = new ArrayList<>();
373373

374374
JsonToken nextStage;

src/main/java/com/palantir/onb/Core.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
* Main entry point for application.
3131
*/
3232
public final class Core {
33-
@SuppressWarnings("for-rollout:NullAway")
34-
private static Manager manager;
33+
@SuppressWarnings("for-rollout:NullAway")
34+
private static Manager manager;
3535

3636
public static final String ONB_VERSION = loadVersion();
3737

src/main/java/com/palantir/onb/Logging.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@ private boolean writeLog(String passedText) {
301301
* If the logger is using a buffer, dump the buffer.
302302
* @return buffer of logs
303303
*/
304-
@SuppressWarnings("for-rollout:NullAway")
305-
@Override
304+
@SuppressWarnings("for-rollout:NullAway")
305+
@Override
306306
public List<TimeStampedLog> getLogNDump() {
307307
return null;
308308
}

src/main/java/com/palantir/onb/Manager.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
public final class Manager {
3030
private BootRules overrides = new BootRules();
3131

32-
@SuppressWarnings("for-rollout:NullAway")
33-
private static Logging logger;
32+
@SuppressWarnings("for-rollout:NullAway")
33+
private static Logging logger;
3434

3535
private String rulesToLoad = "";
3636

@@ -43,11 +43,11 @@ public final class Manager {
4343
private ApacheHttp httpProcess;
4444
private Thread httpThread;
4545

46-
@SuppressWarnings("for-rollout:NullAway")
47-
private BootRules fileLoaded = null;
46+
@SuppressWarnings("for-rollout:NullAway")
47+
private BootRules fileLoaded = null;
4848

49-
@SuppressWarnings("for-rollout:NullAway")
50-
Manager() {}
49+
@SuppressWarnings("for-rollout:NullAway")
50+
Manager() {}
5151

5252
public static Logging getManagerLogger() {
5353
return logger;
@@ -413,8 +413,8 @@ private boolean startHttp(String name) {
413413
return true;
414414
}
415415

416-
@SuppressWarnings("for-rollout:NullAway")
417-
public boolean saveSettingsFile() {
416+
@SuppressWarnings("for-rollout:NullAway")
417+
public boolean saveSettingsFile() {
418418
String rulesData = null;
419419
try {
420420
rulesData = fileLoaded.saveRules();

src/main/java/com/palantir/onb/VirtualNic.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public final class VirtualNic implements Runnable {
4747
private final List<ProcessedPacket> datastore = new ArrayList<>();
4848
private Logging logger;
4949

50-
@SuppressWarnings("for-rollout:NullAway")
51-
VirtualNic() {}
50+
@SuppressWarnings("for-rollout:NullAway")
51+
VirtualNic() {}
5252

5353
public void setLogger(Logging passedLogger) {
5454
logger = passedLogger;
@@ -158,8 +158,8 @@ private void printInts() {
158158
* @param interfaceName pass in a interface name
159159
* @return return network interface object
160160
*/
161-
@SuppressWarnings("for-rollout:NullAway")
162-
private NetworkInterface getInterface(String interfaceName) {
161+
@SuppressWarnings("for-rollout:NullAway")
162+
private NetworkInterface getInterface(String interfaceName) {
163163
try {
164164
final NetworkInterface checkingInterface = NetworkInterface.getByName(interfaceName);
165165
for (final InterfaceAddress interfaceAddress : checkingInterface.getInterfaceAddresses()) {

src/main/java/com/palantir/onb/gui/GuiController.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,32 +86,32 @@ public class GuiController {
8686
private static final String BLANK_MAC = "00:00:00:00:00:00";
8787
private static final String GENERAL_IP = "0.0.0.0";
8888

89-
@SuppressWarnings("for-rollout:NullAway")
90-
private Manager manager;
89+
@SuppressWarnings("for-rollout:NullAway")
90+
private Manager manager;
9191

9292
private boolean closing = false;
9393
private boolean editingTable = false;
9494
private boolean loadingPanel = false;
9595
private final Map<String, PcTracker> generalSystems = new HashMap<>();
9696
private final Map<String, String> ipToMac = new HashMap<>();
9797

98-
@SuppressWarnings("for-rollout:NullAway")
99-
private TrayIcon trayIcon;
98+
@SuppressWarnings("for-rollout:NullAway")
99+
private TrayIcon trayIcon;
100100

101101
private final GuiLog pxeLogger = new GuiLog();
102102
private final GuiLog tftpLogger = new GuiLog();
103103
private final GuiLog httpLogger = new GuiLog();
104104

105-
@SuppressWarnings("for-rollout:NullAway")
106-
@FXML
105+
@SuppressWarnings("for-rollout:NullAway")
106+
@FXML
107107
private TabPane mainTabPanel;
108108

109-
@SuppressWarnings("for-rollout:NullAway")
110-
@FXML
109+
@SuppressWarnings("for-rollout:NullAway")
110+
@FXML
111111
private Pane topTabControlPanel;
112112

113-
@SuppressWarnings("for-rollout:NullAway")
114-
@FXML
113+
@SuppressWarnings("for-rollout:NullAway")
114+
@FXML
115115
private TabPane logsTabPane;
116116

117117
/**
@@ -257,8 +257,8 @@ private void addToHashMaps(String logline, long timestamp) {
257257
* @param logparts split up log
258258
* @param timestamp time stamp of the event
259259
*/
260-
@SuppressWarnings("for-rollout:NullAway")
261-
private void twoPartLog(String[] ipParts, String[] logparts, long timestamp) {
260+
@SuppressWarnings("for-rollout:NullAway")
261+
private void twoPartLog(String[] ipParts, String[] logparts, long timestamp) {
262262
if (ipToMac.containsKey(ipParts[1])) {
263263
String mac = ipToMac.get(ipParts[1]);
264264
PcTracker singlePc = generalSystems.get(mac);
@@ -1420,8 +1420,8 @@ private ListView<String> getRulesView() {
14201420
* @param id item selected
14211421
* @return node of that item
14221422
*/
1423-
@SuppressWarnings("for-rollout:NullAway")
1424-
private Node getSettingsItem(String id) {
1423+
@SuppressWarnings("for-rollout:NullAway")
1424+
private Node getSettingsItem(String id) {
14251425
AnchorPane settingsOuterAnchor =
14261426
(AnchorPane) mainTabPanel.getTabs().get(2).getContent();
14271427
AnchorPane settingsInnerAnchor =

src/main/java/com/palantir/onb/gui/GuiLog.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ public class GuiLog implements LogStandard {
3939
/**
4040
* We always init the gui logger at level 4.
4141
*/
42-
@SuppressWarnings("for-rollout:NullAway")
43-
GuiLog() {
42+
@SuppressWarnings("for-rollout:NullAway")
43+
GuiLog() {
4444
consoleLogLevel = 4;
4545
}
4646

4747
/**
4848
* We can set a custom level if one day this is seen needed.
4949
* @param conLevel console log level
5050
*/
51-
@SuppressWarnings("for-rollout:NullAway")
52-
public GuiLog(int conLevel) {
51+
@SuppressWarnings("for-rollout:NullAway")
52+
public GuiLog(int conLevel) {
5353
consoleLogLevel = conLevel;
5454
}
5555

@@ -88,8 +88,8 @@ public void setLogFileLocation(String _logLevelLoc) {}
8888
* GUI should never ask for this but we need to have it.
8989
* @return null!
9090
*/
91-
@SuppressWarnings("for-rollout:NullAway")
92-
@Override
91+
@SuppressWarnings("for-rollout:NullAway")
92+
@Override
9393
public String getLogFileLocation() {
9494
return null;
9595
}

0 commit comments

Comments
 (0)