Uploaded image for project: 'Wave'
  1. Wave
  2. WAVE-298

Wave doesn't compile: error: no suitable method found for thenReturn(StringTokenizer)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1
    • None
    • Server
    • None
    • Tested on Debian/unstable with Java 6 and Java 7, and on Ubuntu 11.10.

    Description

      $ ant
      [...]
      compile-tests:
      [javac] Compiling 380 source files to /home/tal/src/wave/build/test
      [javac] /home/tal/src/wave/test/org/waveprotocol/box/server/robots/active/ActiveApiServletTest.java:99: error: no suitable method found for thenReturn(StringTokenizer)
      [javac] when(req.getHeaderNames()).thenReturn(new StringTokenizer("Authorization"));
      [javac] ^
      [javac] method OngoingStubbing.thenReturn(Enumeration<String>) is not applicable
      [javac] (actual argument StringTokenizer cannot be converted to Enumeration<String> by method invocation conversion)
      [javac] method OngoingStubbing.thenReturn(Enumeration<String>,Enumeration<String>...) is not applicable
      [javac] (actual argument StringTokenizer cannot be converted to Enumeration<String> by method invocation conversion)
      [javac] /home/tal/src/wave/test/org/waveprotocol/box/server/robots/active/ActiveApiServletTest.java:112: error: no suitable method found for thenReturn(StringTokenizer)
      [javac] when(req.getHeaders("Authorization")).thenReturn(generateOAuthHeader(ROBOT.getAddress()));

      Attachments

        1. patch-wave-298.txt
          5 kB
          Antonio Bello

        Activity

          People

            yurize Yuri Zelikov
            talex5 Thomas Leonard
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: