vanabel / google-diff-match-patch

Automatically exported from code.google.com/p/google-diff-match-patch
Apache License 2.0
0 stars 0 forks source link

Java warning in diff_compute #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Problem:
Unchecked cast from Object to ArrayList<String> in diff_match_patch.java on
line 229 in function diff_compute.

What is the expected output? What do you see instead?
No warnings should be produced

What version of the product are you using?
diff_match_patch_20090615.zip

Solution:
Create a new class diff_linesToChars_result with public the following
signature:

public String chars1;
public String chars2;
public List<String> lineArray;

See attachement

Original issue reported on code.google.com by Sven.Lil...@gmail.com on 17 Jul 2009 at 7:12

Attachments:

GoogleCodeExporter commented 8 years ago
I was afraid it would come to this, seems like Java requires a lot of pointless 
hoop-
jumping for something so simple.  But I guess I'd better add it (bloated even 
further 
with an equals method so that the unit tests will function).  It is in the next 
release 
(Thursday?).

Original comment by neil.fra...@gmail.com on 19 Aug 2009 at 8:32