Skip to content

The method expect(Object[]) is ambiguous for the type Expect #8

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions