Example #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);
  }
Example #2
0
 public static int calculateStringLength(final String post) {
   if (StringUtils.isSet(post)) {
     return StringUtils.getBytesUtf8(post).length;
   }
   return 0;
 }
Example #3
0
 public String getBody() {
   return (StringUtils.isSet(body) ? body : "");
 }