Skip to content

Commit

Permalink
Fix squid:S3985: Unused "private" classes should be removed
Browse files Browse the repository at this point in the history
Fix formatting
  • Loading branch information
dennishendriksen committed Nov 27, 2018
1 parent 377a886 commit 201b737
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ public static MenuItem create(UiMenuItem item) {
List<MenuItem> items = null;
if (item.getType() == UiMenuItemType.MENU) {
UiMenu menu = (UiMenu) item;
items =
menu.getItems()
.stream()
.map(MenuItem::create)
.collect(Collectors.toList());
items = menu.getItems().stream().map(MenuItem::create).collect(Collectors.toList());
}
return new AutoValue_MenuItem(
item.getId(), item.getName(), item.getUrl(), item.getType(), items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
import org.springframework.stereotype.Component;

@Component
@SuppressWarnings({"unused", "common-java:DuplicatedBlocks"}) // Source files should not have any duplicated blocks
@SuppressWarnings({
"unused",
"common-java:DuplicatedBlocks"
}) // Source files should not have any duplicated blocks
public class Icd10ExpanderDecoratorFactory implements DynamicRepositoryDecoratorFactory<Entity> {
private static final String ID = "icd10expander";
private static final String ICD10_ENTITY_TYPE_ID = "icd10EntityTypeId";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
import org.molgenis.data.vcf.VcfFileExtensions;
import org.molgenis.data.vcf.VcfRepository;
import org.molgenis.data.vcf.model.VcfAttributes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.google.common.collect.Iterators;
import com.google.common.collect.SetMultimap;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
Expand All @@ -21,7 +20,6 @@
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.molgenis.data.meta.model.Attribute;
import org.molgenis.data.meta.model.EntityType;
import org.molgenis.data.populate.EntityPopulator;
Expand Down Expand Up @@ -284,21 +282,4 @@ private static List<Attribute> getResolvableAttrs(EntityType entityType, Fetch f
.filter(attr -> fetch.hasField(attr.getName()))
.collect(Collectors.toList());
}

private static class EntityIdIterable implements Iterable<Object> {
private final Iterable<Entity> entities;

EntityIdIterable(Iterable<Entity> entities) {
this.entities = requireNonNull(entities);
}

@Override
public Iterator<Object> iterator() {
return stream().iterator();
}

public Stream<Object> stream() {
return StreamSupport.stream(entities.spliterator(), false).map(Entity::getIdValue);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import org.molgenis.jobs.JobExecutor;
import org.molgenis.script.core.ScriptException;
import org.molgenis.script.core.UnknownScriptException;
import org.molgenis.security.user.UserAccountService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import org.molgenis.data.DataService;
import org.molgenis.data.EntityManager;
import org.molgenis.data.meta.model.AttributeFactory;
import org.molgenis.data.meta.system.SystemPackageRegistry;
import org.molgenis.data.populate.IdGenerator;
import org.molgenis.data.security.permission.PermissionSystemService;
import org.molgenis.js.magma.JsMagmaScriptEvaluator;
import org.molgenis.ontology.core.config.OntologyConfig;
import org.molgenis.ontology.core.repository.OntologyTermRepository;
import org.molgenis.ontology.core.service.OntologyService;
import org.molgenis.semanticmapper.algorithmgenerator.service.AlgorithmGeneratorService;
import org.molgenis.semanticmapper.algorithmgenerator.service.impl.AlgorithmGeneratorServiceImpl;
Expand All @@ -28,7 +26,6 @@
import org.molgenis.semanticmapper.service.impl.AlgorithmTemplateServiceImpl;
import org.molgenis.semanticmapper.service.impl.MappingServiceImpl;
import org.molgenis.semanticmapper.service.impl.UnitResolverImpl;
import org.molgenis.semanticsearch.service.OntologyTagService;
import org.molgenis.semanticsearch.service.SemanticSearchService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,11 @@
import org.molgenis.data.meta.model.EntityType;
import org.molgenis.data.populate.IdGenerator;
import org.molgenis.data.support.DynamicEntity;
import org.molgenis.semanticmapper.controller.MappingServiceController;
import org.molgenis.semanticmapper.mapping.model.AttributeMapping;
import org.molgenis.semanticmapper.mapping.model.EntityMapping;
import org.molgenis.semanticmapper.meta.EntityMappingMetaData;
import org.molgenis.semanticmapper.repository.AttributeMappingRepository;
import org.molgenis.semanticmapper.repository.EntityMappingRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/** O/R mapping between EntityMapping Entity and EntityMapping POJO */
Expand Down

0 comments on commit 201b737

Please sign in to comment.