Skip to content

Commit

Permalink
Code cleanups found via IntelliJ Code Inspection
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasschaefer committed Aug 24, 2021
1 parent 0fff9f6 commit b95a8eb
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -647,7 +647,7 @@ event streams:
* Execution: All execution events (Activities are Started, Ended and Transitions are being taken)
* History: All history events

### Configuration
### Configuration of Eventing Bridge
```yaml
camunda:
eventing:
Expand Down
Expand Up @@ -41,7 +41,7 @@ public class ProcessEngineFactory {

private static final Logger log = LoggerFactory.getLogger(ProcessEngineFactory.class);

protected PathMatchingResourcePatternResolver resourceLoader = new PathMatchingResourcePatternResolver();
protected final PathMatchingResourcePatternResolver resourceLoader = new PathMatchingResourcePatternResolver();

/**
* The {@link ProcessEngine} is started with the application start so that the task scheduler is started immediately.
Expand Down
Expand Up @@ -18,7 +18,6 @@

import info.novatec.micronaut.camunda.bpm.feature.Configuration;
import io.micronaut.context.annotation.Requires;
import io.micronaut.context.event.ApplicationEventPublisher;
import org.camunda.bpm.engine.ProcessEngine;
import org.camunda.bpm.engine.impl.bpmn.parser.BpmnParseListener;
import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
Expand All @@ -43,13 +42,11 @@ public class EventingPublisherPlugin implements ProcessEnginePlugin {
private static final Logger log = LoggerFactory.getLogger(EventingPublisherPlugin.class);

protected final Configuration configuration;
protected final ApplicationEventPublisher publisher;
protected final BpmnParseListener publishDelegateParseListener;
protected final HistoryEventHandler publishHistoryEventHandler;

public EventingPublisherPlugin(Configuration configuration, ApplicationEventPublisher publisher, BpmnParseListener publishDelegateParseListener, HistoryEventHandler publishHistoryEventHandler) {
public EventingPublisherPlugin(Configuration configuration, BpmnParseListener publishDelegateParseListener, HistoryEventHandler publishHistoryEventHandler) {
this.configuration = configuration;
this.publisher = publisher;
this.publishDelegateParseListener = publishDelegateParseListener;
this.publishHistoryEventHandler = publishHistoryEventHandler;
}
Expand Down
Expand Up @@ -25,19 +25,19 @@
// Implementation based on https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/ExecutionEvent.java
public class ExecutionEvent {

protected String activityInstanceId;
protected String businessKey;
protected String currentActivityId;
protected String currentActivityName;
protected String currentTransitionId;
protected String eventName;
protected String id;
protected String parentActivityInstanceId;
protected String parentId;
protected String processBusinessKey;
protected String processDefinitionId;
protected String processInstanceId;
protected String tenantId;
protected final String activityInstanceId;
protected final String businessKey;
protected final String currentActivityId;
protected final String currentActivityName;
protected final String currentTransitionId;
protected final String eventName;
protected final String id;
protected final String parentActivityInstanceId;
protected final String parentId;
protected final String processBusinessKey;
protected final String processDefinitionId;
protected final String processInstanceId;
protected final String tenantId;

public ExecutionEvent(DelegateExecution delegateExecution) {
this.activityInstanceId = delegateExecution.getActivityInstanceId();
Expand Down
Expand Up @@ -29,8 +29,6 @@
import org.camunda.bpm.engine.impl.task.TaskDefinition;
import org.camunda.bpm.engine.impl.util.xml.Element;
import org.camunda.bpm.engine.impl.variable.VariableDeclaration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Singleton;
import java.util.Arrays;
Expand Down
Expand Up @@ -26,25 +26,25 @@
// Implementation based on https://github.com/camunda/camunda-bpm-platform/blob/master/spring-boot-starter/starter/src/main/java/org/camunda/bpm/spring/boot/starter/event/TaskEvent.java
public class TaskEvent {

protected String assignee;
protected String caseDefinitionId;
protected String caseExecutionId;
protected String caseInstanceId;
protected Date createTime;
protected String deleteReason;
protected String description;
protected Date dueDate;
protected String eventName;
protected String executionId;
protected Date followUpDate;
protected String id;
protected String name;
protected String owner;
protected int priority;
protected String processDefinitionId;
protected String processInstanceId;
protected String taskDefinitionKey;
protected String tenantId;
protected final String assignee;
protected final String caseDefinitionId;
protected final String caseExecutionId;
protected final String caseInstanceId;
protected final Date createTime;
protected final String deleteReason;
protected final String description;
protected final Date dueDate;
protected final String eventName;
protected final String executionId;
protected final Date followUpDate;
protected final String id;
protected final String name;
protected final String owner;
protected final int priority;
protected final String processDefinitionId;
protected final String processInstanceId;
protected final String taskDefinitionKey;
protected final String tenantId;

public TaskEvent(DelegateTask delegateTask) {
this.assignee = delegateTask.getAssignee();
Expand Down
Expand Up @@ -31,7 +31,6 @@ import org.junit.jupiter.api.TestInstance
import javax.inject.Inject
import javax.inject.Singleton

@MicronautTest
class EventingPublisherPluginTest {

@MicronautTest
Expand Down Expand Up @@ -118,7 +117,7 @@ class EventingPublisherPluginTest {
@Singleton
open class EventListener : ApplicationEventListener<ExecutionEvent> {

var count = 0;
var count = 0

override fun onApplicationEvent(event: ExecutionEvent?) {
count++
Expand Down

0 comments on commit b95a8eb

Please sign in to comment.