Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-309

system properties are trim()'d and loose whitespace

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.Alpha17
    • None
    • Management
    • None
    • Hide

      package org.jboss.as.controller;

      public class SimpleAttributeDefinition extends AttributeDefinition {
      ...
      private ModelNode parse(final String value) throws OperationFailedException {
      final String trimmed = value == null ? null : value.trim();

      I can see how this could be fixed by checking on PROPERTY (or STRING?) before creating the node. If prop|string -> use "value", otherwise use "trimmed"

      I can do a pull request easily but can someone give me feedback first if this is a good idea ?

      Show
      package org.jboss.as.controller; public class SimpleAttributeDefinition extends AttributeDefinition { ... private ModelNode parse(final String value) throws OperationFailedException { final String trimmed = value == null ? null : value.trim(); I can see how this could be fixed by checking on PROPERTY (or STRING?) before creating the node. If prop|string -> use "value", otherwise use "trimmed" I can do a pull request easily but can someone give me feedback first if this is a good idea ?

    Description

      When a system property was defined as:
      /system-property=foo:add(value=" spaces ");

      it gets written with the correct spaces around it to the configuration file.
      When the configuration is read the value gets trimmed and the prefix/suffix of spaces is lost.

      Attachments

        Activity

          People

            ehugonne1@redhat.com Emmanuel Hugonnet
            tfonteyn Tom Fonteyne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: