/** * A static method for obtaining {@link JettisonConfig} instance with humanReadableFormatting * set according to formatted parameter. * * @param c original instance of {@link JettisonConfig}, can't be null * @return copy of provided {@link JettisonConfig} with humanReadableFormatting set to formatted. * @throws IllegalArgumentException when provided {@code JettisonConfig} is null. */ public static JettisonConfig createJSONConfiguration(final JettisonConfig c) throws IllegalArgumentException { if (c == null) { throw new IllegalArgumentException("JettisonConfig can't be null"); } final Builder b = copyBuilder(c); return b.build(); }
/** * A static method for obtaining {@link JettisonConfig} instance with humanReadableFormatting * set according to formatted parameter. * * @param c original instance of {@link JettisonConfig}, can't be null * @return copy of provided {@link JettisonConfig} with humanReadableFormatting set to formatted. * @throws IllegalArgumentException when provided {@code JettisonConfig} is null. */ public static JettisonConfig createJSONConfiguration(final JettisonConfig c) throws IllegalArgumentException { if (c == null) { throw new IllegalArgumentException("JettisonConfig can't be null"); } final Builder b = copyBuilder(c); return b.build(); }