Remove redundant "transient" usages
This commit is contained in:
parent
1ec2450c78
commit
2c0001e5e0
@ -32,7 +32,7 @@ public class AdminSettings extends BaseData<AdminSettingsId> implements HasTenan
|
||||
@NoXss
|
||||
@Length(fieldName = "key")
|
||||
private String key;
|
||||
private transient JsonNode jsonValue;
|
||||
private JsonNode jsonValue;
|
||||
|
||||
public AdminSettings() {
|
||||
super();
|
||||
|
||||
@ -53,7 +53,7 @@ public abstract class BaseData<I extends UUIDBased> extends IdBased<I> implement
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = super.hashCode();
|
||||
result = prime * result + (int) (createdTime ^ (createdTime >>> 32));
|
||||
result = prime * result + Long.hashCode(createdTime);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ public class Dashboard extends DashboardInfo implements ExportableEntity<Dashboa
|
||||
|
||||
private static final long serialVersionUID = 872682138346187503L;
|
||||
|
||||
private transient JsonNode configuration;
|
||||
private JsonNode configuration;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@ -68,8 +68,8 @@ public class Dashboard extends DashboardInfo implements ExportableEntity<Dashboa
|
||||
}
|
||||
|
||||
@Schema(description = "JSON object with main configuration of the dashboard: layouts, widgets, aliases, etc. " +
|
||||
"The JSON structure of the dashboard configuration is quite complex. " +
|
||||
"The easiest way to learn it is to export existing dashboard to JSON."
|
||||
"The JSON structure of the dashboard configuration is quite complex. " +
|
||||
"The easiest way to learn it is to export existing dashboard to JSON."
|
||||
, implementation = com.fasterxml.jackson.databind.JsonNode.class)
|
||||
public JsonNode getConfiguration() {
|
||||
return configuration;
|
||||
|
||||
@ -15,20 +15,15 @@
|
||||
*/
|
||||
package org.thingsboard.server.common.data.settings;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.thingsboard.server.common.data.id.UserId;
|
||||
import org.thingsboard.server.common.data.validation.Length;
|
||||
import org.thingsboard.server.common.data.validation.NoXss;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import static org.thingsboard.server.common.data.BaseDataWithAdditionalInfo.getJson;
|
||||
import static org.thingsboard.server.common.data.BaseDataWithAdditionalInfo.setJson;
|
||||
|
||||
@Schema
|
||||
@Data
|
||||
public class UserSettings implements Serializable {
|
||||
@ -43,20 +38,9 @@ public class UserSettings implements Serializable {
|
||||
@Length(fieldName = "type", max = 50)
|
||||
private UserSettingsType type;
|
||||
|
||||
@Schema(description = "JSON object with user settings.",implementation = com.fasterxml.jackson.databind.JsonNode.class)
|
||||
@Schema(description = "JSON object with user settings.", implementation = com.fasterxml.jackson.databind.JsonNode.class)
|
||||
@NoXss
|
||||
@Length(fieldName = "settings", max = 100000)
|
||||
private transient JsonNode settings;
|
||||
private JsonNode settings;
|
||||
|
||||
@JsonIgnore
|
||||
@ToString.Exclude
|
||||
private byte[] settingsBytes;
|
||||
|
||||
public JsonNode getSettings() {
|
||||
return getJson(() -> settings, () -> settingsBytes);
|
||||
}
|
||||
|
||||
public void setSettings(JsonNode settings) {
|
||||
setJson(settings, json -> this.settings = json, bytes -> this.settingsBytes = bytes);
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,15 +21,17 @@ import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.thingsboard.server.common.data.id.WidgetTypeId;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WidgetType extends BaseWidgetType {
|
||||
|
||||
@Schema(description = "Complex JSON object that describes the widget type", accessMode = Schema.AccessMode.READ_ONLY)
|
||||
private transient JsonNode descriptor;
|
||||
private JsonNode descriptor;
|
||||
|
||||
public WidgetType() {
|
||||
super();
|
||||
|
||||
@ -26,7 +26,7 @@ import java.security.GeneralSecurityException;
|
||||
import java.security.KeyStore;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class KeystoreSslCredentials extends AbstractSslCredentials {
|
||||
|
||||
private String type;
|
||||
|
||||
@ -46,7 +46,7 @@ import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PemSslCredentials extends AbstractSslCredentials {
|
||||
|
||||
private static final String DEFAULT_KEY_ALIAS = "server";
|
||||
@ -72,7 +72,7 @@ public class PemSslCredentials extends AbstractSslCredentials {
|
||||
try (InputStream inStream = ResourceUtils.getInputStream(this, this.certFile)) {
|
||||
try (PEMParser pemParser = new PEMParser(new InputStreamReader(inStream))) {
|
||||
Object object;
|
||||
while((object = pemParser.readObject()) != null) {
|
||||
while ((object = pemParser.readObject()) != null) {
|
||||
if (object instanceof X509CertificateHolder) {
|
||||
X509Certificate x509Cert = certConverter.getCertificate((X509CertificateHolder) object);
|
||||
certificates.add(x509Cert);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user