Skip to content

Commit

Permalink
reword/remove some TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jan 6, 2020
1 parent f110f77 commit eaa38c5
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public synchronized Collection<Server> createEndpoints(Collection<? extends Serv
if (serverInfo == null || serverInfo.isEmpty())
return null;
else {
// TODO support multi server;
// TODO support multi server
ServerInfo firstServer = serverInfo.iterator().next();
Collection<Server> servers = new ArrayList<>(1);
servers.add(createEndpoint(firstServer));
Expand All @@ -200,7 +200,7 @@ public synchronized void forceReconnection(Server server) {
}

public synchronized Endpoint getEndpoint(Identity server) {
// TODO support multi server;
// TODO support multi server
if (currentEndpoint.isStarted())
return currentEndpoint;
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public synchronized ReadResponse read(ServerIdentity identity, ReadRequest reque

return doRead(identity, request);

// TODO we could do a validation of response.getContent by comparing with the spec.
// TODO we could do a validation of response.getContent by comparing with resourceSpec information
}

protected ReadResponse doRead(ServerIdentity identity, ReadRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public void decode_broken_tlv() throws TlvException {
} catch (TlvException ex) {
// this is very weak assertion since the format of the exception's message could
// be changed any time
// TODO: replace with more robust assertion or simply check for TlvException being thrown
assertEquals("Impossible to parse TLV: \n0011223344556677889900", ex.getMessage());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,6 @@ protected <K, V> boolean removeFromMap(Map<K, V> map, K key, V value) {

@Override
public void setExecutor(ScheduledExecutorService executor) {
// TODO we could reuse californium executor ?
// TODO sould we reuse californium executor ?
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class SerializationTests {

@Test
public void ensure_Registration_is_serializable() {
// TODO we excludes "org.eclipse.leshan.Link.attributes" because we can not be sure it is serializable in a
// We exclude "org.eclipse.leshan.Link.attributes" because we can not be sure it is serializable in a
// reliable way.
assertIsSerializable(Registration.class, "org.eclipse.leshan.Link.attributes");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public static void createAndStartServer(String webAddress, int webPort, String l
// Connect to redis if needed
Pool<Jedis> jedis = null;
if (redisUrl != null) {
// TODO: support sentinel pool and make pool configurable
// TODO support sentinel pool and make pool configurable
jedis = new JedisPool(new URI(redisUrl));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public Object convertValue(Object value, Type currentType, Type expectedType, Lw
if (currentType == Type.STRING) {
// let's assume we received an hexadecimal string
LOG.debug("Trying to convert hexadecimal string {} to byte array", value);
// TODO: check if we shouldn't instead assume that the string contains Base64 encoded data
// TODO check if we shouldn't instead assume that the string contains Base64 encoded data
try {
return Hex.decodeHex(((String) value).toCharArray());
} catch (IllegalArgumentException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ private Collection<Observation> unsafeRemoveAllObservations(Jedis j, String regi

@Override
public void setContext(Token token, EndpointContext correlationContext) {
// TODO should be implemented
// In Leshan we always set context when we send the request, so this should not be needed to implement this.
}

private byte[] serializeObs(org.eclipse.californium.core.observe.Observation obs) {
Expand Down Expand Up @@ -761,6 +761,6 @@ public void setExpirationListener(ExpirationListener listener) {

@Override
public void setExecutor(ScheduledExecutorService executor) {
// TODO we could reuse californium executor ?
// TODO should we reuse californium executor ?
}
}

0 comments on commit eaa38c5

Please sign in to comment.