@Override
public Complex requestNetworkComplexData(String pLocId) throws AAIServiceException {
Complex response = null;
- InputStream inputStream = null;
try {
AAIRequest request = AAIRequest.getRequestFromResource("complex");
} catch (Exception exc) {
LOG.warn("requestNetworkComplexData", exc);
throw new AAIServiceException(exc);
- } finally {
- if(inputStream != null){
- try {
- inputStream.close();
- } catch(Exception exc) {
-
- }
- }
}
return response;
}
@Override
public DvsSwitch requestDvsSwitchData(String vnf_id) throws AAIServiceException {
DvsSwitch response = null;
- InputStream inputStream = null;
try {
AAIRequest request = AAIRequest.getRequestFromResource("dvs-switch");
} catch (Exception exc) {
LOG.warn("requestDvsSwitchData", exc);
throw new AAIServiceException(exc);
- } finally {
- if(inputStream != null){
- try {
- inputStream.close();
- } catch(Exception exc) {
-
- }
- }
}
return response;
}
@Override
public L3Network requestL3NetworkQueryByName(String networkName) throws AAIServiceException {
L3Network response = null;
- InputStream inputStream = null;
try {
AAIRequest request = AAIRequest.getRequestFromResource("l3-network");
} catch (Exception exc) {
LOG.warn("requestL3NetworkQueryByName", exc);
throw new AAIServiceException(exc);
- } finally {
- if(inputStream != null){
- try {
- inputStream.close();
- } catch(Exception exc) {
-
- }
- }
}
return response;
}
while( ( line = reader.readLine() ) != null ) {
stringBuilder.append( line );
}
- LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder.length() > 0) ? stringBuilder.toString() :
+ "{no-data}");
return true;
} else {
ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
while( ( line = reader.readLine() ) != null ) {
stringBuilder.append( line );
}
- LOGwriteEndingTrace(responseCode, responseMessage, (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ LOGwriteEndingTrace(responseCode, responseMessage,
+ (stringBuilder.length() > 0) ? stringBuilder.toString() : "{no-data}");
return true;
} else {
StringBuilder stringBuilder = new StringBuilder();