hotspot/src/share/vm/classfile/verifier.cpp
changeset 32825 79488b52df9b
parent 31777 0bfed49b6beb
child 33207 edc4431940b2
equal deleted inserted replaced
32824:3b686e54dece 32825:79488b52df9b
  1577             verify_error(ErrorContext::bad_code(bci),
  1577             verify_error(ErrorContext::bad_code(bci),
  1578                          "Method expects a return value");
  1578                          "Method expects a return value");
  1579             return;
  1579             return;
  1580           }
  1580           }
  1581           // Make sure "this" has been initialized if current method is an
  1581           // Make sure "this" has been initialized if current method is an
  1582           // <init>
  1582           // <init>.  Note that "<init>" methods in interfaces are just
       
  1583           // normal methods.  Interfaces cannot have ctors.
  1583           if (_method->name() == vmSymbols::object_initializer_name() &&
  1584           if (_method->name() == vmSymbols::object_initializer_name() &&
  1584               current_frame.flag_this_uninit()) {
  1585               current_frame.flag_this_uninit() &&
       
  1586               !current_class()->is_interface()) {
  1585             verify_error(ErrorContext::bad_code(bci),
  1587             verify_error(ErrorContext::bad_code(bci),
  1586                          "Constructor must call super() or this() "
  1588                          "Constructor must call super() or this() "
  1587                          "before return");
  1589                          "before return");
  1588             return;
  1590             return;
  1589           }
  1591           }