public static String bindValueToString(final Map<Integer, String> bindValueMap, int limit) {
        if (MapUtils.isEmpty(bindValueMap)) {
            return "";
        }
        final int maxParameterIndex = getMaxParameterIndex(bindValueMap);
        if (maxParameterIndex <= 0) {
            return "";
        }
        final String[] temp = new String[maxParameterIndex];
        for (Map.Entry<Integer, String> entry : bindValueMap.entrySet()) {
            final int parameterIndex = entry.getKey() - 1;
            if (parameterIndex < 0) {
                // invalid index. PreparedStatement first parameterIndex is 1
                continue;
            }
            if (temp.length <= parameterIndex) {
                continue;
            }
            temp[parameterIndex] = entry.getValue();
        }
        return bindValueToString(temp, limit);
    }
duplicate : com.navercorp.pinpoint.profiler.modifier.db.interceptor.BindValueUtils

@author emeroad
agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/jdbc/BindValueUtils.java