Cleanup: restore the interrupt flag in email providers
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 85/100
Direção de pesquisa
Os achados sinalizados estão em src/main/java/com/seleniumboot/email/: MailhogProvider.java (linhas 54, 66), MailtrapProvider.java (66, 79) e OutlookProvider.java (82, 106, 139, 169). Comece lendo cada ponto listado e confirme se ele engole InterruptedException. Adicione Thread.currentThread().interrupt() em um bloco catch separado para InterruptedException, mantendo o tratamento atual. Está pronto quando esses pontos restauram a flag de interrupção, nada mais é alterado e mvn test passa.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Part of the cleanup cycle from #251. SonarCloud rule java:S2142 flags these spots.
These places catch InterruptedException (often inside catch (Exception e)) and carry on without restoring the thread's interrupt flag. Anything further up that checks Thread.interrupted() (a parallel runner shutting down, a timeout) never sees the interrupt.
Where (line numbers as of master 2a07bba):
src/main/java/com/seleniumboot/email/MailhogProvider.java: lines 54, 66src/main/java/com/seleniumboot/email/MailtrapProvider.java: lines 66, 79src/main/java/com/seleniumboot/email/OutlookProvider.java: lines 82, 106, 139, 169
Fix: restore the flag and keep the existing behaviour. For a combined catch, split it out:
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
// then the same handling the old catch did (log / wrap / return)
} catch (Exception e) {
...
}
Done when: the listed spots restore the interrupt flag, the behaviour is otherwise unchanged, and mvn test passes. Keep this PR to this package. SonarCloud reruns on the PR.
- Linguagem predominante
- Java
- Estrelas
- 12
- Forks
- 6
- Merge médio
- 10h
- PRs com merge (30d)
- 76
Preparar o ambiente
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de seleniumboot/selenium-boot
-
Cleanup: restore the interrupt flag in AiFailureAnalyzerTalvez já em andamento @Rishankgupta08 assumiu hoje. Abertagood first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
seleniumboot/selenium-boot#258 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Cleanup: restore the interrupt flag in the API client and health checkerTalvez já em andamento @Rishankgupta08 assumiu hoje. Abertagood first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
seleniumboot/selenium-boot#257 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
seleniumboot/selenium-boot#256 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 Meio dia Facilidade para iniciantes 42/100
seleniumboot/selenium-boot#259 ·
Mantenedores costumam responder em até 1 dia
-
SuggestionsAberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
seleniumboot/selenium-boot#251 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de seleniumboot/selenium-boot
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
dense-analysis/ale#5181 ·
-
bug subsystem:agent-harness triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
ShaftHQ/SHAFT_ENGINE#8043 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
johanhaleby/occurrent#1505 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
FasterXML/jackson-databind#6443 ·
Mantenedores costumam responder em até 1 dia