示例#1
0
  @CoberturaIgnore
  public static String constructUserAgentName() {
    final Package pkg = StringUtils.class.getPackage();
    final String implementationVersion =
        StringUtils.isSet(pkg.getImplementationVersion())
            ? pkg.getImplementationVersion()
            : "x.x.xx";

    return String.format("stubby4j/%s (HTTP stub client request)", implementationVersion);
  }
示例#2
0
 public static int calculateStringLength(final String post) {
   if (StringUtils.isSet(post)) {
     return StringUtils.getBytesUtf8(post).length;
   }
   return 0;
 }
示例#3
0
 public String getBody() {
   return (StringUtils.isSet(body) ? body : "");
 }