hudson.model.Messages.AbstractBuild_KeptBecause()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中hudson.model.Messages.AbstractBuild_KeptBecause()方法的一些代码示例,展示了Messages.AbstractBuild_KeptBecause()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.AbstractBuild_KeptBecause()方法的具体详情如下:
包路径:hudson.model.Messages
类名称:Messages
方法名:AbstractBuild_KeptBecause

Messages.AbstractBuild_KeptBecause介绍

[英]kept because of {0}
[中]因为{0}而保留

代码示例

代码示例来源:origin: jenkinsci/jenkins

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(p.hasPermission(Item.READ) ? b.toString() : "?");
    }
  }
  return super.getWhyKeepLog();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

代码示例来源:origin: hudson/hudson-2.x

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?, ?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) {
      continue;
    }
    AbstractBuild<?, ?> fb = p.getFirstBuild();
    if (fb == null) {
      continue; // no active record
    }
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i < fb.getNumber()) {
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      }
      AbstractBuild<?, ?> b = p.getBuildByNumber(i);
      if (b != null) {
        return Messages.AbstractBuild_KeptBecause(b);
      }
    }
  }
  return super.getWhyKeepLog();
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(p.hasPermission(Item.READ) ? b.toString() : "?");
    }
  }
  return super.getWhyKeepLog();
}

相关文章

Messages类方法