Skip to content

Commit

Permalink
Clean up the code
Browse files Browse the repository at this point in the history
  • Loading branch information
hprange committed Sep 3, 2020
1 parent de408b3 commit c7980eb
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* @author <a href="mailto:hprange@gmail.com">Henrique Prange</a>
*/
public class JasperEOBatchDataSource implements JRDataSource, JRRewindableDataSource {
private final ERXFetchSpecificationBatchIterator iterator;
private final ERXFetchSpecificationBatchIterator<NSDictionary<String, Object>> iterator;

private NSDictionary<String, Object> row;

Expand Down Expand Up @@ -80,7 +80,7 @@ public JasperEOBatchDataSource(EOEditingContext editingContext, String entityNam
fetchSpecification.setRawRowKeyPaths(keyPaths);
}

iterator = new ERXFetchSpecificationBatchIterator(fetchSpecification, editingContext);
iterator = new ERXFetchSpecificationBatchIterator<>(fetchSpecification, editingContext);

}

Expand All @@ -97,12 +97,11 @@ public void moveFirst() throws JRException {
}

@Override
@SuppressWarnings("unchecked")
public boolean next() throws JRException {
boolean hasNext = iterator.hasNext();

if (hasNext) {
row = (NSDictionary<String, Object>) iterator.next();
row = iterator.next();
}

return hasNext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public JasperEOGlobaIDDataSource(ERXEC.Factory editingContextFactory, NSArray<EO
this.globalIds = globalIds;
}

@SuppressWarnings("unchecked")
private JasperKeyValueDataSource dataSource() {
if (dataSource == null) {
EOEditingContext editingContext = editingContextFactory._newEditingContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.junit.Test;
import org.junit.rules.ExpectedException;

import com.woreports.jasper.JasperReportInput;
import com.woreports.jasper.stubs.JRStubDataSource;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import org.mockito.runners.MockitoJUnitRunner;

import com.woreports.api.ReportModel;
import com.woreports.jasper.JasperReportProcessor;
import com.woreports.jasper.JasperReportRecipeFactory;

/**
* @author <a href="mailto:hprange@gmail.com">Henrique Prange</a>
Expand Down

0 comments on commit c7980eb

Please sign in to comment.