* ONAP - SO
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
private List<VfModule> vfModules;
- public QueryVfModules() { super(); vfModules = new ArrayList<VfModule>(); }
+ public QueryVfModules() {
+ super();
+ vfModules = new ArrayList<>();
+ }
public QueryVfModules(List<VfModule> vlist) {
LOGGER.debug ("QueryVfModules:");
- vfModules = new ArrayList<VfModule>();
+ vfModules = new ArrayList<>();
for (VfModule o : vlist) {
LOGGER.debug ("-- o is a vfModules ----");
LOGGER.debug (o.toString());
@Override
public String toString () {
- StringBuffer buf = new StringBuffer();
+ StringBuilder buf = new StringBuilder();
boolean first = true;
int i = 1;
for (VfModule o : vfModules) {
buf.append(i+"\t");
- if (!first) buf.append("\n"); first = false;
+ if (!first) buf.append("\n");
+ first = false;
buf.append(o);
}
return buf.toString();
LOGGER.debug ("QueryVfModules jsonString: "+jsonString);
}
catch (Exception e) {
+ LOGGER.debug ("Exception:", e);
LOGGER.debug ("QueryVfModules jsonString exception:"+e.getMessage());
}
return jsonString;