SKYW-387-atualizar-biblioteca-java-nf-e-4.00.40#29
Merged
Conversation
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
lucvs07
approved these changes
Jul 11, 2025
There was a problem hiding this comment.
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
ambientein QR code methods represents the NF-e environment (tpAmb) and is often calledtpAmbin the specification. Renaming it totpAmbcould improve clarity and consistency with the NF-e standard.
public static String getCodeQRCodeContingenciaV3(String chave, String ambiente, String dhEmi, String valorNF,
danielrbrdan
approved these changes
Jul 14, 2025
joao-vertelo
approved these changes
Jul 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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