Issue-ID: AAF-876
Change-Id: I5cf734a6bce2afb0d4e24456cb037bb2421d7f96
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
* org.onap.aaf
* ===========================================================================
* Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2018 IBM.
+ * Modifications Copyright (C) 2019 IBM.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ===========================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
trans.error().log("CMService var primary is null");
} else {
String fg = fqdns.get(i);
trans.error().log("CMService var primary is null");
} else {
String fg = fqdns.get(i);
- if (fg!=null && primary!=null && fg.equals(primary.getHostName())) {
- if (i != 0) {
+ if ((fg!=null && primary!=null && fg.equals(primary.getHostName()))&&(i != 0)) {
String tmp = fqdns.get(0);
fqdns.set(0, primary.getHostName());
fqdns.set(i, tmp);
String tmp = fqdns.get(0);
fqdns.set(0, primary.getHostName());
fqdns.set(i, tmp);