Skip to content

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

Closed

Description

@ineffective

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.

Activity

  1. added this to the 4.8.0.RELEASE milestone on Sep 4, 2020
  2. martinlippert commented on Sep 4, 2020

    @martinlippert
    Member

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

  3. martinlippert commented on Sep 4, 2020

    @martinlippert
    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.

  4. ineffective commented on Sep 4, 2020

    @ineffective
    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.

  5. martinlippert commented on Sep 7, 2020

    @martinlippert
    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).

  6. martinlippert commented on Sep 7, 2020

    @martinlippert
    Member

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

  7. srjha commented on Sep 17, 2020

    @srjha

    Why is this closed, already ?

  8. martinlippert commented on Sep 17, 2020

    @martinlippert
    Member

    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.

  9. srjha commented on Sep 17, 2020

    @srjha

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions