code: @Override
      public final boolean implies(ProtectionDomain protectionDomain, Permission permission) {
          if (permission instanceof AllPermission) {
              return wrappedPolicy != null ? wrappedPolicy.implies(protectionDomain, permission) : false;
          }
          if (wrappedPolicy == null || !wrappedPolicy.implies(protectionDomain, permission)) {
              try {
                  listener.permissionDenied(protectionDomain, permission);
              } catch (Throwable t) {
                  t.printStackTrace();
              }
          }
          return true;
      }
docs: If a checked permission is not an {@link AllPermission} instance, then returns true. If the checked permission is an
  instance of {@link AllPermission}, then the result of {@link Policy#implies(ProtectionDomain, Permission)} called on
  wrapped policy is returned (or false when the wrapped policy is <code>null</code>).
  <p>
  When the wrapped policy is null or it doesn't imply checked permission (!=AllPermission), then
  {@link DeniedPermissionListener#permissionDenied(ProtectionDomain, Permission)} is called.
  </p>
  
  @param protectionDomain
  @param permission
  @return mostly true, but read the JavaDoc :)