Skip to content

Commit

Permalink
#2379 minor fixes and code cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjamakeev committed Apr 9, 2018
1 parent 89d6dc6 commit b985465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@


/**
* Environment metadata manager
**/
public class EnvironmentMetadataManagerImpl implements EnvironmentMetadataManager
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,11 @@ public SourceMeta getSource()
}


public List<Meta> getAllMeta()
{
return this.items;
}


public List<CustomMeta> getCustomMetaByKey( String key )
{
final List<CustomMeta> result =
this.items.stream().filter( m -> m instanceof CustomMeta ).map( CustomMeta.class::cast )
.filter( m -> m.getKey().equals( key ) ).collect( Collectors.toList() );
getMetaByObjectClass( CustomMeta.class ).stream().filter( m -> m.getKey().equals( key ) )
.collect( Collectors.toList() );
return result;
}

Expand All @@ -80,7 +74,7 @@ private <T extends Meta> List<T> getMetaByObjectClass( Class<T> objectClass )
}


public void addMeta( final Meta meta )
void addMeta( final Meta meta )
{
Preconditions.checkNotNull( meta );
this.items.add( meta );
Expand Down

0 comments on commit b985465

Please sign in to comment.