Skip to content

rtRemote - Code cleanup #115

@jmgasper

Description

@jmgasper

Items from the recent review:

Issue 1

Why is your server file called sample_server.cpp.cpp -> It should be sample_server.cpp

Issue 2

public static long FIND_OBBJECT_TIME = 1000;Typo - OBJECT

Issue 3

String temp;
          RTMessageLocate locate = serializer.fromBytes(recvBuff, 0, recvBuff.length);
          temp = locate.getEndpoint().toString();
          temp += "/";
          temp += locate.getObjectId();

Should use StringBuilder here instead of String

Issue 4

 } catch (Exception e) {
          e.printStackTrace();
          break;
        }

Should log the exception as well

Issue 5

while (true) {
      try {
        Long now = System.currentTimeMillis();
        Long diff = now - preCheckTime;
        URI uri = objectMap.get(name);
        if (uri != null) {
          objectMap.remove(name);
          return uri;
        }

Should more unneeded var declarations outside the while loop

Issue 6

A number of items in the Javadocs are missing @NonNull. Please ensure those items are updated appropriately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions