Skip to content

Commit e0fab54

Browse files
committed
Remove redundant nullable return type
1 parent b1f36a2 commit e0fab54

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/main/kotlin/com/coder/gateway/CoderGatewayMainView.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class CoderGatewayMainView : GatewayConnector {
2525
return CoderGatewayBundle.message("gateway.connector.action.text")
2626
}
2727

28-
override fun getDescription(): String? {
28+
override fun getDescription(): String {
2929
return CoderGatewayBundle.message("gateway.connector.description")
3030
}
3131

32-
override fun getDocumentationLink(): ActionLink? {
32+
override fun getDocumentationLink(): ActionLink {
3333
return BrowserLink(null, "Learn more about Coder Workspaces", null, "https://coder.com/docs/coder/latest/workspaces")
3434
}
3535

36-
override fun getRecentConnections(setContentCallback: (Component) -> Unit): GatewayRecentConnections? {
36+
override fun getRecentConnections(setContentCallback: (Component) -> Unit): GatewayRecentConnections {
3737
return CoderGatewayRecentWorkspaceConnectionsView()
3838
}
3939

src/main/kotlin/com/coder/gateway/sdk/CoderRestClientService.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CoderRestClientService {
3333
* This must be called before anything else. It will authenticate with coder and retrieve a session token
3434
* @throws [AuthenticationException] if authentication failed
3535
*/
36-
fun initClientSession(url: URL, token: String): User? {
36+
fun initClientSession(url: URL, token: String): User {
3737
val cookieUrl = url.toHttpUrlOrNull()!!
3838
val cookieJar = JavaNetCookieJar(CookieManager()).apply {
3939
saveFromResponse(

src/main/kotlin/com/coder/gateway/sdk/convertors/InstantConverter.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class InstantConverter : JsonSerializer<Instant?>, JsonDeserializer<Instant?> {
3232
* @param typeOfSrc the actual type (fully genericized version) of the source object.
3333
* @return a JsonElement corresponding to the specified object.
3434
*/
35-
override fun serialize(src: Instant?, typeOfSrc: Type?, context: JsonSerializationContext?): JsonElement? {
35+
override fun serialize(src: Instant?, typeOfSrc: Type?, context: JsonSerializationContext?): JsonElement {
3636
return JsonPrimitive(FORMATTER.format(src))
3737
}
3838

0 commit comments

Comments
 (0)