import com.google.common.base.Strings;
import org.sonar.api.component.Component;
import org.sonar.api.component.RubyComponentService;
-import org.sonar.api.i18n.I18n;
import org.sonar.api.resources.Qualifiers;
import org.sonar.core.component.ComponentDto;
import org.sonar.core.resource.ResourceDao;
private final ResourceDao resourceDao;
private final DefaultComponentFinder finder;
private final ComponentService componentService;
- private final I18n i18n;
- public DefaultRubyComponentService(ResourceDao resourceDao, DefaultComponentFinder finder, ComponentService componentService, I18n i18n) {
+ public DefaultRubyComponentService(ResourceDao resourceDao, DefaultComponentFinder finder, ComponentService componentService) {
this.resourceDao = resourceDao;
this.finder = finder;
this.componentService = componentService;
- this.i18n = i18n;
}
@Override
}
Select select = context.prepareSelect(sql.toString());
select.setBoolean(1, true);
- int currentIndex = 2;
+ int currentIndex = 1;
for (String author : authors) {
- select.setString(currentIndex++, author).setString(currentIndex++, author);
+ currentIndex++;
+ select.setString(currentIndex, author);
+ currentIndex++;
+ select.setString(currentIndex, author);
}
select.scroll(new Select.RowHandler() {
@VisibleForTesting
static class DuplicationComparator implements Comparator<Duplication> {
+ private static final long serialVersionUID = 1;
private final ComponentDto component;
}
private static class BlockComparator implements Comparator<Block> {
+ private static final long serialVersionUID = 1;
+
@Override
public int compare(@Nullable Block b1,
@Nullable Block b2) {
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.sonar.api.component.Component;
-import org.sonar.api.i18n.I18n;
import org.sonar.api.resources.Qualifiers;
import org.sonar.core.component.ComponentDto;
import org.sonar.core.resource.ResourceDao;
ResourceDao resourceDao;
DefaultComponentFinder finder;
ComponentService componentService;
- I18n i18n;
DefaultRubyComponentService service;
resourceDao = mock(ResourceDao.class);
finder = mock(DefaultComponentFinder.class);
componentService = mock(ComponentService.class);
- i18n = mock(I18n.class);
- service = new DefaultRubyComponentService(resourceDao, finder, componentService, i18n);
+ service = new DefaultRubyComponentService(resourceDao, finder, componentService);
}
@Test
private Date createdAt;
private Date updatedAt;
- // joins
- private transient String projectKey;
+ // return by joins
+ private String projectKey;
public Long getId() {
return id;
private Date updatedAt;
private int totalIssues;
private int unresolvedIssues;
- // joins
- private transient String projectKey;
+ // return by joins
+ private String projectKey;
public Integer getId() {
return id;