Skip to content

Commit

Permalink
Remove org.jetbrains.annotations.NotNull (openhab#10334)
Browse files Browse the repository at this point in the history
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>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
  • Loading branch information
wborn authored and themillhousegroup committed May 10, 2021
1 parent a361cfc commit 192a745
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

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;
Expand Down Expand Up @@ -69,7 +68,6 @@ public List<BrowseResult> getPlaylists() throws IOException, ReadException {
return getBrowseResults(PLAYLISTS_SID);
}

@NotNull
private List<BrowseResult> getBrowseResults(String sourceIdentifier) throws IOException, ReadException {
HeosResponseObject<BrowseResult[]> response = browseSource(sourceIdentifier);
logger.debug("Response: {}", response);
Expand Down Expand Up @@ -353,7 +351,7 @@ public HeosResponseObject<Void> logIn(String name, String password) throws IOExc

/**
* Get all the players known by HEOS
*
*
* @return
*/
public HeosResponseObject<Player[]> getPlayers() throws IOException, ReadException {
Expand All @@ -362,7 +360,7 @@ public HeosResponseObject<Player[]> getPlayers() throws IOException, ReadExcepti

/**
* Get all the groups known by HEOS
*
*
* @return
*/
public HeosResponseObject<Group[]> getGroups() throws IOException, ReadException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 : "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
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;
Expand Down Expand Up @@ -56,7 +55,6 @@ public CompletableFuture<StatusDTO> queryStatus(String serialNumber, String ipAd
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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
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;
Expand Down Expand Up @@ -66,7 +65,6 @@ public CompletableFuture<SwitchResponseDTO> switchPort(String serialNumber, Stri
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()))
Expand Down

0 comments on commit 192a745

Please sign in to comment.