Skip to content

Conversation

@GlauberF
Copy link

@GlauberF GlauberF commented Jul 11, 2025

Descrição

Atualiza biblioteca com versão da comunidade, resolvendo problema de vulnerabilidade do ini4j, nova versão do QR code da NFC-e, e url da sefaz.

NOTA: Teve vários arquivos, pois entrou schema da nova reforma tributária.

PR Relacionadas

Link da tarefa no JIRA

https://asaasdev.atlassian.net/browse/SKYW-387

Serviços afetados

Prints do desenvolvimento

Samuel-Oliveira and others added 30 commits April 5, 2025 14:54
Tagging version 4.00.37 4.00.37
Tagging version 4.00.38 4.00.38
Tagging version 4.00.39 4.00.39
Nota Técnica 2025.001 - Ajustar assinatura QRCode Contingência
…-replace-ini4j-with-commons-configuration

Substituição da biblioteca org.ini4j por Apache Commons Configuration e correção de lookup de URLs
@GlauberF GlauberF changed the title Skyw 387 atualizar biblioteca java nf e SKYW-387-atualizar-biblioteca-java-nf-e-4.00.40 Jul 11, 2025
@danielrbrdan danielrbrdan requested a review from Copilot July 14, 2025 11:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the NFe library to the community version, fixes an INI4J vulnerability, updates the NFC-e QR code logic to v3, and adjusts SEFAZ URLs (including schema changes for the new tax reform).

  • Replaced INI4J parsing with a custom INI parser and updated WebServiceUtil logic
  • Added new XML tag extraction utility with XPath in XmlNfeUtil
  • Introduced QR code v3 support in NFCeUtil and updated related tests

Reviewed Changes

Copilot reviewed 67 out of 70 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/main/java/br/com/swconsultoria/nfe/util/WebServiceUtil.java Replaced ini4j with custom INI parser and refactored getUrl logic
src/main/java/br/com/swconsultoria/nfe/util/XmlNfeUtil.java Added getTag using XPath and upgraded objectToXml for new schema
src/main/java/br/com/swconsultoria/nfe/util/NFCeUtil.java Introduced QR Code v3 methods and signature utility
src/main/java/br/com/swconsultoria/nfe/util/XsdUtil.java Added temporary layoutReforma support and new QNames
src/main/resources/WebServicesNfe.ini Updated SEFAZ URLs and removed hard-coded CE WSDL entries
Comments suppressed due to low confidence (2)

src/main/java/br/com/swconsultoria/nfe/util/WebServiceUtil.java:36

  • The Javadoc for getIniValueIgnoreCase mentions a @param log that does not exist in the method signature—please remove or update the Javadoc to match the actual parameters.
     * @param targetKey  A chave alvo (geralmente esperada em lowercase, vinda de {@code ServicosEnum}, ou "Usar" em PascalCase)

src/main/java/br/com/swconsultoria/nfe/util/NFCeUtil.java:105

  • [nitpick] The parameter ambiente in QR code methods represents the NF-e environment (tpAmb) and is often called tpAmb in the specification. Renaming it to tpAmb could improve clarity and consistency with the NF-e standard.
    public static String getCodeQRCodeContingenciaV3(String chave, String ambiente, String dhEmi, String valorNF,

@GlauberF GlauberF merged commit fe0fc86 into release Jul 14, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants