Commit 950907d3980f9602f8b10a53cf036f5e5698118b
1 parent
e86c0759
Refactoring according to comments from @YevhenBondarenko
Showing
5 changed files
with
3 additions
and
12 deletions
... | ... | @@ -15,13 +15,11 @@ |
15 | 15 | */ |
16 | 16 | package org.thingsboard.server.dao.device.provision; |
17 | 17 | |
18 | -import lombok.AllArgsConstructor; | |
19 | 18 | import lombok.Data; |
20 | 19 | import org.thingsboard.server.common.data.security.DeviceCredentials; |
21 | 20 | |
22 | 21 | @Data |
23 | -@AllArgsConstructor | |
24 | 22 | public class ProvisionResponse { |
25 | - private DeviceCredentials deviceCredentials; | |
26 | - private ProvisionResponseStatus responseStatus; | |
23 | + private final DeviceCredentials deviceCredentials; | |
24 | + private final ProvisionResponseStatus responseStatus; | |
27 | 25 | } | ... | ... |
... | ... | @@ -167,10 +167,6 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement |
167 | 167 | case PINGREQ: |
168 | 168 | ctx.writeAndFlush(new MqttMessage(new MqttFixedHeader(PINGRESP, false, AT_MOST_ONCE, false, 0))); |
169 | 169 | break; |
170 | -// case SUBSCRIBE: | |
171 | -// deviceSessionCtx.setDeviceInfo(TransportDeviceInfo); | |
172 | -// processSubscribe(ctx, (MqttSubscribeMessage) msg); | |
173 | -// break; | |
174 | 170 | case DISCONNECT: |
175 | 171 | ctx.close(); |
176 | 172 | break; | ... | ... |
... | ... | @@ -417,8 +417,7 @@ public class JsonConverter { |
417 | 417 | if (toGateway) { |
418 | 418 | result.addProperty("id", requestId); |
419 | 419 | } |
420 | - result.addProperty("deviceId", new DeviceId( | |
421 | - new UUID(payload.getDeviceCredentials().getDeviceIdMSB(), payload.getDeviceCredentials().getDeviceIdLSB())).toString()); | |
420 | + result.addProperty("deviceId", new UUID(payload.getDeviceCredentials().getDeviceIdMSB(), payload.getDeviceCredentials().getDeviceIdLSB()).toString()); | |
422 | 421 | result.addProperty("credentialsType", payload.getDeviceCredentials().getCredentialsType().name()); |
423 | 422 | result.addProperty("credentialsId", payload.getDeviceCredentials().getCredentialsId()); |
424 | 423 | result.addProperty("credentialsValue", | ... | ... |
... | ... | @@ -22,7 +22,6 @@ import org.thingsboard.server.common.data.page.PageData; |
22 | 22 | import org.thingsboard.server.common.data.page.PageLink; |
23 | 23 | import org.thingsboard.server.dao.Dao; |
24 | 24 | |
25 | -import java.util.Optional; | |
26 | 25 | import java.util.UUID; |
27 | 26 | |
28 | 27 | public interface DeviceProfileDao extends Dao<DeviceProfile> { | ... | ... |