Skip to content

Commit

Permalink
Fix or suppress build warnings (molgenis#8828)
Browse files Browse the repository at this point in the history
* Fix/suppress generics warnings

* remove test-jar from pom, since no test code exists in this module
  • Loading branch information
bartcharbon authored and dennishendriksen committed Jan 7, 2020
1 parent 83f2164 commit e6ae33b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ private TypePermissionsResponse convertToTypeResponse(
}

private Set<PermissionResponse> convertToPermissions(Set<LabelledPermission> permissions) {
LinkedHashSet<PermissionResponse> result = new LinkedHashSet();
LinkedHashSet<PermissionResponse> result = new LinkedHashSet<>();
permissions.stream()
.map(
labelledPermission ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public Query<Entity> transformQuery(
return query;
}

@SuppressWarnings("unchecked")
private void transformQueryRule(QueryRule rule, String icd10EntityTypeId) {
List<Object> queryValues;

Expand All @@ -52,7 +53,6 @@ private void transformQueryRule(QueryRule rule, String icd10EntityTypeId) {
rule.setOperator(QueryRule.Operator.IN);
break;
case IN:
//noinspection unchecked
queryValues = (List<Object>) rule.getValue();
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public Icd10ExpanderDecoratorFactory(Gson gson, CollectionsQueryTransformer quer

@Override
@SuppressWarnings("unchecked")
public Repository createDecoratedRepository(
public Repository<Entity> createDecoratedRepository(
Repository<Entity> repository, Map<String, Object> parameters) {
return new Icd10ExpanderDecorator(
repository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class AttributeMapper {
public static final ImmutableMap<String, String> ATTRIBUTE_ATTRS;

static {
Builder builder =
Builder<String, String> builder =
ImmutableMap.<String, String>builder()
.put(EMX_ATTRIBUTES_NAME, AttributeMetadata.NAME)
.put(EMX_ATTRIBUTES_LABEL, AttributeMetadata.LABEL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class EntityTypeMapper {
public static final ImmutableMap<String, String> ENTITIES_ATTRS;

static {
Builder builder =
Builder<String, String> builder =
ImmutableMap.<String, String>builder()
.put(EMX_ENTITIES_NAME, EntityTypeMetadata.ID)
.put(EMX_ENTITIES_PACKAGE, EntityTypeMetadata.PACKAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public OwnershipDecoratorFactory(Gson gson, MutableAclService mutableAclService)

@Override
@SuppressWarnings("unchecked")
public Repository createDecoratedRepository(
public Repository<Entity> createDecoratedRepository(
Repository<Entity> repository, Map<String, Object> parameters) {
String ownerAttribute = parameters.get(OWNER_ATTRIBUTE).toString();
return new OwnershipDecorator(repository, mutableAclService, ownerAttribute);
Expand Down
16 changes: 0 additions & 16 deletions molgenis-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@
<sonar.skip>true</sonar.skip>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down

0 comments on commit e6ae33b

Please sign in to comment.