Skip to content

TypeError: Cannot read properties of null (reading '0') #2765

@CsCherrYY

Description

@CsCherrYY

when opening spring-petclinic project with lombok dependency in the classpath, we can get this error in the console output:

rejected promise not handled within 1 second: TypeError: Cannot read properties of null (reading '0')
c:\Users\chenshi\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:94
stack trace: TypeError: Cannot read properties of null (reading '0')
	at E (c:\Users\chenshi\Documents\GitHub\vscode-java\dist\extension.js:2:727247)
	at Object.getLombokVersion (c:\Users\chenshi\Documents\GitHub\vscode-java\dist\extension.js:2:728652)
	at Object.initializeLombokStatusBar (c:\Users\chenshi\Documents\GitHub\vscode-java\dist\extension.js:2:767391)
	at Object.<anonymous> (c:\Users\chenshi\Documents\GitHub\vscode-java\dist\extension.js:2:729598)
	at Generator.next (<anonymous>)
	at o (c:\Users\chenshi\Documents\GitHub\vscode-java\dist\extension.js:2:725923)

looks like the null check is needed in function lombokPath2Version().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions