CPD Results
The following document contains the results of PMD's CPD 7.2.0.
Duplications
File |
Project |
Line |
de/larssh/json/dom/values/JakartaJsonProcessingDomValue.java |
JSON DOM |
41 |
de/larssh/json/dom/values/JsonProcessingDomValue.java |
JSON DOM |
41 |
return new JsonDomObjectChildren<>(value.asJsonObject(), JakartaJsonProcessingDomValue::new);
}
return Collections::emptySet;
}
/**
* {@inheritDoc}
*/
@NonNull
@Override
public String getTextValue() {
final JsonValue value = getJsonElement();
return value.getValueType() == ValueType.STRING ? ((JsonString) value).getString() : value.toString();
}
/**
* {@inheritDoc}
*/
@NonNull
@Override
@SuppressFBWarnings(value = "WEM_WEAK_EXCEPTION_MESSAGING", justification = "there is no more information about valueType")
public JsonDomType getType() {
final ValueType valueType = getJsonElement().getValueType();
if (valueType == ValueType.ARRAY) {
return JsonDomType.ARRAY;
}
if (valueType == ValueType.FALSE || valueType == ValueType.TRUE) {
return JsonDomType.BOOLEAN;
}
if (valueType == ValueType.NULL) {
return JsonDomType.NULL;
}
if (valueType == ValueType.NUMBER) {
return JsonDomType.NUMBER;
}
if (valueType == ValueType.OBJECT) {
return JsonDomType.OBJECT;
}
if (valueType == ValueType.STRING) {
return JsonDomType.STRING;
}
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Unknown JSON node type.");
}
/**
* {@inheritDoc}
*/
@NonNull
@Override
public String toString() {
return getJsonElement().toString();
}
/**
* Wrapped JSON element
*
* @return wrapped JSON element
*/
@java.lang.SuppressWarnings("all")
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code")
@lombok.Generated
public JsonValue getJsonElement() {
return this.jsonElement;
}
@java.lang.SuppressWarnings("all")
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code")
@lombok.Generated
public JakartaJsonProcessingDomValue(final JsonValue jsonElement) { |
File |
Project |
Line |
de/larssh/json/dom/values/GsonDomValue.java |
JSON DOM |
122 |
de/larssh/json/dom/values/JacksonDomValue.java |
JSON DOM |
116 |
de/larssh/json/dom/values/JakartaJsonProcessingDomValue.java |
JSON DOM |
120 |
de/larssh/json/dom/values/JsonProcessingDomValue.java |
JSON DOM |
120 |
final GsonDomValue other = (GsonDomValue) o;
if (!other.canEqual((java.lang.Object) this)) return false;
final java.lang.Object this$jsonElement = this.getJsonElement();
final java.lang.Object other$jsonElement = other.getJsonElement();
if (this$jsonElement == null ? other$jsonElement != null : !this$jsonElement.equals(other$jsonElement)) return false;
return true;
}
@java.lang.SuppressWarnings("all")
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(justification = "generated code")
@lombok.Generated
protected boolean canEqual(@edu.umd.cs.findbugs.annotations.Nullable final java.lang.Object other) {
return other instanceof GsonDomValue; |