Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundException in DiffRowGenerator when the inline-diffs is used #9

Closed
GoogleCodeExporter opened this issue Mar 18, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This test case reproduces the problem, which is caused by the inline-diff 
calculations. If the "showInlineDiffs" is set to false, then the problem does 
not appear.



public class DiffUtilsDiffRendererTest extends TestCase {

    String first = "anything \n \nother";
    String second ="anything\n\nother";


    public void testDiffRowGenerator() {
        DiffRowGenerator generator = new DiffRowGenerator.Builder()
        .showInlineDiffs(true)
        .ignoreWhiteSpaces(true)
        .ignoreBlankLines(true)
        .columnWidth(Integer.MAX_VALUE) // do not wrap
        .build();
        List<DiffRow> diffRows = generator.generateDiffRows(split(first), split(second));
    }

    private List<String> split(String content) {
        return Arrays.asList(content.split("\n"));
    }


}


Original issue reported on code.google.com by zlus...@gmail.com on 13 Oct 2010 at 9:11

@GoogleCodeExporter
Copy link
Author

Hi

Inline diffs is still under development. Thanks for firing this bug. I will 
work on it in near future.

Original comment by dm.naume...@gmail.com on 15 Oct 2010 at 12:22

@GoogleCodeExporter
Copy link
Author

Looks good in v1.2. Please, check that you use the latest version before file a 
new bug.

Original comment by dm.naume...@gmail.com on 7 Jun 2011 at 1:57

  • Changed state: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant