]> git.basschouten.com Git - openhab-addons.git/commitdiff
Remove org.jetbrains.annotations.NotNull (#10334)
authorWouter Born <github@maindrain.net>
Sun, 14 Mar 2021 22:22:52 +0000 (23:22 +0100)
committerGitHub <noreply@github.com>
Sun, 14 Mar 2021 22:22:52 +0000 (23:22 +0100)
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>
bundles/org.openhab.binding.heos/src/main/java/org/openhab/binding/heos/internal/api/HeosFacade.java
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/cloud/CloudLoginDTO.java
bundles/org.openhab.binding.revogi/src/main/java/org/openhab/binding/revogi/internal/api/StatusService.java
bundles/org.openhab.binding.revogi/src/main/java/org/openhab/binding/revogi/internal/api/SwitchService.java

index 221783e907ccc002471e13b64ca3c8b25eb5a8ec..0aeecce3c3c8900c16a9c72e6cb55afcba92935b 100644 (file)
@@ -23,7 +23,6 @@ import java.util.List;
 
 import org.eclipse.jdt.annotation.NonNullByDefault;
 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.payload.BrowseResult;
 import org.openhab.binding.heos.internal.json.payload.Group;
@@ -69,7 +68,6 @@ public class HeosFacade {
         return getBrowseResults(PLAYLISTS_SID);
     }
 
-    @NotNull
     private List<BrowseResult> getBrowseResults(String sourceIdentifier) throws IOException, ReadException {
         HeosResponseObject<BrowseResult[]> response = browseSource(sourceIdentifier);
         logger.debug("Response: {}", response);
@@ -353,7 +351,7 @@ public class HeosFacade {
 
     /**
      * Get all the players known by HEOS
-     * 
+     *
      * @return
      */
     public HeosResponseObject<Player[]> getPlayers() throws IOException, ReadException {
@@ -362,7 +360,7 @@ public class HeosFacade {
 
     /**
      * Get all the groups known by HEOS
-     * 
+     *
      * @return
      */
     public HeosResponseObject<Group[]> getGroups() throws IOException, ReadException {
index 859e78eb9bf17f0b6373396fed21bd468f262bf6..712a533a5a0f424cb07df12aee0135432ea3dcd3 100644 (file)
@@ -12,8 +12,6 @@
  */
 package org.openhab.binding.miio.internal.cloud;
 
-import org.jetbrains.annotations.NotNull;
-
 import com.google.gson.annotations.Expose;
 import com.google.gson.annotations.SerializedName;
 
@@ -64,23 +62,23 @@ public class CloudLoginDTO {
     @Expose
     private Object captchaUrl;
 
-    public @NotNull String getSsecurity() {
+    public String getSsecurity() {
         return ssecurity != null ? ssecurity : "";
     }
 
-    public @NotNull String getUserId() {
+    public String getUserId() {
         return userId != null ? userId : "";
     }
 
-    public @NotNull String getcUserId() {
+    public String getcUserId() {
         return cUserId != null ? cUserId : "";
     }
 
-    public @NotNull String getPassToken() {
+    public String getPassToken() {
         return passToken != null ? passToken : "";
     }
 
-    public @NotNull String getLocation() {
+    public String getLocation() {
         return location != null ? location : "";
     }
 
index ffb61d589a5814936589cacf2e89fb8ac27fbffd..5ecc29d2668180ac8fa0caf4089c51656f3d565e 100644 (file)
@@ -17,7 +17,6 @@ import java.util.Objects;
 import java.util.concurrent.CompletableFuture;
 
 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.UdpSenderService;
 import org.slf4j.Logger;
@@ -56,7 +55,6 @@ public class StatusService {
         return responses.thenApply(this::getStatus);
     }
 
-    @NotNull
     private StatusDTO getStatus(final List<UdpResponseDTO> singleResponse) {
         return singleResponse.stream()
                 .filter(response -> !response.getAnswer().isEmpty() && response.getAnswer().contains(VERSION_STRING))
index 042bfeccba8ebb59b7870ee3e7c5d376ec14ff29..2f7ac6817b634493581d11a25b8f77393cb6551b 100644 (file)
@@ -17,7 +17,6 @@ import java.util.Objects;
 import java.util.concurrent.CompletableFuture;
 
 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.UdpSenderService;
 import org.slf4j.Logger;
@@ -66,7 +65,6 @@ public class SwitchService {
         return responses.thenApply(this::getSwitchResponse);
     }
 
-    @NotNull
     private SwitchResponseDTO getSwitchResponse(final List<UdpResponseDTO> singleResponse) {
         return singleResponse.stream().filter(response -> !response.getAnswer().isEmpty())
                 .map(response -> deserializeString(response.getAnswer()))