boolean isSandboxEnforced()

in appengine-plugins-core/src/main/java/com/google/cloud/tools/appengine/operations/DevServer.java [246:265]


  boolean isSandboxEnforced(List<Path> services) throws AppEngineException {
    boolean relaxSandbox = false;
    boolean enforceSandbox = false;
    for (Path serviceDirectory : services) {
      Path appengineWebXml = serviceDirectory.resolve("WEB-INF/appengine-web.xml");
      try (InputStream is = Files.newInputStream(appengineWebXml)) {
        if (AppEngineDescriptor.parse(is).isSandboxEnforced()) {
          enforceSandbox = true;
        } else {
          relaxSandbox = true;
        }
      } catch (IOException | SAXException ex) {
        throw new AppEngineException(ex);
      }
    }
    if (relaxSandbox && enforceSandbox) {
      log.warning("Mixed runtimes detected, will not enforce sandbox restrictions.");
    }
    return !relaxSandbox;
  }