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

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

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

Messages.Hudson_NotUsesUTF8ToDecodeURL介绍

[英]Your container doesn''t use UTF-8 to decode URLs. If you use non-ASCII characters as a job name etc, this will cause problems. See <a href=''http://wiki.hudson-ci.org/display/HUDSON/Containers''>Containers</a> and <a href=''http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n''>Tomcat i18n</a> for more details.
[中]您的容器不使用UTF-8来解码URL。如果使用非ASCII字符作为作业名称等,这将导致问题。请参见<a href=''http://wiki.hudson-ci.org/display/HUDSON/Containers“>容器</a>和<a href=”http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n'>Tomcat i18n</a>了解更多详细信息。

代码示例

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

public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
    Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
    // expected is non-ASCII String
    final String expected = "\u57f7\u4e8b";
    final String value = fixEmpty(request.getParameter("value"));
    if (!expected.equals(value))
      return FormValidation.warningWithMarkup(hudson.model.Messages.Hudson_NotUsesUTF8ToDecodeURL());
    return FormValidation.ok();
  }
}

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

/**
 * Checks if container uses UTF-8 to decode URLs. See
 * http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n
 */
public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
  // expected is non-ASCII String
  final String expected = "\u57f7\u4e8b";
  final String value = Util.fixEmpty(request.getParameter("value"));
  if (!expected.equals(value)) {
    return FormValidation.warningWithMarkup(Messages.Hudson_NotUsesUTF8ToDecodeURL());
  }
  return FormValidation.ok();
}

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

/**
 * Checks if container uses UTF-8 to decode URLs. See
 * http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n
 */
public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
  // expected is non-ASCII String
  final String expected = "\u57f7\u4e8b";
  final String value = Util.fixEmpty(request.getParameter("value"));
  if (!expected.equals(value)) {
    return FormValidation.warningWithMarkup(Messages.Hudson_NotUsesUTF8ToDecodeURL());
  }
  return FormValidation.ok();
}

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

/**
 * Checks if container uses UTF-8 to decode URLs. See
 * http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n
 */
public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
  // expected is non-ASCII String
  final String expected = "\u57f7\u4e8b";
  final String value = fixEmpty(request.getParameter("value"));
  if (!expected.equals(value)) {
    return FormValidation.warningWithMarkup(Messages.Hudson_NotUsesUTF8ToDecodeURL());
  }
  return FormValidation.ok();
}

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

/**
 * Checks if container uses UTF-8 to decode URLs. See
 * http://wiki.hudson-ci.org/display/HUDSON/Tomcat#Tomcat-i18n
 */
public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
  // expected is non-ASCII String
  final String expected = "\u57f7\u4e8b";
  final String value = fixEmpty(request.getParameter("value"));
  if (!expected.equals(value)) {
    return FormValidation.warningWithMarkup(Messages.Hudson_NotUsesUTF8ToDecodeURL());
  }
  return FormValidation.ok();
}

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

public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException {
    Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
    // expected is non-ASCII String
    final String expected = "\u57f7\u4e8b";
    final String value = fixEmpty(request.getParameter("value"));
    if (!expected.equals(value))
      return FormValidation.warningWithMarkup(hudson.model.Messages.Hudson_NotUsesUTF8ToDecodeURL());
    return FormValidation.ok();
  }
}

相关文章

Messages类方法