You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this useful library.
When parsing the attached unified diff file, I noticed that the library fails to retrieve all the diffs (it only sees the first one).
I am not sure if the format of the file is correct; when I delete the blank lines between the diffs the library works just fine.
I am guessing this might be a bug in the library, and it would be ideal to fix it.
Here is my use case:
finalDiffParserparser = newUnifiedDiffParser();
try (InputStreamis = newFileInputStream("test.patch")) {
System.out.println(parser.parse(is).size()); // This is supposed to print 2, but it prints 1: it only sees the first diff!
}
And here is the patch file test.patch:
--- /source/org/jfree/chart/plot/CategoryPlot.java
+++ /source/org/jfree/chart/plot/CategoryPlot.java
@@ -1042,7 +1042,8 @@
result = (ValueAxis) this.rangeAxes.get(index);
}
if (result == null) {
- Plot parent = getParent();
+ CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(index);
+ Plot parent = getParent();
if (parent instanceof CategoryPlot) {
CategoryPlot cp = (CategoryPlot) parent;
result = cp.getRangeAxis(index);
@@ -1349,7 +1350,8 @@
*/
public void setDataset(int index, CategoryDataset dataset) {
- CategoryDataset existing = (CategoryDataset) this.datasets.get(index);
+ Object result = null;
+ CategoryDataset existing = (CategoryDataset) this.datasets.get(index);
if (existing != null) {
existing.removeChangeListener(this);
}
--- /source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
+++ /source/org/jfree/chart/renderer/category/AbstractCategoryItemRenderer.java
@@ -1795,7 +1795,7 @@
int index = this.plot.getIndexOf(this);
CategoryDataset dataset = this.plot.getDataset(index);
if (dataset != null) {
- return result;
+ Paint outlinePaint = plot.getOutlinePaint();
}
int seriesCount = dataset.getRowCount();
if (plot.getRowRenderingOrder().equals(SortOrder.ASCENDING)) {
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for this useful library.
When parsing the attached unified diff file, I noticed that the library fails to retrieve all the diffs (it only sees the first one).
I am not sure if the format of the file is correct; when I delete the blank lines between the diffs the library works just fine.
I am guessing this might be a bug in the library, and it would be ideal to fix it.
Here is my use case:
And here is the patch file
test.patch
:The text was updated successfully, but these errors were encountered: