null annotations - checkstyle (#13979)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
parent
df6454e374
commit
8b1d0fccef
@ -230,9 +230,6 @@ public enum BluetoothUnit {
|
|||||||
public static final Unit<ArealDensity> KILOGRAM_PER_SQUARE_METER = addUnit(
|
public static final Unit<ArealDensity> KILOGRAM_PER_SQUARE_METER = addUnit(
|
||||||
new ProductUnit<ArealDensity>(SIUnits.KILOGRAM.divide(SIUnits.SQUARE_METRE)));
|
new ProductUnit<ArealDensity>(SIUnits.KILOGRAM.divide(SIUnits.SQUARE_METRE)));
|
||||||
|
|
||||||
public static final Unit<RadiationExposure> COULOMB_PER_KILOGRAM = addUnit(
|
|
||||||
new ProductUnit<RadiationExposure>(Units.COULOMB.divide(SIUnits.KILOGRAM)));
|
|
||||||
|
|
||||||
public static final Unit<RadiationDoseAbsorptionRate> GRAY_PER_SECOND = addUnit(
|
public static final Unit<RadiationDoseAbsorptionRate> GRAY_PER_SECOND = addUnit(
|
||||||
new ProductUnit<RadiationDoseAbsorptionRate>(Units.GRAY.divide(Units.SECOND)));
|
new ProductUnit<RadiationDoseAbsorptionRate>(Units.GRAY.divide(Units.SECOND)));
|
||||||
|
|
||||||
|
|||||||
@ -108,10 +108,7 @@ public class CharacteristicChannelTypeProvider implements ChannelTypeProvider {
|
|||||||
if (channelID.charAt(30) != '-') {
|
if (channelID.charAt(30) != '-') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (channelID.charAt(67) != '-') {
|
return !(channelID.charAt(67) != '-');
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChannelTypeUID registerChannelType(String characteristicUUID, boolean advanced, boolean readOnly,
|
public ChannelTypeUID registerChannelType(String characteristicUUID, boolean advanced, boolean readOnly,
|
||||||
@ -135,7 +132,7 @@ public class CharacteristicChannelTypeProvider implements ChannelTypeProvider {
|
|||||||
throw new IllegalStateException("Unknown field format type: " + field.getUnit());
|
throw new IllegalStateException("Unknown field format type: " + field.getUnit());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemType.equals("Switch")) {
|
if ("Switch".equals(itemType)) {
|
||||||
options = Collections.emptyList();
|
options = Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -202,7 +202,7 @@ public class GenericBluetoothHandler extends ConnectedBluetoothHandler {
|
|||||||
.hasPropertyEnabled(BluetoothCharacteristic.PROPERTY_BROADCAST))
|
.hasPropertyEnabled(BluetoothCharacteristic.PROPERTY_BROADCAST))
|
||||||
.collect(Collectors.toUnmodifiableList());
|
.collect(Collectors.toUnmodifiableList());
|
||||||
|
|
||||||
if (broadcastCharacteristics.size() == 0) {
|
if (broadcastCharacteristics.isEmpty()) {
|
||||||
logger.info(
|
logger.info(
|
||||||
"No Characteristic of service with UUID {} on {} has the broadcast property set, ignored.",
|
"No Characteristic of service with UUID {} on {} has the broadcast property set, ignored.",
|
||||||
uuidStr, scanNotification.getAddress());
|
uuidStr, scanNotification.getAddress());
|
||||||
@ -298,7 +298,6 @@ public class GenericBluetoothHandler extends ConnectedBluetoothHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void handleCommand(ChannelUID channelUID, Command command) {
|
public void handleCommand(ChannelUID channelUID, Command command) {
|
||||||
|
|
||||||
// Handle REFRESH
|
// Handle REFRESH
|
||||||
if (command == RefreshType.REFRESH) {
|
if (command == RefreshType.REFRESH) {
|
||||||
if (canRead()) {
|
if (canRead()) {
|
||||||
|
|||||||
@ -12,12 +12,14 @@
|
|||||||
*/
|
*/
|
||||||
package org.openhab.binding.bluetooth.generic.internal;
|
package org.openhab.binding.bluetooth.generic.internal;
|
||||||
|
|
||||||
|
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Connor Petty - Initial contribution
|
* @author Connor Petty - Initial contribution
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@NonNullByDefault
|
||||||
class BluetoothUnitTest {
|
class BluetoothUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user