@Test public void shouldReturnNullAsLineEndingForKeep() { assertEquals( null, LineEndings.keep.getLineEndingCharacters() ); }
@Nullable public static String getLineEndingCharacters( @Nullable String lineEnding ) throws AssemblyFormattingException { String value = lineEnding; if ( lineEnding != null ) { try { value = LineEndings.valueOf( lineEnding ).getLineEndingCharacters(); } catch ( IllegalArgumentException e ) { throw new AssemblyFormattingException( "Illegal lineEnding specified: '" + lineEnding + "'", e ); } } return value; }
LineEndingsUtils { @Nullable public static String getLineEndingCharacters( @Nullable String lineEnding ) throws AssemblyFormattingException { String value = lineEnding; if ( lineEnding != null ) { try { value = LineEndings.valueOf( lineEnding ).getLineEndingCharacters(); } catch ( IllegalArgumentException e ) { throw new AssemblyFormattingException( "Illegal lineEnding specified: '" + lineEnding + "'", e ); } } return value; } }
LineEndingsUtils { @Nullable public static String getLineEndingCharacters( @Nullable String lineEnding ) throws AssemblyFormattingException { String value = lineEnding; if ( lineEnding != null ) { try { value = LineEndings.valueOf( lineEnding ).getLineEndingCharacters(); } catch ( IllegalArgumentException e ) { throw new AssemblyFormattingException( "Illegal lineEnding specified: '" + lineEnding + "'", e ); } } return value; } private  LineEndingsUtils(); }
LineEndingsUtils { @Nullable public static String getLineEndingCharacters( @Nullable String lineEnding ) throws AssemblyFormattingException { String value = lineEnding; if ( lineEnding != null ) { try { value = LineEndings.valueOf( lineEnding ).getLineEndingCharacters(); } catch ( IllegalArgumentException e ) { throw new AssemblyFormattingException( "Illegal lineEnding specified: '" + lineEnding + "'", e ); } } return value; } private  LineEndingsUtils(); static void convertLineEndings( @Nonnull File source, @Nonnull File dest, LineEndings lineEndings,
                                           Boolean atEndOfFile, String encoding ); @SuppressWarnings( "resource" ) static InputStream lineEndingConverter( @Nonnull InputStream in, LineEndings lineEndings ); @Nonnull static LineEndings getLineEnding( @Nullable String lineEnding ); @Nullable static String getLineEndingCharacters( @Nullable String lineEnding ); }
LineEndingsUtils { @Nullable public static String getLineEndingCharacters( @Nullable String lineEnding ) throws AssemblyFormattingException { String value = lineEnding; if ( lineEnding != null ) { try { value = LineEndings.valueOf( lineEnding ).getLineEndingCharacters(); } catch ( IllegalArgumentException e ) { throw new AssemblyFormattingException( "Illegal lineEnding specified: '" + lineEnding + "'", e ); } } return value; } private  LineEndingsUtils(); static void convertLineEndings( @Nonnull File source, @Nonnull File dest, LineEndings lineEndings,
                                           Boolean atEndOfFile, String encoding ); @SuppressWarnings( "resource" ) static InputStream lineEndingConverter( @Nonnull InputStream in, LineEndings lineEndings ); @Nonnull static LineEndings getLineEnding( @Nullable String lineEnding ); @Nullable static String getLineEndingCharacters( @Nullable String lineEnding );  }