src/share/classes/com/sun/tools/javac/comp/TransTypes.java

changeset 1843
be62183f938a
parent 1824
455be95bd1b5
child 1882
39ec5d8a691b
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Tue Jun 18 20:56:04 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Wed Jun 19 11:48:05 2013 +0100
     1.3 @@ -68,7 +68,6 @@
     1.4      private TreeMaker make;
     1.5      private Enter enter;
     1.6      private boolean allowEnums;
     1.7 -    private boolean allowInterfaceBridges;
     1.8      private Types types;
     1.9      private final Resolve resolve;
    1.10  
    1.11 @@ -92,7 +91,6 @@
    1.12          Source source = Source.instance(context);
    1.13          allowEnums = source.allowEnums();
    1.14          addBridges = source.addBridges();
    1.15 -        allowInterfaceBridges = source.allowDefaultMethods();
    1.16          types = Types.instance(context);
    1.17          make = TreeMaker.instance(context);
    1.18          resolve = Resolve.instance(context);
    1.19 @@ -254,8 +252,7 @@
    1.20  
    1.21          // Create a bridge method symbol and a bridge definition without a body.
    1.22          Type bridgeType = meth.erasure(types);
    1.23 -        long flags = impl.flags() & AccessFlags | SYNTHETIC | BRIDGE |
    1.24 -                (origin.isInterface() ? DEFAULT : 0);
    1.25 +        long flags = impl.flags() & AccessFlags | SYNTHETIC | BRIDGE;
    1.26          if (hypothetical) flags |= HYPOTHETICAL;
    1.27          MethodSymbol bridge = new MethodSymbol(flags,
    1.28                                                 meth.name,
    1.29 @@ -390,12 +387,11 @@
    1.30          }
    1.31      }
    1.32      // where
    1.33 -        private Filter<Symbol> overrideBridgeFilter = new Filter<Symbol>() {
    1.34 +        Filter<Symbol> overrideBridgeFilter = new Filter<Symbol>() {
    1.35              public boolean accepts(Symbol s) {
    1.36                  return (s.flags() & (SYNTHETIC | OVERRIDE_BRIDGE)) != SYNTHETIC;
    1.37              }
    1.38          };
    1.39 -
    1.40          /**
    1.41           * @param method The symbol for which a bridge might have to be added
    1.42           * @param impl The implementation of method
    1.43 @@ -1003,9 +999,8 @@
    1.44                      ListBuffer<JCTree> bridges = new ListBuffer<JCTree>();
    1.45                      if (false) //see CR: 6996415
    1.46                          bridges.appendList(addOverrideBridgesIfNeeded(tree, c));
    1.47 -                    if (allowInterfaceBridges || (tree.sym.flags() & INTERFACE) == 0) {
    1.48 -                        addBridges(tree.pos(), c, bridges);
    1.49 -                    }
    1.50 +                    if ((tree.sym.flags() & INTERFACE) == 0)
    1.51 +                        addBridges(tree.pos(), tree.sym, bridges);
    1.52                      tree.defs = bridges.toList().prependList(tree.defs);
    1.53                  }
    1.54                  tree.type = erasure(tree.type);

mercurial