Fork me on GitHub

CPD Results

The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
fr/paris/lutece/plugins/directory/modules/rest/service/formatters/RecordFormatterJson.java 400
fr/paris/lutece/plugins/directory/modules/rest/service/formatters/RecordFormatterXml.java 402
    private void formatResourceInfo( JSONObject jsonObject, Record record )
    {
        Directory directory = _directoryRestService.getDirectory( record.getDirectory(  ).getIdDirectory(  ) );
        Map<String, String> mapParams = new HashMap<String, String>(  );
        mapParams.put( DirectoryRestConstants.PARAMETER_ID_RESOURCE, Integer.toString( record.getIdRecord(  ) ) );
        mapParams.put( DirectoryRestConstants.PARAMETER_RESOURCE_TYPE, Record.WORKFLOW_RESOURCE_TYPE );
        mapParams.put( DirectoryRestConstants.PARAMETER_ID_WORKFLOW, Integer.toString( directory.getIdWorkflow(  ) ) );

        List<IResourceInfo> listResourceInfos = ResourceInfoManager.getResourceInfo( mapParams );

        if ( ( listResourceInfos != null ) && !listResourceInfos.isEmpty(  ) )
        {
            for ( IResourceInfo resourceInfo : listResourceInfos )
            {
                formatResourceInfo( jsonObject, resourceInfo );