angular
무료Conventions for Angular applications
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for using Kotlin
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
!! operatorThe !! operator should be avoided in Kotlin as it can lead to NullPointerException at runtime. Instead, use safe calls (?.) or the let scope function to handle nullable values more gracefully.
?.) when possibleUsing the safe call operator (?.) is a good practice, but it should be used judiciously.
It makes no sense to use this operator when the value is guaranteed to be non-null, as it can lead to unnecessary null checks and reduce code readability.
var when possibleIn Kotlin, it is recommended to use val instead of var whenever possible. This helps to make the code more readable and maintainable, as it makes it clear that the value of a variable is not expected to change.
When using the delay function, it is recommended to use the overload that accepts a Duration parameter instead of a Long parameter. This makes the code more readable and easier to understand, as it clearly indicates the intended duration of the delay.
replace this:
delay(100)
with this:
delay(100.milliseconds)
Add import: import kotlin.time.Duration.Companion.milliseconds
Code does not need to be signed. The code signature used to have some value, but in current times, the commit already has a signature. Old code may contain signatures that look like this:
/**
* Created by joao on 28-4-16.
*/
They should all be removed, as they are not needed and add no value to the code.
When finding this:
.getForEntity("/tulips", String::class.java)
replace with:
.getForEntity<String>("/tulips")
CSVParser which is now deprecatedThis skill refers to the CSVParser from org.apache.commons.csv.*
Replace
val csvParser = CSVParser(reader, CSV_HEADER)
with
val csvParser = CSVParser.builder()
.setReader(reader)
.setFormat(CSV_HEADER).get()
Replace this
private val CSV_HEADER = DEFAULT
.withHeader(
"id",
"description",
"year",
"value",
"currency",
"type",
"diameterMM",
"internalDiameterMM",
"heightMM",
"widthMM"
)
with:
private val CSV_HEADER = CSVFormat.DEFAULT.builder()
.setHeader(
"id",
"description",
"year",
"value",
"currency",
"type",
"diameterMM",
"internalDiameterMM",
"heightMM",
"widthMM"
).get()
Due to Java conversions to Kotlin, some of them, due to their automatic nature, didn't consider the existence of data classes.
If Kotlin classes still use lombok for the builder pattern please convert them to data class.
jackson-module-kotlinPlease replace:
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
with
<dependency>
<groupId>tools.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
[ ] The code does not use the !! operator.
[ ] The code does not use the safe call operator (?.) when the value is guaranteed to be non-null.
[ ] The code uses val instead of var whenever possible.
[ ] The code uses the Duration overload when using the delay function.
[ ] The code does not contain any code signatures.
[ ] The code uses the kotlin extensions for parsing when using Kotlin code.
[ ] The code should not use the CSVParser constructuro directly
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Conventions for Angular applications
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for using annotations in all tests using Jupiter
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for docker
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for using in all JEE frameworks. These are common standards for CDI
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for using in all JVM languages
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Conventions for using Java
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.