Fork me on GitHub

CPD Results

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

Duplications

File Line
fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java 353
fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java 680
        final String customerId = request.getParameter( Constants.PARAM_ID_CUSTOMER );
        final IdentityDto qualifiedIdentity;
        try
        {
            final IdentitySearchResponse getResponse = _identityService.getIdentity( customerId, _currentClientCode, getAuthor( ) );
            logAndDisplayStatusErrorMessage( getResponse );
            if ( getResponse.getIdentities( ).size( ) != 1 )
            {
                return getSearchIdentities( request );
            }
            qualifiedIdentity = getResponse.getIdentities( ).get( 0 );
        }
        catch( final IdentityStoreException e )
        {
            AppLogService.error( "Error while retrieving selected identity [customerId = " + customerId + "].", e );
            addError( MESSAGE_GET_IDENTITY_ERROR, getLocale( ) );
            return getSearchIdentities( request );
        }

        final LocalIdentityDto dto = IdentityDeskService.instance().toLocalIdentityDto( qualifiedIdentity, _serviceContract, this.getAuthor( ) );
File Line
fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java 892
fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java 953
                    if ( attrKey.equals( Constants.PARAM_BIRTH_DATE ) && value != null && !value.isEmpty( ) )
                    {
                        try
                        {
                            Date date = new SimpleDateFormat( "yyyy-MM-dd" ).parse( value );
                            value = new SimpleDateFormat( "dd/MM/yyyy" ).format( date );
                        }
                        catch( ParseException e )
                        {
                            AppLogService.error( "Can't convert the date: " + value, e );
                        }
                    }
                    if ( value != null )
                    {
                        return new SearchAttribute( attrKey, value.trim( ),
                                ( _searchAttributeKeyStrictList.contains( attrKey ) || strictSearch ? AttributeTreatmentType.STRICT
                                        : AttributeTreatmentType.APPROXIMATED ) );
                    }
                    return null;
                } ).filter( searchAttribute -> searchAttribute != null && StringUtils.isNotBlank( searchAttribute.getValue( ) ) )