Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-2804

Module options are not trimmed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1 GA
    • Fix Version/s: 1.1.1, 1.2 M1
    • Component/s: Runtime
    • Labels:
      None
    • Story Points:
      1
    • Rank (Obsolete):
      9223372036854775807
    • Sprint:
      Sprint 45

      Description

      Spring XD 1.1 container will throw following exception:

      java.lang.IllegalStateException: Can't find class used for type of option 'myField': String 
      	at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.makeSimpleModuleOptions(DefaultModuleOptionsMetadataResolver.java:147)
      	at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolveNormalMetadata(DefaultModuleOptionsMetadataResolver.java:202)
      	at org.springframework.xd.module.options.DefaultModuleOptionsMetadataResolver.resolve(DefaultModuleOptionsMetadataResolver.java:164)
      	at org.springframework.xd.module.options.DelegatingModuleOptionsMetadataResolver.resolve(DelegatingModuleOptionsMetadataResolver.java:44)
      	at org.springframework.xd.module.options.EnvironmentAwareModuleOptionsMetadataResolver.resolve(EnvironmentAwareModuleOptionsMetadataResolver.java:127)
      	at org.springframework.xd.dirt.stream.XDStreamParser.parse(XDStreamParser.java:174)
      	at org.springframework.xd.dirt.stream.AbstractDeployer.save(AbstractDeployer.java:96)
      	...
      

      when module properties have a trailing whitespace character in type property (in example below there is a trailing space in options.myField.type value):

      options.myField.description = this is my field
      options.myField.type = String 
      

      Can the property values be trimmed before comparing to DefaultModuleOptionsMetadataResolver#SHORT_CLASSNAMES map to avoid this problem?

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kdowbecki Karol Dowbecki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: