Skip to content

Commit 8b138cb

Browse files
committed
make field non nullable
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent d0e6fa5 commit 8b138cb

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

library/src/main/java/com/owncloud/android/lib/resources/assistant/v1/model/TaskTypes.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ data class TaskTypes(
1616

1717
data class TaskType(
1818
val id: String?,
19-
val name: String?,
19+
val name: String,
2020
val description: String?
2121
)
2222

@@ -26,7 +26,7 @@ fun TaskTypes.toV2(): List<TaskTypeData> =
2626
id = taskType.id,
2727
name = taskType.name,
2828
description = taskType.description,
29-
inputShape = null,
30-
outputShape = null
29+
inputShape = emptyMap(),
30+
outputShape = emptyMap()
3131
)
3232
}

library/src/main/java/com/owncloud/android/lib/resources/assistant/v2/GetTaskTypesRemoteOperationV2.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ class GetTaskTypesRemoteOperationV2 : OCSRemoteOperation<List<TaskTypeData>>() {
9595
val outputShape = taskType.outputShape
9696

9797
val hasOneTextInput =
98-
inputShape?.size == 1 &&
98+
inputShape.size == 1 &&
9999
inputShape.values.first().type == supportedTaskType
100100

101101
val hasOneTextOutput =
102-
outputShape?.size == 1 &&
102+
outputShape.size == 1 &&
103103
outputShape.values.first().type == supportedTaskType
104104

105105
return hasOneTextInput && hasOneTextOutput

library/src/main/java/com/owncloud/android/lib/resources/assistant/v2/model/TaskTypes.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ data class TaskTypes(
1414

1515
data class TaskTypeData(
1616
val id: String?,
17-
val name: String?,
17+
val name: String,
1818
val description: String?,
19-
val inputShape: Map<String, Shape>?,
20-
val outputShape: Map<String, Shape>?
19+
val inputShape: Map<String, Shape>,
20+
val outputShape: Map<String, Shape>
2121
)
2222

2323
data class Shape(
24-
val name: String?,
25-
val description: String?,
26-
val type: String?
24+
val name: String,
25+
val description: String,
26+
val type: String
2727
)

0 commit comments

Comments
 (0)