minor code clean up

This commit is contained in:
Daniel Gultsch 2023-10-31 12:34:55 +01:00
parent f6482c5a87
commit 438a228fc3
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

@ -210,21 +210,19 @@ public class ServiceDiscoveryResult {
.append("<");
}
List<String> features = this.getFeatures();
final List<String> features = this.getFeatures();
Collections.sort(features);
for (String feature : features) {
for (final String feature : features) {
s.append(clean(feature)).append("<");
}
Collections.sort(forms, Comparator.comparing(Data::getFormType));
for (Data form : forms) {
for (final Data form : forms) {
s.append(clean(form.getFormType())).append("<");
List<Field> fields = form.getFields();
final List<Field> fields = form.getFields();
Collections.sort(
fields, Comparator.comparing(lhs -> Strings.nullToEmpty(lhs.getFieldName())));
for (Field field : fields) {
for (final Field field : fields) {
s.append(Strings.nullToEmpty(field.getFieldName())).append("<");
final List<String> values = field.getValues();
Collections.sort(values, Comparator.comparing(ServiceDiscoveryResult::blankNull));