mirror of https://github.com/FOME-Tech/fome-fw.git
code inspection cleanups
This commit is contained in:
parent
56abb0c3b6
commit
e506b69f4a
|
@ -1,14 +0,0 @@
|
|||
package com.rusefi.autoupdate;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* IO Exception which was already reported with a UI dialog
|
||||
*/
|
||||
public class ReportedIOException extends IOException {
|
||||
private final IOException e;
|
||||
|
||||
public ReportedIOException(IOException e) {
|
||||
this.e = e;
|
||||
}
|
||||
}
|
|
@ -34,7 +34,6 @@ public class IniFileModel {
|
|||
public Map<String, String> tooltips = new TreeMap<>();
|
||||
public Map<String, String> protocolMeta = new TreeMap<>();
|
||||
private boolean isConstantsSection;
|
||||
private String currentSection;
|
||||
|
||||
public static void main(String[] args) {
|
||||
log.info("Dialogs: " + IniFileModel.getInstance().dialogs);
|
||||
|
@ -143,7 +142,6 @@ public class IniFileModel {
|
|||
|
||||
if (first.startsWith("[") && first.endsWith("]")) {
|
||||
log.info("Section " + first);
|
||||
currentSection = first;
|
||||
isConstantsSection = first.equals("[Constants]");
|
||||
}
|
||||
|
||||
|
|
|
@ -215,10 +215,11 @@ public class BinaryProtocol {
|
|||
// FileLog.rlog("queue: " + LinkManager.COMMUNICATION_QUEUE.toString());
|
||||
if (linkManager.COMMUNICATION_QUEUE.isEmpty() && linkManager.getNeedPullData()) {
|
||||
linkManager.submit(new Runnable() {
|
||||
private final boolean verbose = false; // todo: programmatically detect run under gradle?
|
||||
@Override
|
||||
public void run() {
|
||||
isGoodOutputChannels = requestOutputChannels();
|
||||
// todo: programmatically detect run under gradle?
|
||||
boolean verbose = false;
|
||||
if (verbose)
|
||||
System.out.println("requestOutputChannels " + isGoodOutputChannels);
|
||||
if (isGoodOutputChannels)
|
||||
|
|
|
@ -55,7 +55,7 @@ public class Entry {
|
|||
int ch4 = in.read();
|
||||
if ((ch1 | ch2 | ch3 | ch4) < 0)
|
||||
throw new EOFException();
|
||||
return ((ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1 << 0));
|
||||
return ((ch4 << 24) + (ch3 << 16) + (ch2 << 8) + ch1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@ public class PerfJsonOutputTest {
|
|||
",{\"name\":\"hello2\",\"ph\":\"B\",\"tid\":0,\"pid\":0,\"ts\":0.2}\n" +
|
||||
",{\"name\":\"hello2\",\"ph\":\"E\",\"tid\":0,\"pid\":0,\"ts\":0.3}\n" +
|
||||
",{\"name\":\"hello\",\"ph\":\"E\",\"tid\":0,\"pid\":0,\"ts\":0.4}\n" +
|
||||
"]}", new String(baos.toByteArray()));
|
||||
|
||||
"]}", baos.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ public enum SerialPortScanner {
|
|||
}
|
||||
|
||||
// two steps to avoid ConcurrentModificationException
|
||||
toRemove.stream().forEach(portCache::remove);
|
||||
toRemove.forEach(portCache::remove);
|
||||
}
|
||||
|
||||
boolean hasAnyEcu = ecuCount > 0;
|
||||
|
|
|
@ -12,7 +12,6 @@ public class StructLayout extends Layout {
|
|||
|
||||
public final String typeName;
|
||||
private final String name;
|
||||
private final String comment;
|
||||
private final Boolean noPrefix;
|
||||
private final int size;
|
||||
|
||||
|
@ -46,7 +45,9 @@ public class StructLayout extends Layout {
|
|||
|
||||
this.typeName = parsedStruct.name;
|
||||
this.name = name;
|
||||
this.comment = parsedStruct.comment;
|
||||
|
||||
// TODO: should comment be used?
|
||||
String comment = parsedStruct.comment;
|
||||
this.noPrefix = parsedStruct.noPrefix;
|
||||
|
||||
int initialOffest = offset;
|
||||
|
|
|
@ -14,8 +14,6 @@ import org.jetbrains.annotations.NotNull;
|
|||
* Configuration consumer which writes C header file
|
||||
*/
|
||||
public class CHeaderConsumer extends BaseCHeaderConsumer {
|
||||
@NotNull
|
||||
private final ReaderStateImpl state;
|
||||
/**
|
||||
* looks like sometimes we want to not include "define XXX value" into generated C headers
|
||||
* TODO: document the use-case better
|
||||
|
@ -26,7 +24,6 @@ public class CHeaderConsumer extends BaseCHeaderConsumer {
|
|||
|
||||
public CHeaderConsumer(ReaderStateImpl state, String destCHeader, boolean withC_Defines) {
|
||||
this.variableRegistry = state.getVariableRegistry();
|
||||
this.state = state;
|
||||
this.withC_Defines = withC_Defines;
|
||||
SystemOut.println("Writing C header to " + destCHeader);
|
||||
cHeader = new LazyFile(destCHeader);
|
||||
|
|
Loading…
Reference in New Issue