Skip to content

Commit

Permalink
Issue #720
Browse files Browse the repository at this point in the history
Corretto errore lettura label ACL e Versioni.
  • Loading branch information
pintorig committed Jul 16, 2024
1 parent 748e280 commit d7b3db2
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,20 @@
import java.util.ArrayList;
import java.util.List;

import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.UriInfo;

import org.openspcoop2.utils.UtilsException;
import org.openspcoop2.utils.json.JSONUtils;
import org.openspcoop2.utils.service.context.ContextThreadLocal;
import org.slf4j.Logger;
import org.springframework.security.core.Authentication;

import com.fasterxml.jackson.databind.node.ArrayNode;

import it.govpay.backoffice.v1.beans.AclPost.ServizioEnum;
import it.govpay.backoffice.v1.beans.Connector.VersioneApiEnum;
import it.govpay.core.exceptions.IOException;
import it.govpay.core.exceptions.NotAuthorizedException;
import it.govpay.core.utils.rawutils.ConverterUtils;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.UriInfo;



Expand Down Expand Up @@ -129,12 +127,11 @@ public Response findEnumerazioniVersioneConnettore(Authentication user, UriInfo
* @throws UtilsException
*/
private String toJsonArray(List<String> results) throws UtilsException {
ArrayNode newArrayNode = JSONUtils.getInstance().newArrayNode();
for(String str: results) {
newArrayNode.add(str);
try {
return ConverterUtils.toJSON(results);
} catch (IOException e) {
throw new UtilsException(e);
}

return JSONUtils.getInstance().toString(newArrayNode);
}
}

Expand Down

0 comments on commit d7b3db2

Please sign in to comment.