The internalVariable is assigned as part of its declaration, does not have any annotations (like @Autowired, etc.), and works fine when I remove the @Transactional annotation and the requirement for Spring to proxy the class. Why is this variable null when Spring is proxying/subclassing my se...
Note: It is a good practice to avoid using global variables because the value of a global variable can change in different areas of the program. This can lead to unknown results. Use Variables Without Declaration In JavaScript, a variable can also be used without declaring it. If a variable...
2 changes: 1 addition & 1 deletion 2 src/main/kotlin/cc/unitmesh/cf/domains/frontend/FEDomainDecl.kt Original file line numberDiff line numberDiff line change @@ -2,7 +2,7 @@ package cc.unitmesh.cf.domains.frontend import cc.unitmesh.cf.core.process.DomainDeclaration import cc.unitmes...
Describe the bug I have simple controller in Kotlin @Operation(summary = "Get company details", description = "Get company details") fun getCompanyDetails(@PathVariable companyId: Long): ResponseEntity<CompanyDTO> { val company = company...
If you decompile bytecodes of a class, you’ll realize that a field (or instance variable) is initialized in a class constructor. So even if you initialize a field with its declaration, the compiler would move its initialization code to the constructor. Also, all the code in the instance...
new, more strict, version ofomit_local_variable_typeswill flag a declaration, because few developers have actually declared the type in that case. So the changes that are actually breaking are also the ones that may be questionable, in which case the type might not be so obvious after all....
2 changes: 1 addition & 1 deletion 2 app/src/main/kotlin/com/neko/v2ray/util/fmt/Hysteria2Fmt.kt Original file line numberDiff line numberDiff line change @@ -15,7 +15,7 @@ import java.net.URI object Hysteria2Fmt : FmtBase() { fun parse(str: String): ServerConfig { var allow...
The issue here is that the name of the variable is in scope in its own declaration. It's actually in scope for the entire block, you'll also get an error for: String name() => "name"; main() { var somethingElse = name(); var name = "other"; } because the later name declara...