Recipe UseTextBlocks: Textblock not constructed AFTER it encounters a variable in a string.
Mantenedores costumam responder em até 1 dia
@kunli2 já está trabalhando nisso.
Desde 3/4/2023.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Was testing with the UseTextBlocks recipe. Wanted to use it for our SQL statements. Noticed that it works partially. Our SQL statement consists out of + variable or constant + . It appears that after encountering a variable a textblock is no longer created. Also reran mvn rewrite:run again just to see if it would be picked up in a second run. It doesn't. During the test the ONLY active recipe was UseTextBlocks
Question: Is there a minimum number of string concats needed before a textblock is used??
Gonna check all the converted files, should I find more 'interesting things' I can enter it here in this thread.
Before
int thisVariableStopsTextBlocks = 1;
String stringWithVariableInIt =
"This " +
"is " +
"text " +
"BEFORE the variable " +
thisVariableStopsTextBlocks +
"This " +
"is " +
"text " +
"AFTER the variable. " +
"As is visible a TextBlock is no longer constructed";
After org.openrewrite.java.migrate.lang.UseTextBlocks: {convertStringsWithoutNewlines=true}
int thisVariableStopsTextBlocks = 1;
String stringWithVariableInIt =
"""
This \
is \
text \
BEFORE the variable \
""" +
thisVariableStopsTextBlocks +
"This " +
"is " +
"text " +
"AFTER the variable. " +
"As is visible a TextBlock is no longer constructed";
- Linguagem predominante
- Java
- Estrelas
- 160
- Forks
- 133
- Merge médio
- 5h 51min
- PRs com merge (30d)
- 86
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
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 openrewrite/rewrite-migrate-java
-
good first issue
openrewrite/rewrite-migrate-java#1330 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 72/100
openrewrite/rewrite-migrate-java#1319 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
openrewrite/rewrite-migrate-java#1314 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
openrewrite/rewrite-migrate-java#1310 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
openrewrite/rewrite-migrate-java#1307 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de openrewrite/rewrite-migrate-java
Issues semelhantes
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixTalvez já em andamento @ItsDeadlyProgrammer assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
appsmithorg/appsmith#42471 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
code-maintenance
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
carlos-emr/carlos#5258 ·
Mantenedores costumam responder em até 1 dia