LOG.info("Entered AAIService.ctor");
String runtime = System.getProperty("aaiclient.runtime");
- if(runtime != null && runtime.equals("OSGI")) {
+ if("OSGI".equals(runtime)) {
runtimeOSGI = true;
} else {
runtimeOSGI = false;
String extension = keystore_path.substring(keystore_path.lastIndexOf(".") + 1);
- if(extension != null && !extension.isEmpty() && extension.equalsIgnoreCase("JKS")) {
+ if("JKS".equalsIgnoreCase(extension)) {
storeType = "JKS";
}
KeyStore ks = KeyStore.getInstance(storeType);
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
try {
inputStream.close();
} catch(Exception exc) {
-
}
}
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
return response;
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
return response;
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(),
+ exc);
throw new AAIServiceException(exc);
}
return response;
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
return response;
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
return response;
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
return response;
}
/* DELETE */
+ @Override
public boolean dataChangeDeleteVServerData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
+ @Override
public boolean dataChangeDeleteCtagPoolData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
+ @Override
public boolean dataChangeDeleteVplsPeData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
+ @Override
public boolean dataChangeDeleteVpeData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
+ @Override
public boolean dataChangeDeleteDvsSwitchData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
//OAM-Network:
+ @Override
public boolean dataChangeDeleteOAMNetworkData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
//Availability-Zone:
+ @Override
public boolean dataChangeDeleteAvailabilityZoneData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
//Complex:
+ @Override
public boolean dataChangeDeleteComplexData(URL url) throws AAIServiceException {
if(url == null) {
throw new NullPointerException();
}
- return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ return deleteAAIEntity(url, Object.class.getClass().getEnclosingMethod()
+ .getName());
}
private boolean deleteAAIEntity(URL url, String caller) throws AAIServiceException {
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
}
} catch(AAIServiceException aaiexc) {
throw aaiexc;
} catch (Exception exc) {
- LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ LOG.warn(Object.class.getClass().getEnclosingMethod().getName(), exc);
throw new AAIServiceException(exc);
}
}
String requestId = UUID.randomUUID().toString();
try {
- con = getConfiguredConnection(requestUrl = request.getRequestQueryUrl(HttpMethod.GET), HttpMethod.GET);
+ requestUrl = request.getRequestQueryUrl(HttpMethod.GET);
+ con = getConfiguredConnection(requestUrl , HttpMethod.GET);
logMetricRequest(requestId, "GET "+requestUrl.getPath(), "", requestUrl.getPath());
// Check for errors
if(clazz == null)
return key;
- List<String> fieldAnnotatedNames = new LinkedList<String>();
+ List<String> fieldAnnotatedNames = new LinkedList<>();
Field[] fields = clazz.getDeclaredFields();
for(Field field : fields) {