Example usage for com.jgoodies.common.base Preconditions checkNotBlank

List of usage examples for com.jgoodies.common.base Preconditions checkNotBlank

Introduction

In this page you can find the example usage for com.jgoodies.common.base Preconditions checkNotBlank.

Prototype

public static String checkNotBlank(String str, String message) 

Source Link

Document

Checks that the given string is not blank and throws a customized NullPointerException if it is null , and a customized IllegalArgumentException if it is empty or whitespace.

Usage

From source file:com.r4intellij.misc.rinstallcache.LibraryIndexFactory.java

License:BSD License

static String getPackageVersion(String packageName) {
    String s = CachingUtils.evalRCommandCat("packageDescription('" + packageName + "')$Version");
    Preconditions.checkNotBlank(s, "version is empty");
    return s;/* ww  w  .  j  a  va  2s  . com*/
}