hudson.Util.removeTrailingSlash()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(215)

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

Util.removeTrailingSlash介绍

暂无

代码示例

代码示例来源:origin: org.jvnet.hudson.plugins/subversion

@DataBoundConstructor
public ListSubversionTagsParameterDefinition(String name, String tagsDir, String uuid) {
 super(name, ResourceBundleHolder.get(ListSubversionTagsParameterDefinition.class).format("TagDescription"));
 this.tagsDir = Util.removeTrailingSlash(tagsDir);
 if(uuid == null || uuid.length() == 0) {
  this.uuid = UUID.randomUUID();
 }
 else {
  this.uuid = UUID.fromString(uuid);
 }
}

代码示例来源:origin: org.hudsonci.plugins/subversion

@DataBoundConstructor
public ListSubversionTagsParameterDefinition(String name, String tagsDir, String uuid) {
  super(name, ResourceBundleHolder.get(ListSubversionTagsParameterDefinition.class).format("TagDescription"));
  this.tagsDir = Util.removeTrailingSlash(tagsDir);
  if (uuid == null || uuid.length() == 0) {
    this.uuid = UUID.randomUUID();
  } else {
    this.uuid = UUID.fromString(uuid);
  }
}

代码示例来源:origin: org.jvnet.hudson.plugins/subversion

@Override
public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
 dirs.add(Util.removeTrailingSlash(dirEntry.getName()));
}

代码示例来源:origin: jenkinsci/subversion-plugin

@DataBoundConstructor
public ListSubversionTagsParameterDefinition(String name, String tagsDir, String credentialsId, String tagsFilter, String defaultValue, String maxTags, boolean reverseByDate, boolean reverseByName) {
 super(name, ResourceBundleHolder.get(ListSubversionTagsParameterDefinition.class).format("TagDescription"));
 this.tagsDir = Util.removeTrailingSlash(tagsDir);
 this.tagsFilter = tagsFilter;
 this.reverseByDate = reverseByDate;
 this.reverseByName = reverseByName;
 this.defaultValue = defaultValue;
 this.maxTags = maxTags;
 this.credentialsId = credentialsId;
}

代码示例来源:origin: org.hudsonci.plugins/subversion

@Override
  public void handleDirEntry(SVNDirEntry dirEntry) throws SVNException {
    if (!dirEntry.getKind().equals(SVNNodeKind.DIR)) {
      return;
    }
    dirs.add(Util.removeTrailingSlash(dirEntry.getName()));
  }
}

代码示例来源:origin: org.hudsonci.plugins/subversion

@Override
  public void handleDirEntry(final SVNDirEntry dirEntry) throws SVNException {
    if (!dirEntry.getKind().equals(SVNNodeKind.DIR)) {
      return;
    }
    String directoryName = Util.removeTrailingSlash(dirEntry.getName());
    dirs.put(Long.valueOf(dirEntry.getRevision()), directoryName);
  }
}

代码示例来源:origin: jenkinsci/subversion-plugin

@DataBoundConstructor
public ModuleLocation(String remote, String credentialsId, String local, String depthOption, boolean ignoreExternalsOption,
           boolean cancelProcessOnExternalsFail) {
  this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim());
  this.credentialsId = credentialsId;
  this.local = fixEmptyAndTrim(local);
  this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName() : depthOption;
  this.ignoreExternalsOption = ignoreExternalsOption;
  this.cancelProcessOnExternalsFail = cancelProcessOnExternalsFail;
}

代码示例来源:origin: org.hudsonci.plugins/subversion

@DataBoundConstructor
public ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) {
  this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim());
  this.local = Util.fixEmptyAndTrim(local);
  this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName()
    : depthOption;
  this.ignoreExternalsOption = ignoreExternalsOption;
}

代码示例来源:origin: org.jvnet.hudson.plugins/subversion

@DataBoundConstructor
public ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) {
  this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim());
  this.local = Util.fixEmptyAndTrim(local);
  this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName()
    : depthOption;
  this.ignoreExternalsOption = ignoreExternalsOption;
}

代码示例来源:origin: org.hudsonci.plugins/subversion

String remoteLoc = Util.removeTrailingSlash(tokens.nextToken());

代码示例来源:origin: org.hudsonci.plugins/subversion

public static List<ModuleLocation> parse(String[] remoteLocations, String[] localLocations,
                     String[] depthOptions, boolean[] isIgnoreExternals) {
  List<ModuleLocation> modules = new ArrayList<ModuleLocation>();
  if (remoteLocations != null && localLocations != null) {
    int entries = Math.min(remoteLocations.length, localLocations.length);
    for (int i = 0; i < entries; i++) {
      // the remote (repository) location
      String remoteLoc = Util.nullify(remoteLocations[i]);
      if (remoteLoc != null) {// null if skipped
        remoteLoc = Util.removeTrailingSlash(remoteLoc.trim());
        modules.add(new ModuleLocation(remoteLoc, Util.nullify(localLocations[i]),
          depthOptions != null ? depthOptions[i] : null,
          isIgnoreExternals != null && isIgnoreExternals[i]));
      }
    }
  }
  return modules;
}

代码示例来源:origin: org.jvnet.hudson.plugins/subversion

String remoteLoc = Util.removeTrailingSlash(tokens.nextToken());

代码示例来源:origin: org.jvnet.hudson.plugins/subversion

public static List<ModuleLocation> parse(String[] remoteLocations, String[] localLocations,
                       String[] depthOptions, boolean[] isIgnoreExternals) {
    List<ModuleLocation> modules = new ArrayList<ModuleLocation>();
    if (remoteLocations != null && localLocations != null) {
      int entries = Math.min(remoteLocations.length, localLocations.length);
      for (int i = 0; i < entries; i++) {
        // the remote (repository) location
        String remoteLoc = Util.nullify(remoteLocations[i]);
        if (remoteLoc != null) {// null if skipped
          remoteLoc = Util.removeTrailingSlash(remoteLoc.trim());
          modules.add(new ModuleLocation(remoteLoc, Util.nullify(localLocations[i]),
            depthOptions != null ? depthOptions[i] : null,
            isIgnoreExternals != null && isIgnoreExternals[i]));
        }
      }
    }
    return modules;
  }
}

代码示例来源:origin: jenkinsci/subversion-plugin

public static List<ModuleLocation> parse(String[] remoteLocations, String[] credentialIds,
                     String[] localLocations, String[] depthOptions,
                     boolean[] isIgnoreExternals, boolean[] cancelProcessOnExternalsFails) {
  List<ModuleLocation> modules = new ArrayList<ModuleLocation>();
  if (remoteLocations != null && localLocations != null) {
    int entries = Math.min(remoteLocations.length, localLocations.length);
    for (int i = 0; i < entries; i++) {
      // the remote (repository) location
      String remoteLoc = Util.nullify(remoteLocations[i]);
      if (remoteLoc != null) {// null if skipped
        remoteLoc = Util.removeTrailingSlash(remoteLoc.trim());
        modules.add(new ModuleLocation(remoteLoc,
            credentialIds != null && credentialIds.length > i ? credentialIds[i] : null,
            Util.nullify(localLocations[i]),
          depthOptions != null ? depthOptions[i] : null,
          isIgnoreExternals != null && isIgnoreExternals[i],
          cancelProcessOnExternalsFails != null && cancelProcessOnExternalsFails[i]));
      }
    }
  }
  return modules;
}

代码示例来源:origin: jenkinsci/subversion-plugin

String remoteLoc = Util.removeTrailingSlash(tokens.nextToken());

相关文章