Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eclips shows error on @ConditionalOnExpression("${downlink.active:false}") #529

Closed
ineffective opened this issue Sep 4, 2020 · 8 comments
Milestone

Comments

@ineffective
Copy link

Hello,

I'm using Eclipse 2020-06 with spring-boot plugin (I also reported bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=566445 and installed fixed version) and I got the following error on aforementioned line:

    @ConditionalOnExpression("${downlink.active:false}")

The error is:

Description	Resource	Path	Location	Type
EL1041E: After parsing a valid expression, there is still more data in the expression: 'lcurly({)'	ModuleUplinkConfiguration.java	/xxx/src/main/java/xx/xxxxxxxxxxxx/xxxxxx/uplink	line 87	Language Servers

I believe that this line is ok - mainly because it does what it is supposed to do - and that error shouldn't be there.

More details of installation:

  Spring Boot Language Server Feature	4.7.2.202009020949	org.springframework.tooling.boot.ls.feature.feature.group	Pivotal, Inc.
  Spring IDE Boot Microservices Dash	3.9.14.202009020636-CI-B2667	org.springframework.ide.eclipse.boot.dash.feature.feature.group	Spring IDE Developers

If anything else is required, please let me know.

@martinlippert martinlippert added this to the 4.8.0.RELEASE milestone Sep 4, 2020
@martinlippert
Copy link
Member

Thanks for reporting this, I can reproduce the described issue - will take a look at this for the upcoming 4.8.0 release.

@martinlippert
Copy link
Member

You can disable the validation completely in the preferences: Preferences -> Language Servers -> Spring Language Servers -> Spring Boot Language Server -> Spring Boot Java. There is a checkbox to enable/disable the SpEL expression validation.

@ineffective
Copy link
Author

Thank you. I'd rather not disable it, as I will most certainly forget to enable it again after it is fixed :) This is not a big issue so I will patiently wait for the fix. Thanks again.

@martinlippert
Copy link
Member

SpEL expressions are not ignore for validation when they contain property placeholders.

In a running Spring application, those placeholders are replaced with their values before the SpEL expression is parsed and evaluated. Therefore those placeholders can basically contain anything and could even be used to turn an invalid expression into a valid one based on the actual value that is used. This makes it very complicated to validate those expressions statically. Therefore those expressions are ignored for now when the validation happens.

This fix will be part of the STS 4.8.0 release (scheduled for late September).

@martinlippert
Copy link
Member

Thanks again for reporting this - which potentially affects many of our users.

@srjha
Copy link

srjha commented Sep 17, 2020

Why is this closed, already ?

@martinlippert
Copy link
Member

martinlippert commented Sep 17, 2020

Why is this closed, already ?

Fix got committed (then the issue is closed) and fix got released as part of the 4.8.0 release.

@srjha
Copy link

srjha commented Sep 17, 2020

Alright, I can see that. Thanks!

No issue after I updated STS
Version: 4.8.0.RELEASE
Build Id: 202009151856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants