[ 
https://issues.apache.org/jira/browse/GORA-354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056550#comment-14056550
 ] 

Tyler Palsulich commented on GORA-354:
--------------------------------------

I think a better solution than altering {{findProperty()}} is to update 
{{getProperty()}} as follows. This way, we attempt to respect the user's 
capitalization, and only fall back to lowercase if with case failed. If we go 
this route, we can clean up the logic in {{findProperty()}}.

{code}
  private static String getProperty(Properties properties, String key, String 
defaultValue) {
    if (properties == null) {
      return defaultValue;
    }
    String result = properties.getProperty(key);
    if (result == null) {
      result = properties.getProperty(key.toLowerCase());
    }
    return result;
  }
{code}

> Clarify lowercasing of DataStoreFactory#findProperty
> ----------------------------------------------------
>
>                 Key: GORA-354
>                 URL: https://issues.apache.org/jira/browse/GORA-354
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: gora-core
>    Affects Versions: 0.5
>            Reporter: Lewis John McGibbney
>            Assignee: Lewis John McGibbney
>            Priority: Critical
>             Fix For: 0.5
>
>
> Right now it appears that the reading of key's and value's from 
> DataStoreFactory#findProperty is a process which does not lowercase keys or 
> values.
> This can result in undesired behavhiour meaning that configuration properties 
> are not used properly @Runtime.
> The fix should be a lowercasing of all properties so that they can be stored 
> within and read from the call to System properties.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to