diff --git a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/servicespanel/ServicesPanelCtrl.java b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/servicespanel/ServicesPanelCtrl.java index bc6a7ec..e356473 100644 --- a/src/main/java/eu/omp/irap/vespa/epntapclient/gui/servicespanel/ServicesPanelCtrl.java +++ b/src/main/java/eu/omp/irap/vespa/epntapclient/gui/servicespanel/ServicesPanelCtrl.java @@ -42,6 +42,9 @@ public class ServicesPanelCtrl extends VOTableController implements ServicesPane /** The position of the column displaying the services target URLs in the service table. */ private static final int SERVICE_URL_COLUMN_POSITION = 1; + /** The separator used between each services in the custom service text fields. */ + private static final String CUSTOM_SERVICES_SEPARATOR = ";"; + /** The view of the services panel. */ private ServicesPanelView view; @@ -68,6 +71,8 @@ public class ServicesPanelCtrl extends VOTableController implements ServicesPane */ public ServicesPanelCtrl(MainPanelListener listener) { this.listener = listener; + customTablesNames = new ArrayList<>(); + customServicesUrls = new ArrayList<>(); targetURL = Consts.DEFAULT_REGISTRY_URL; query = String.format(Queries.SELECT_ALL_TAP_SERVICES_WHERE_CORE, ServiceCore.EPNCORE); view = new ServicesPanelView(this); @@ -135,8 +140,8 @@ public class ServicesPanelCtrl extends VOTableController implements ServicesPane List servicesUrls = new ArrayList<>(); List tableNames = new ArrayList<>(); - servicesUrls.addAll(Arrays.asList(customServiceUrl.split(";"))); - tableNames.addAll(Arrays.asList(customTableName.split(";"))); + servicesUrls.addAll(Arrays.asList(customServiceUrl.split(CUSTOM_SERVICES_SEPARATOR))); + tableNames.addAll(Arrays.asList(customTableName.split(CUSTOM_SERVICES_SEPARATOR))); if (servicesUrls.size() == tableNames.size()) { // TODO: regex to check valid url / table name -- libgit2 0.21.2