Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8037389

Inner classes that implement interfaces not compiling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3
    • 8u20
    • 8
    • tools
    • x86
    • os_x

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0"
      Java(TM) SE Runtime Environment (build 1.8.0-b132)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Darwin Brians-MacBook-Pro.local 13.1.0 Darwin Kernel Version 13.1.0: Thu Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      I have an public static inner class that implements an interface from my classpath. The compiler is complaining that the interface doesn't exist:

      /Users/bpontarelli/dev/inversoft/cleanspeak/cleanspeak-webservice/src/main/java/com/inversoft/cleanspeak/webservice/action/content/item/Moderate.java:209: error: cannot find symbol
        public static class Response implements APIResponse {
                                                ^
        symbol: class APIResponse
        location: class Moderate
      /Users/bpontarelli/dev/inversoft/cleanspeak/cleanspeak-webservice/src/main/java/com/inversoft/cleanspeak/webservice/action/content/item/Moderate.java:122: error: incompatible types: Response cannot be converted to APIResponse
          this.response = new Response(request.content, response.filterAction, moderation);

      However, if I move the inner class to a top-level class in its own file and change nothing else, it works fine.

      REGRESSION. Last worked in version 7u51

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I can't reproduce in a small case. This does break in my project, which is a large application with 30 JARs on the classpath. Sorry I'm not more help.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Move the inner class to a top-level class.

      Attachments

        Activity

          People

            keshah Ketan Shah (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: