Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Most recent version does not compile #7

Open
jzheng2017 opened this issue Nov 23, 2020 · 0 comments
Open

Most recent version does not compile #7

jzheng2017 opened this issue Nov 23, 2020 · 0 comments

Comments

@jzheng2017
Copy link

> Task :compileJava FAILED
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:49: error: cannot find symbol
          socket.connect(node.getAddress());
                             ^
  symbol:   method getAddress()
  location: variable node of type Node
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:70: error: constructor BroadcastResponse in class BroadcastResponse cannot be applied to given types;
          return new BroadcastResponse(node, message(node, message));
                 ^
  required: no arguments
  found:    Node,Message
  reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:77: error: constructor BroadcastResponse in class BroadcastResponse cannot be applied to given types;
          return new BroadcastResponse(node, Message.ERR);
                 ^
  required: no arguments
  found:    Node,Message
  reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:80: error: invalid method reference
      .collect(Collectors.toMap(BroadcastResponse::getNode, BroadcastResponse::getResponse));
                                ^
  cannot find symbol
    symbol:   method getNode()
    location: class BroadcastResponse
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:80: error: invalid method reference
      .collect(Collectors.toMap(BroadcastResponse::getNode, BroadcastResponse::getResponse));
                                                            ^
  cannot find symbol
    symbol:   method getResponse()
    location: class BroadcastResponse
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapServer.java:86: error: cannot find symbol
      serverSocket = new ServerSocket(self.getAddress().getPort());
                                          ^
  symbol:   method getAddress()
  location: variable self of type Node
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:38: error: cannot find symbol
    switch (message.getType()) {
                   ^
  symbol:   method getType()
  location: variable message of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:52: error: cannot find symbol
        delegate.put(entry.getKey(), entry.getValue());
                          ^
  symbol:   method getKey()
  location: variable entry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:52: error: cannot find symbol
        delegate.put(entry.getKey(), entry.getValue());
                                          ^
  symbol:   method getValue()
  location: variable entry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:87: error: constructor Entry in class Entry cannot be applied to given types;
          .map(entry -> new Entry(entry.getKey(), entry.getValue()))
                        ^
  required: no arguments
  found:    Object,Object
  reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:106: error: cannot find symbol
      .filter(response -> TYPE_SIZE.equals(response.getType()))
                                                   ^
  symbol:   method getType()
  location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:202: error: cannot infer type arguments for TypedEntry<>
      entries.add(new TypedEntry<>((K) localEntry.getKey(), (V) localEntry.getValue()));
                  ^
  reason: cannot infer type-variable(s) K,V
    (actual and formal argument lists differ in length)
  where K,V are type-variables:
    K extends Object declared in class TypedEntry
    V extends Object declared in class TypedEntry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot find symbol
        entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
                                                    ^
  symbol:   method getKey()
  location: variable remoteEntry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot find symbol
        entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
                                                                              ^
  symbol:   method getValue()
  location: variable remoteEntry of type Entry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:209: error: cannot infer type arguments for TypedEntry<>
        entries.add(new TypedEntry<>((K) remoteEntry.getKey(), (V) remoteEntry.getValue()));
                    ^
  reason: cannot infer type-variable(s) K,V
    (actual and formal argument lists differ in length)
  where K,V are type-variables:
    K extends Object declared in class TypedEntry
    V extends Object declared in class TypedEntry
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:316: error: cannot find symbol
    if (!TYPE_GET.equals(response.getType())) {
                                 ^
  symbol:   method getType()
  location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:329: error: constructor Entry in class Entry cannot be applied to given types;
    Message putMsg = new Message(TYPE_PUT, new Entry(key, value));
                                           ^
  required: no arguments
  found:    Object,Object
  reason: actual and formal argument lists differ in length
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:362: error: cannot find symbol
    if (!TYPE_REMOVE.equals(response.getType())) {
                                    ^
  symbol:   method getType()
  location: variable response of type Message
C:\Users\Jiankai\IdeaProjects\meshmap\src\main\java\jamsesso\meshmap\MeshMapImpl.java:393: error: TypedEntry is not abstract and does not override abstract method getValue() in Entry
  private static class TypedEntry<K, V> implements Map.Entry<K, V> {
                 ^
  where V is a type-variable:
    V extends Object declared in class TypedEntry
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
19 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
1 actionable task: 1 executed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant