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/geocodesclient/rs/GeocodesRest.java 106
fr/paris/lutece/plugins/geocodesclient/rs/GeocodesRest.java 324
    public Response getCityListByDate( @PathParam( Constants.VERSION ) Integer nVersion, @QueryParam( Constants.SEARCHED_STRING ) String strVal,
            @QueryParam( Constants.ADDITIONAL_PARAM ) String strDateRef )
    {
        if ( nVersion == VERSION_1 )
        {
            if ( strDateRef == null || strDateRef.isEmpty( ) )
            {
            	AppLogService.error( ERROR_DATE_RESOURCE );
	            return Response.status( Response.Status.NOT_FOUND )
	                    .entity( JsonUtil.buildJsonResponse( new ErrorJsonResponse( Response.Status.NOT_FOUND.name( ), ERROR_DATE_RESOURCE ) ) )
	                    .build( );
            }
        	final Date dateref;
            try
            {
                dateref = DEFAULT_DATEFORMAT.parse( strDateRef );
            }
            catch( final ParseException e )
            {
                AppLogService.error( e.getMessage( ) );
                return Response.status( Response.Status.BAD_REQUEST ).entity( e.getMessage( ) ).build( );
            }
            return getCityListByNameAndDateV1( strVal, dateref );
File Line
fr/paris/lutece/plugins/geocodesclient/rs/GeocodesRest.java 106
fr/paris/lutece/plugins/geocodesclient/rs/GeocodesRest.java 260
fr/paris/lutece/plugins/geocodesclient/rs/GeocodesRest.java 324
    public Response getCityListByDate( @PathParam( Constants.VERSION ) Integer nVersion, @QueryParam( Constants.SEARCHED_STRING ) String strVal,
            @QueryParam( Constants.ADDITIONAL_PARAM ) String strDateRef )
    {
        if ( nVersion == VERSION_1 )
        {
            if ( strDateRef == null || strDateRef.isEmpty( ) )
            {
            	AppLogService.error( ERROR_DATE_RESOURCE );
	            return Response.status( Response.Status.NOT_FOUND )
	                    .entity( JsonUtil.buildJsonResponse( new ErrorJsonResponse( Response.Status.NOT_FOUND.name( ), ERROR_DATE_RESOURCE ) ) )
	                    .build( );
            }
        	final Date dateref;
            try
            {
                dateref = DEFAULT_DATEFORMAT.parse( strDateRef );
            }
            catch( final ParseException e )
            {
                AppLogService.error( e.getMessage( ) );
                return Response.status( Response.Status.BAD_REQUEST ).entity( e.getMessage( ) ).build( );
            }
            return getCityListByNameAndDateV1( strVal, dateref );