@@ -175,9 +175,9 @@ public static CSVFormatBuilder newBuilder() {
175175 * the header
176176 * @throws IllegalArgumentException if the delimiter is a line break character
177177 */
178- private CSVFormat ( final char delimiter , final Character quoteChar , final Quote quotePolicy , final Character commentStart , final Character escape , final
179- boolean ignoreSurroundingSpaces , final boolean ignoreEmptyLines , final String lineSeparator ,
180- final String [] header )
178+ // package protected to give access without needing a synthetic accessor
179+ CSVFormat ( final char delimiter , final Character quoteChar , final Quote quotePolicy , final Character commentStart , final Character escape ,
180+ final boolean ignoreSurroundingSpaces , final boolean ignoreEmptyLines , final String lineSeparator , final String [] header )
181181 {
182182 if (isLineBreak (delimiter ))
183183 {
@@ -202,7 +202,8 @@ private CSVFormat(final char delimiter, final Character quoteChar, final Quote q
202202 *
203203 * @return true if <code>c</code> is a line break character
204204 */
205- private static boolean isLineBreak (final Character c ) {
205+ // package protected to give access without needing a synthetic accessor
206+ static boolean isLineBreak (final Character c ) {
206207 return c != null && isLineBreak (c .charValue ());
207208 }
208209
@@ -214,7 +215,8 @@ private static boolean isLineBreak(final Character c) {
214215 *
215216 * @return true if <code>c</code> is a line break character
216217 */
217- private static boolean isLineBreak (final char c ) {
218+ // package protected to give access without needing a synthetic accessor
219+ static boolean isLineBreak (final char c ) {
218220 return c == LF || c == CR ;
219221 }
220222
@@ -539,7 +541,9 @@ public static class CSVFormatBuilder {
539541 * @param format
540542 * The format to use values from
541543 */
542- private CSVFormatBuilder (CSVFormat format ) {
544+ @ SuppressWarnings ("synthetic-access" ) // TODO fields could be made package-protected
545+ // package protected to give access without needing a synthetic accessor
546+ CSVFormatBuilder (CSVFormat format ) {
543547 this (format .delimiter , format .quoteChar , format .quotePolicy ,
544548 format .commentStart , format .escape ,
545549 format .ignoreSurroundingSpaces , format .ignoreEmptyLines ,
@@ -553,7 +557,8 @@ private CSVFormatBuilder(CSVFormat format) {
553557 * the char used for value separation, must not be a line break character
554558 * @throws IllegalArgumentException if the delimiter is a line break character
555559 */
556- private CSVFormatBuilder (final char delimiter ){
560+ // package protected to give access without needing a synthetic accessor
561+ CSVFormatBuilder (final char delimiter ){
557562 this (delimiter , null , null , null , null , false , false , null , null );
558563 }
559564
0 commit comments