Remove org.jetbrains.annotations.NotNull (#10334)
Only Eclipse JDT annotations should be used, see: https://www.openhab.org/docs/developer/guidelines.html#null-annotations Signed-off-by: Wouter Born <github@maindrain.net>pull/10314/head
parent
a5a7070d71
commit
ee59803df8
|
@ -23,7 +23,6 @@ import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.openhab.binding.heos.internal.json.dto.HeosResponseObject;
|
import org.openhab.binding.heos.internal.json.dto.HeosResponseObject;
|
||||||
import org.openhab.binding.heos.internal.json.payload.BrowseResult;
|
import org.openhab.binding.heos.internal.json.payload.BrowseResult;
|
||||||
import org.openhab.binding.heos.internal.json.payload.Group;
|
import org.openhab.binding.heos.internal.json.payload.Group;
|
||||||
|
@ -69,7 +68,6 @@ public class HeosFacade {
|
||||||
return getBrowseResults(PLAYLISTS_SID);
|
return getBrowseResults(PLAYLISTS_SID);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private List<BrowseResult> getBrowseResults(String sourceIdentifier) throws IOException, ReadException {
|
private List<BrowseResult> getBrowseResults(String sourceIdentifier) throws IOException, ReadException {
|
||||||
HeosResponseObject<BrowseResult[]> response = browseSource(sourceIdentifier);
|
HeosResponseObject<BrowseResult[]> response = browseSource(sourceIdentifier);
|
||||||
logger.debug("Response: {}", response);
|
logger.debug("Response: {}", response);
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
*/
|
*/
|
||||||
package org.openhab.binding.miio.internal.cloud;
|
package org.openhab.binding.miio.internal.cloud;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import com.google.gson.annotations.Expose;
|
import com.google.gson.annotations.Expose;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
@ -64,23 +62,23 @@ public class CloudLoginDTO {
|
||||||
@Expose
|
@Expose
|
||||||
private Object captchaUrl;
|
private Object captchaUrl;
|
||||||
|
|
||||||
public @NotNull String getSsecurity() {
|
public String getSsecurity() {
|
||||||
return ssecurity != null ? ssecurity : "";
|
return ssecurity != null ? ssecurity : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull String getUserId() {
|
public String getUserId() {
|
||||||
return userId != null ? userId : "";
|
return userId != null ? userId : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull String getcUserId() {
|
public String getcUserId() {
|
||||||
return cUserId != null ? cUserId : "";
|
return cUserId != null ? cUserId : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull String getPassToken() {
|
public String getPassToken() {
|
||||||
return passToken != null ? passToken : "";
|
return passToken != null ? passToken : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull String getLocation() {
|
public String getLocation() {
|
||||||
return location != null ? location : "";
|
return location != null ? location : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.util.Objects;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.openhab.binding.revogi.internal.udp.UdpResponseDTO;
|
import org.openhab.binding.revogi.internal.udp.UdpResponseDTO;
|
||||||
import org.openhab.binding.revogi.internal.udp.UdpSenderService;
|
import org.openhab.binding.revogi.internal.udp.UdpSenderService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -56,7 +55,6 @@ public class StatusService {
|
||||||
return responses.thenApply(this::getStatus);
|
return responses.thenApply(this::getStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private StatusDTO getStatus(final List<UdpResponseDTO> singleResponse) {
|
private StatusDTO getStatus(final List<UdpResponseDTO> singleResponse) {
|
||||||
return singleResponse.stream()
|
return singleResponse.stream()
|
||||||
.filter(response -> !response.getAnswer().isEmpty() && response.getAnswer().contains(VERSION_STRING))
|
.filter(response -> !response.getAnswer().isEmpty() && response.getAnswer().contains(VERSION_STRING))
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.util.Objects;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.openhab.binding.revogi.internal.udp.UdpResponseDTO;
|
import org.openhab.binding.revogi.internal.udp.UdpResponseDTO;
|
||||||
import org.openhab.binding.revogi.internal.udp.UdpSenderService;
|
import org.openhab.binding.revogi.internal.udp.UdpSenderService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
@ -66,7 +65,6 @@ public class SwitchService {
|
||||||
return responses.thenApply(this::getSwitchResponse);
|
return responses.thenApply(this::getSwitchResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private SwitchResponseDTO getSwitchResponse(final List<UdpResponseDTO> singleResponse) {
|
private SwitchResponseDTO getSwitchResponse(final List<UdpResponseDTO> singleResponse) {
|
||||||
return singleResponse.stream().filter(response -> !response.getAnswer().isEmpty())
|
return singleResponse.stream().filter(response -> !response.getAnswer().isEmpty())
|
||||||
.map(response -> deserializeString(response.getAnswer()))
|
.map(response -> deserializeString(response.getAnswer()))
|
||||||
|
|
Loading…
Reference in New Issue