GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
I'm seeing that the methods with signatures expect(Object...) conflict with the ones like expect(int, Object...)
I'm seeing this while working in Eclipse. I know that type ambiguity resolution rules for Java are a bit confusing, so I'd recommend for clarity that you not use a varargs Object, instead using specific types for what you support (String... and Pattern...).
I know this loses the ability to put both Pattern and String objects in the same method call, but how often is this actually done? I'd say this is less important that the use of specifying a custom timeout per expect() method call.
I see the same problem when compiling with Java 1.8; i.e., it's not just Eclipse that complains. For example:
PythonBridge.java:37: error: reference to expect is ambiguous
rc = expect.expect(1, ">>>");
both method expect(Object...) in Expect and method expect(int,Object...) in Expect match