Skip to content

Commit

Permalink
feat bug-excluir-cpf
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro-H108 committed Jun 7, 2024
1 parent 8d4be39 commit 0482938
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/br/ufpr/views/ManterCliente.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ public void actionPerformed(ActionEvent e) {
@Override
public void actionPerformed(ActionEvent e) {
String cpf = textFieldCPF.getText();

cpf = cpf.replaceAll("[^0-9]", "");

String finalCpf = cpf;

Sistema.getClientes().removeIf(cliente -> cliente.getCpf().equalsIgnoreCase(finalCpf));

Mensagens.sucesso(null, "CPF "+cpf+" removido\n");
Expand Down

0 comments on commit 0482938

Please sign in to comment.