Skip to content

Bugfix/#87 lost interruption in action impl#88

Merged
DivineThreepwood merged 7 commits intodevfrom
bugfix/#87_lost_interruption_in_action_impl
Nov 29, 2022
Merged

Bugfix/#87 lost interruption in action impl#88
DivineThreepwood merged 7 commits intodevfrom
bugfix/#87_lost_interruption_in_action_impl

Conversation

@DivineThreepwood
Copy link
Member

📜 Description

Changes proposed in this pull request:

  • fix interruption handling by avoiding duplicate task cancelation.

}
}

override fun verifyCondition(

Check warning

Code scanning / detekt

One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand.

The function verifyCondition is too long (91). The maximum length is 60.
}
}

override fun verifyCondition(

Check warning

Code scanning / detekt

Prefer splitting up complex methods into smaller, easier to understand methods.

The function verifyCondition appears to be too complex (19). Defined complexity threshold for methods is set to '15'
)
)
}
} catch (ex: Exception) {

Check warning

Code scanning / detekt

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.

Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
private val targetState: STE,
private val serviceType: ServiceTemplateType.ServiceTemplate.ServiceType
) : AbstractTrigger() {
protected val LOGGER = LoggerFactory.getLogger(javaClass)

Check warning

Code scanning / detekt

Variable names should follow the naming convention set in the projects configuration.

Variable names should match the pattern: [a-z][A-Za-z0-9]*
import org.openbase.jul.pattern.controller.Remote
import org.openbase.jul.pattern.provider.DataProvider
import org.openbase.jul.pattern.trigger.AbstractTrigger
import org.openbase.type.domotic.state.*

Check warning

Code scanning / detekt

Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors.

org.openbase.type.domotic.state.* is a wildcard import. Replace it with fully qualified imports.
private val connectionRemote: ConnectionRemote
) : AbstractTrigger() {
private val locationObserver: Observer<DataProvider<LocationDataType.LocationData>, LocationDataType.LocationData>
private val connectionObserver: Observer<DataProvider<ConnectionDataType.ConnectionData>, ConnectionDataType.ConnectionData>

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style.

Line detected that is longer than the defined maximum line length in the code style.

private fun verifyCondition() {
try {
if (locationRemote.data.presenceState.value == PresenceStateType.PresenceState.State.PRESENT && connectionRemote.doorState.value == DoorStateType.DoorState.State.OPEN || connectionRemote.windowState.value == WindowStateType.WindowState.State.OPEN) {

Check warning

Code scanning / detekt

Line detected that is longer than the defined maximum line length in the code style.

Line detected that is longer than the defined maximum line length in the code style.
@DivineThreepwood DivineThreepwood added blocked PR is based on another PR and is therefore blocked until the other one has been merged. open issues PR has still open issues that have to be addressed. labels Nov 26, 2022
@lhuxohl lhuxohl removed the blocked PR is based on another PR and is therefore blocked until the other one has been merged. label Nov 29, 2022
@DivineThreepwood DivineThreepwood removed the open issues PR has still open issues that have to be addressed. label Nov 29, 2022
lhuxohl
lhuxohl previously approved these changes Nov 29, 2022
@DivineThreepwood DivineThreepwood merged commit be78dea into dev Nov 29, 2022
@DivineThreepwood DivineThreepwood deleted the bugfix/#87_lost_interruption_in_action_impl branch November 29, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants