Here you can find the source of quoteIfNotNull(StringBuilder sb, String val)
static void quoteIfNotNull(StringBuilder sb, String val)
//package com.java2s; public class Main { static void quoteIfNotNull(StringBuilder sb, String val) { if (val == null) sb.append("null"); else/*w w w . ja va2 s.com*/ sb.append("'").append(val).append("'"); } static String quoteIfNotNull(String val) { return (val == null) ? "null" : new StringBuilder("'").append(val) .append("'").toString(); } }