Skip to content

Feature/cleanup 1 #21

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 4 commits into from
Dec 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions annotations/java/lang/Class.eea

This file was deleted.

4 changes: 0 additions & 4 deletions annotations/java/lang/String.eea

This file was deleted.

4 changes: 0 additions & 4 deletions annotations/java/lang/StringBuilder.eea

This file was deleted.

4 changes: 0 additions & 4 deletions annotations/java/lang/reflect/Field.eea

This file was deleted.

13 changes: 0 additions & 13 deletions annotations/java/math/BigDecimal.eea

This file was deleted.

10 changes: 0 additions & 10 deletions annotations/java/util/Collections.eea

This file was deleted.

4 changes: 0 additions & 4 deletions annotations/java/util/Objects.eea

This file was deleted.

4 changes: 0 additions & 4 deletions annotations/org/slf4j/LoggerFactory.eea

This file was deleted.

6 changes: 6 additions & 0 deletions src/main/java/de/csdev/ebus/client/EBusClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public void addEBusDeviceTableListener(final @NonNull IEBusDeviceTableListener l
Objects.requireNonNull(listener, LABEL_LISTENER);
if (deviceTable != null) {
deviceTable.addEBusDeviceTableListener(listener);
} else {
throw new IllegalStateException("Device Table is not initialized!");
}
}

Expand All @@ -95,6 +97,8 @@ public void addEBusEventListener(final @NonNull IEBusConnectorEventListener list
Objects.requireNonNull(listener, LABEL_LISTENER);
if (controller != null) {
controller.addEBusEventListener(listener);
} else {
throw new IllegalStateException("Controller is not initialized!");
}
}

Expand All @@ -108,6 +112,8 @@ public void addEBusParserListener(final @NonNull IEBusParserListener listener) {
Objects.requireNonNull(listener, LABEL_LISTENER);
if (resolverService != null) {
resolverService.addEBusParserListener(listener);
} else {
throw new IllegalStateException("Resolver Service is not initialized!");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/csdev/ebus/core/EBusControllerBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected void fireOnEBusConnectionStatusChange(final @NonNull ConnectionStatus
protected void initThreadPool() {
// create new thread pool to send received telegrams
// limit the number of threads to 30
threadPool = new ThreadPoolExecutor(0, 30, 60L, TimeUnit.SECONDS, new SynchronousQueue<>(),
threadPool = new ThreadPoolExecutor(5, 60, 60L, TimeUnit.SECONDS, new SynchronousQueue<>(),
new EBusWorkerThreadFactory("ebus-receiver", true));

// create watch dog thread pool
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/de/csdev/ebus/core/EBusReceiveStateMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ public String toDumpString() {
/**
* Update the state machine
*
* @param data The next byte
* @param dataByte The next byte
* @throws EBusDataException throws an exception on any telegram error
*/
public void update(final byte data0) throws EBusDataException {
public void update(final byte dataByte) throws EBusDataException {

byte data = data0;
byte data = dataByte;

try {

Expand Down