reduce code smells
This commit is contained in:
@@ -219,7 +219,7 @@ public class CfDnsClient extends CfBasicHttpClient {
|
||||
|
||||
/**
|
||||
* Retrieves DNS records for the specified second-level domain (SLD) within a zone.
|
||||
* Optionally filters by one or more DNS getRecord types.
|
||||
* Optionally, filters by one or more DNS getRecord types.
|
||||
*
|
||||
* @param zone The zone entity containing information about the domain zone.
|
||||
* @param sld The second-level domain (SLD) for which to retrieve DNS records.
|
||||
@@ -446,8 +446,7 @@ public class CfDnsClient extends CfBasicHttpClient {
|
||||
if (types != null && types.length > 0) {
|
||||
Set<RecordType> allowedTypes = new HashSet<>(Arrays.asList(types));
|
||||
filtered = recs.stream()
|
||||
.filter(rec -> allowedTypes.contains(RecordType.valueOf(rec.getType())))
|
||||
.collect(Collectors.toList());
|
||||
.filter(rec -> allowedTypes.contains(RecordType.valueOf(rec.getType()))).toList();
|
||||
} else {
|
||||
filtered = new ArrayList<>(recs);
|
||||
}
|
||||
|
||||
@@ -22,19 +22,6 @@ public class CfDnsClientBuilder {
|
||||
@Nullable
|
||||
private String baseUrl;
|
||||
|
||||
/**
|
||||
* Constructs a new instance of `CfDnsClientBuilder`.
|
||||
*
|
||||
* <p>This class serves as a builder for creating and configuring instances of a CfDnsClient. It provides
|
||||
* a fluent API to set various optional configurations, such as API authentication methods and base
|
||||
* URL, before constructing the client.
|
||||
*
|
||||
* <p>By using this constructor, you can initiate the building process with default settings, which can
|
||||
* later be overridden using the provided builder methods.
|
||||
*/
|
||||
public CfDnsClientBuilder() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures whether an exception should be thrown when an empty result is encountered
|
||||
* during operations performed by the `CfDnsClient`.
|
||||
|
||||
Reference in New Issue
Block a user