You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by hi...@jakarta.apache.org on 2004/07/28 09:25:40 UTC

[jira] Created: (HIVEMIND-29) Contribution of whitespaces are ignored

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: Contribution of whitespaces are ignored
       Type: Bug

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Wed, 28 Jul 2004 12:25 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-29) Contribution of whitespaces are ignored

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Michael Frericks
    Created: Wed, 28 Jul 2004 7:29 AM
       Body:
I found the location where empty- or whitespace-strings 
are translated to null.


SmartTranslator:

    public Object translate(
        Module contributingModule,
        Class propertyType,
        String inputValue,
        Location location)
    {
        if (HiveMind.isBlank(inputValue))
        {
            if (_default == null)
                return null;

            inputValue = _default;
        }

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-29?page=comments#action_36910

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: Contribution of whitespaces are ignored
       Type: Bug

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Wed, 28 Jul 2004 7:29 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-29) SmartTranslator should differentiate between blank strings and null input

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Steve Gibson
    Created: Tue, 10 Aug 2004 6:07 AM
       Body:
I think that if no default is supplied, the current behavior is probably expected (especially for ant users). " " and "" though, are not expected  behavior. I wonder if anybody has an application where they would want an empty string to map to undefined symbol rather than empty string?

Reminds me of all the nasty servlet programming I used to do before tapestry. Check if the string is null, or the length is zero. Something doesn't work properly - oh yeah, that guy forgot to check for empty string.

If there is a need for mapping empty string to null, maybe that could be another parameter to SmartTranslator?
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-29?page=comments#action_37140

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: SmartTranslator should differentiate between blank strings and null input
       Type: Bug

     Status: In Progress
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Tue, 10 Aug 2004 6:07 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Updated: (HIVEMIND-29) SmartTranslator should differentiate between blank strings and null input

Posted by hi...@jakarta.apache.org.
The following issue has been updated:

    Updater: Howard M. Lewis Ship (mailto:hlship@apache.org)
       Date: Tue, 10 Aug 2004 5:59 AM
    Changes:
             summary changed from Contribution of whitespaces are ignored to SmartTranslator should differentiate between blank strings and null input
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/HIVEMIND-29?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: SmartTranslator should differentiate between blank strings and null input
       Type: Bug

     Status: In Progress
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Tue, 10 Aug 2004 5:59 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-29) Contribution of whitespaces are ignored

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Steve Gibson
    Created: Wed, 28 Jul 2004 6:30 AM
       Body:
I also think assignments like:
<default symbol=test.Symbol" value=""/>
should work. If I want a property set to an empty string by default, I would expect this to be valid.
Also, it means I can safely use the symbol even if there are no other contributions.

I think I symbol should be defined unless there are 0 contributions.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-29?page=comments#action_36908

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: Contribution of whitespaces are ignored
       Type: Bug

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Wed, 28 Jul 2004 6:30 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Commented: (HIVEMIND-29) Contribution of whitespaces are ignored

Posted by hi...@jakarta.apache.org.
The following comment has been added to this issue:

     Author: Michael Frericks
    Created: Wed, 28 Jul 2004 9:10 AM
       Body:
A simple fix is to change the SmartTranslator

from 
private String _default;
to 
private String _default = "";

This will deliver "" instead of null 
in all cases where the HiveMind.isBlank(inputValue)
is true.

But is this what should happen in all those
situation where the SmartTranslator is implicitly
used without any default settings?

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/HIVEMIND-29?page=comments#action_36913

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: Contribution of whitespaces are ignored
       Type: Bug

     Status: Open
   Priority: Major

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Wed, 28 Jul 2004 9:10 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org


[jira] Closed: (HIVEMIND-29) SmartTranslator should differentiate between blank strings and null input

Posted by hi...@jakarta.apache.org.
Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/HIVEMIND-29

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: HIVEMIND-29
    Summary: SmartTranslator should differentiate between blank strings and null input
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: HiveMind
 Components: 
             framework
   Versions:
             1.0

   Assignee: Howard M. Lewis Ship
   Reporter: Michael Frericks

    Created: Wed, 28 Jul 2004 12:25 AM
    Updated: Tue, 10 Aug 2004 7:32 AM
Environment: hivemind-1.0-beta-1

Description:
Contributions of whitespaces are ignored:

     <default symbol="test.Symbol" value=" " /> 

used in a Service

		<invoke-factory service-id="hivemind.BuilderFactory">
			<construct
				class="TestServiceImpl">
				<set
					property="testParameter"
					value="${test.Symbol}" />
			</construct>

sets the testParameter to the String '${test.Symbol}'


You can see this too in the hivemind-lib
where empty values for symbol ${java.naming.factory.initial}...
are ignored.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org