equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
74 domainName = ""; |
74 domainName = ""; |
75 endpoints.add(url); |
75 endpoints.add(url); |
76 } |
76 } |
77 |
77 |
78 LdapDnsProviderResult res = new LdapDnsProviderResult(domainName, endpoints); |
78 LdapDnsProviderResult res = new LdapDnsProviderResult(domainName, endpoints); |
79 if (res.getEndpoints().size() == 0 && res.getDomainName().isEmpty()) { |
79 if (res.getEndpoints().isEmpty() && res.getDomainName().isEmpty()) { |
80 return Optional.empty(); |
80 return Optional.empty(); |
81 } else { |
81 } else { |
82 return Optional.of(res); |
82 return Optional.of(res); |
83 } |
83 } |
84 } |
84 } |