Skip to content

Commit

Permalink
Cleaned up getStringIdValue
Browse files Browse the repository at this point in the history
* Fixed name to make sense
* Moved inline comments to JavaDoc
  • Loading branch information
mkroetzsch committed Mar 18, 2014
1 parent 111e67d commit 6510550
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ private ValueSnak getValueSnak(JSONArray jsonValueSnak)
value = this.getEntityIdValue(jsonValueSnak.getJSONObject(3));
break;
case "string":
value = this.getStringIdValue(jsonValueSnak.getString(3));
value = this.getStringValue(jsonValueSnak.getString(3));
break;
case "globecoordinate":
value = this.getGlobeCoordinatesValue(jsonValueSnak
Expand Down Expand Up @@ -952,16 +952,16 @@ private GlobeCoordinatesValue getGlobeCoordinatesValue(
}

/**
* Acquires the StringValue for a given String.
* Creates a StringValue for a given string.
* <p>
* Currently this just calls the corresponding factory method, but it could
* change in the future if the JSON encoding diverges from the data model in
* any way.
*
* @param string
* @return
* @return corresponding StringValue
*/
private StringValue getStringIdValue(String string) {

// NOTE I decided against inlining, so
// if the StringValue changes somehow in the future
// one has only to change this method
private StringValue getStringValue(String string) {
return this.factory.getStringValue(string);
}

Expand Down

0 comments on commit 6510550

Please sign in to comment.