diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-05-18 15:51:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 15:51:13 +0200 |
| commit | 02776c958a3254735b2be7d9fb1627f75e7f80cd (patch) | |
| tree | 155d96b0f1a5173e4ac884ac6c9cbccea011918f /opendc-simulator/opendc-simulator-resources | |
| parent | 1ce710ebaa8b071a3b30447d431f4af422f25156 (diff) | |
| parent | 7cbb401a0939cc58daae8b481a97f4b05140ec3b (diff) | |
build: Add support for Java 16
This pull request adds support for building OpenDC using Java 16.
To make this possible, we have upgraded the following dependencies:
- Kotlin from 1.4.3 to 1.5.0
- Jacoco from 0.8.6 to 0.8.7
- Gradle from 7.0 to 7.0.2
Diffstat (limited to 'opendc-simulator/opendc-simulator-resources')
| -rw-r--r-- | opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt b/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt index 6ae04f27..653b53e0 100644 --- a/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt +++ b/opendc-simulator/opendc-simulator-resources/src/main/kotlin/org/opendc/simulator/resources/SimAbstractResourceAggregator.kt @@ -82,7 +82,7 @@ public abstract class SimAbstractResourceAggregator(private val scheduler: SimRe return if (_remainingWorkFlush < now) { _remainingWorkFlush = now - _inputConsumers.sumByDouble { it._ctx?.remainingWork ?: 0.0 }.also { _remainingWork = it } + _inputConsumers.sumOf { it._ctx?.remainingWork ?: 0.0 }.also { _remainingWork = it } } else { _remainingWork } @@ -132,7 +132,7 @@ public abstract class SimAbstractResourceAggregator(private val scheduler: SimRe private fun updateCapacity() { // Adjust capacity of output resource - context.capacity = _inputConsumers.sumByDouble { it._ctx?.capacity ?: 0.0 } + context.capacity = _inputConsumers.sumOf { it._ctx?.capacity ?: 0.0 } } /* Input */ |
