CPD Results
The following document contains the results of PMD's CPD 6.13.0.
Duplications
File |
Line |
fr/paris/lutece/plugins/vault/business/ApplicationDAO.java |
211 |
fr/paris/lutece/plugins/vault/business/EnvironnementDAO.java |
193 |
List<Application> applicationList = new ArrayList<>( );
StringBuilder builder = new StringBuilder( );
if ( !listIds.isEmpty( ) )
{
for ( int i = 0; i < listIds.size( ); i++ )
{
builder.append( "?," );
}
String placeHolders = builder.deleteCharAt( builder.length( ) - 1 ).toString( );
String stmt = SQL_QUERY_SELECTALL_BY_IDS + placeHolders + ")";
try ( DAOUtil daoUtil = new DAOUtil( stmt, plugin ) )
{
int index = 1;
for ( Integer n : listIds )
{
daoUtil.setInt( index++, n );
}
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{ |
File |
Line |
fr/paris/lutece/plugins/vault/rs/VaultAPI.java |
68 |
fr/paris/lutece/plugins/vault/rs/VaultAPI.java |
143 |
HttpPost httpPost = new HttpPost(strUrl);
httpPost.setHeader("X-Vault-Token", AppPropertiesService.getProperty( "vault.rootToken" ));
httpPost.setHeader(HttpHeaders.ACCEPT, "application/json");
httpPost.setHeader(HttpHeaders.CONTENT_TYPE, "application/json");
httpPost.setEntity(new StringEntity(json.toString()));
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = httpClient.execute(httpPost);
HttpEntity httpEntity = response.getEntity();
if (httpEntity!=null) {
String responseString = EntityUtils.toString(httpEntity);
AppLogService.info("Vault removing token status : " + responseString);
}
response.close();
httpClient.close();
}
catch( Exception e )
{
AppLogService.error( "Error creating policy", e ); |