• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wmixvideo / nfe / #9462

23 Jul 2026 08:39PM UTC coverage: 50.977% (-0.8%) from 51.794%
#9462

push

web-flow
Refatoração de chaves para suportar CNPJ alfanumérico (NT 2026.004) (#1181)

* Javadoc Warnings invalid input: '<' e '&' literais

* Javadoc Warnings invalid input: '<' e '&' literais

* Refatoração de chaves para suportar CNPJ alfanumérico (NT 2026.004)

* Normaliza char para maiusculo na chave

O cálculo do DV usa valores[i - 1] - '0'. Se a chave vier com letras minúsculas (o que é aceito por alguns validadores de CNPJ na base), o DV calculado muda (ex.: 'a' - '0' != 'A' - '0'), gerando falsos negativos/positivos. Normalize o caractere para maiúsculo antes de converter para o valor numérico.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Diego Fincatto <58352+fincatto@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

12 of 14 new or added lines in 9 files covered. (85.71%)

757 existing lines in 44 files now uncovered.

15132 of 29684 relevant lines covered (50.98%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/fincatto/documentofiscal/nfe400/classes/evento/epec/NFDestinatarioEpec.java
1
package com.fincatto.documentofiscal.nfe400.classes.evento.epec;
2

3
import com.fincatto.documentofiscal.validadores.DFStringValidador;
4
import org.simpleframework.xml.Element;
5

6

7
public class NFDestinatarioEpec {
×
8

9
        @Element(name = "UF", required = true)
10
        protected String ufDestinatario;
11

12
        @Element(name = "CNPJ", required = false)
13
        protected String cnpj;
14

15
        @Element(name = "CPF", required = false)
16
        protected String cpf;
17

18
        @Element(name = "idEstrangeiro", required = false)
19
        protected String idEstrangeiro;
20

21
        @Element(name = "IE", required = false)
22
        protected String inscricaoEstadualDestinatario;
23

24
        @Element(name = "vNF", required = true)
25
        protected String valorTotalNFe;
26

27
        @Element(name = "vICMS", required = true)
28
        protected String valorTotalIcms;
29

30
        @Element(name = "vST", required = true)
31
        protected String valorTotalIcmsSubstituicaoTributaria;
32

33
        public String getUfDestinatario() {
34
                return ufDestinatario;
×
35
        }
36

37
        public void setUfDestinatario(String ufDestinatario) {
38
                this.ufDestinatario = ufDestinatario;
×
39
        }
×
40

41
        public String getCnpj() {
42
                return cnpj;
×
43
        }
44

45
        public void setCnpj(String cnpj) {
46
        DFStringValidador.cnpj(cnpj);
×
47
        this.cnpj = cnpj;
×
UNCOV
48
        }
×
49

50
        public String getCpf() {
51
                return cpf;
×
52
        }
53

54
        public void setCpf(String cpf) {
UNCOV
55
        DFStringValidador.cpf(cpf);
×
UNCOV
56
        this.cpf = cpf;
×
UNCOV
57
        }
×
58

59
        public String getIdEstrangeiro() {
UNCOV
60
                return idEstrangeiro;
×
61
        }
62

63
        public void setIdEstrangeiro(String idEstrangeiro) {
UNCOV
64
                this.idEstrangeiro = idEstrangeiro;
×
UNCOV
65
        }
×
66

67
        public String getInscricaoEstadualDestinatario() {
UNCOV
68
                return inscricaoEstadualDestinatario;
×
69
        }
70

71
        public void setInscricaoEstadualDestinatario(String inscricaoEstadualDestinatario) {
UNCOV
72
                this.inscricaoEstadualDestinatario = inscricaoEstadualDestinatario;
×
UNCOV
73
        }
×
74

75
        public String getValorTotalNFe() {
UNCOV
76
                return valorTotalNFe;
×
77
        }
78

79
        public void setValorTotalNFe(String valorTotalNFe) {
UNCOV
80
                this.valorTotalNFe = valorTotalNFe;
×
UNCOV
81
        }
×
82

83
        public String getValorTotalIcms() {
UNCOV
84
                return valorTotalIcms;
×
85
        }
86

87
        public void setValorTotalIcms(String valorTotalIcms) {
UNCOV
88
                this.valorTotalIcms = valorTotalIcms;
×
UNCOV
89
        }
×
90

91
        public String getValorTotalIcmsSubstituicaoTributaria() {
UNCOV
92
                return valorTotalIcmsSubstituicaoTributaria;
×
93
        }
94

95
        public void setValorTotalIcmsSubstituicaoTributaria(String valorTotalIcmsSubstituicaoTributaria) {
UNCOV
96
                this.valorTotalIcmsSubstituicaoTributaria = valorTotalIcmsSubstituicaoTributaria;
×
UNCOV
97
        }
×
98

99
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc