CPD Results

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

Duplications

FileLine
info/magnolia/rest/service/property/v1/PropertyEndpoint.java150
info/magnolia/rest/service/property/v1/PropertyEndpoint.java211
            @PathParam("path") @DefaultValue("/") String path,
            @QueryParam("value") List<String> valueStrings,
            @QueryParam("type") @DefaultValue(PropertyType.TYPENAME_STRING) String typeString,
            @QueryParam("multiple") @DefaultValue("false") boolean multiple) throws RepositoryException {

        if (!multiple && valueStrings.size() != 1) {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }

        try {
            PropertyType.valueFromName(typeString);
        } catch (IllegalArgumentException e) {
            return Response.status(Response.Status.BAD_REQUEST).build();
        }

        final String absPath = StringUtils.defaultIfEmpty(path, "/");