Merge pull request #59 from geoand/polish

* polish:
  Minor changes indicated by code inspection
This commit is contained in:
Spencer Gibb
2015-07-10 13:31:05 -06:00
2 changed files with 7 additions and 5 deletions

View File

@@ -93,8 +93,7 @@ public class EventService {
String upper = eventId.substring(19, 23) + eventId.substring(24, 36);
BigInteger lowVal = new BigInteger(lower, 16);
BigInteger highVal = new BigInteger(upper, 16);
BigInteger index = lowVal.xor(highVal);
return index;
return lowVal.xor(highVal);
}
public List<Event> getEvents(BigInteger lastIndex) {

View File

@@ -21,13 +21,15 @@ import static org.springframework.util.Base64Utils.decodeFromString;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.util.StringUtils;
import com.ecwid.consul.v1.ConsulClient;
import com.ecwid.consul.v1.QueryParams;
import com.ecwid.consul.v1.Response;
import com.ecwid.consul.v1.kv.model.GetValue;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.util.StringUtils;
/**
* @author Spencer Gibb
@@ -77,6 +79,7 @@ public class ConsulPropertySource extends EnumerablePropertySource<ConsulClient>
@Override
public String[] getPropertyNames() {
return properties.keySet().toArray(new String[0]);
Set<String> strings = properties.keySet();
return strings.toArray(new String[strings.size()]);
}
}