Skip to content

Commit 25e2a3d

Browse files
committed
Fix more compiler warnings
1 parent b94b866 commit 25e2a3d

File tree

58 files changed

+34
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+34
-104
lines changed

parser/shared/src/test/scala/hmda/parser/fi/lar/LarDatParserSpec.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,4 @@ class LarDatParserSpec extends PropSpec with MustMatchers with PropertyChecks wi
9898
applicant.income mustBe "9000"
9999
}
100100

101-
private def padLeftWithZero(s: String, n: Int): String = {
102-
String.format("%1$" + n + "s", s).replace(' ', '0')
103-
}
104-
105101
}

persistence-model/src/main/scala/hmda/persistence/processing/HmdaQuery.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import akka.NotUsed
44
import akka.actor.ActorSystem
55
import akka.persistence.query.PersistenceQuery
66
import akka.persistence.query.scaladsl._
7-
import akka.stream.ActorMaterializer
87
import akka.stream.scaladsl.Source
98
import hmda.persistence.PersistenceConfig._
109
import hmda.persistence.messages.CommonMessages._
@@ -21,17 +20,17 @@ object HmdaQuery {
2120
PersistenceQuery(system).readJournalFor[RJ](journalId)
2221
}
2322

24-
def events(persistenceId: String)(implicit system: ActorSystem, materializer: ActorMaterializer): Source[Event, NotUsed] = {
23+
def events(persistenceId: String)(implicit system: ActorSystem): Source[Event, NotUsed] = {
2524
readJournal(system).currentEventsByPersistenceId(persistenceId, 0L, Long.MaxValue)
2625
.map(_.event.asInstanceOf[Event])
2726
}
2827

29-
def liveEvents(persistenceId: String)(implicit system: ActorSystem, materializer: ActorMaterializer): Source[Event, NotUsed] = {
28+
def liveEvents(persistenceId: String)(implicit system: ActorSystem): Source[Event, NotUsed] = {
3029
readJournal(system).eventsByPersistenceId(persistenceId, 0L, Long.MaxValue)
3130
.map(_.event.asInstanceOf[Event])
3231
}
3332

34-
def eventsWithSequenceNumber(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long)(implicit system: ActorSystem, materializer: ActorMaterializer): Source[EventWithSeqNr, NotUsed] = {
33+
def eventsWithSequenceNumber(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long)(implicit system: ActorSystem): Source[EventWithSeqNr, NotUsed] = {
3534
readJournal(system)
3635
.eventsByPersistenceId(persistenceId, fromSequenceNr, toSequenceNr)
3736
.map(x => EventWithSeqNr(x.sequenceNr, x.event.asInstanceOf[Event]))

persistence/src/main/scala/hmda/persistence/HmdaSupervisor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package hmda.persistence
22

3-
import akka.actor.{ ActorRef, ActorSystem, Props, Terminated }
3+
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import hmda.model.fi.SubmissionId
55
import hmda.persistence.institutions.{ FilingPersistence, InstitutionPersistence, SubmissionPersistence }
66
import hmda.persistence.model.HmdaSupervisorActor

persistence/src/test/scala/hmda/persistence/institutions/InstitutionPersistenceSpec.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
package hmda.persistence.institutions
22

3-
import akka.testkit.{ EventFilter, TestProbe }
4-
import hmda.model.institution.Agency.CFPB
5-
import hmda.model.institution.ExternalIdType.{ FederalTaxId, RssdId, UndeterminedExternalId }
6-
import hmda.model.institution.InstitutionType.Bank
7-
import hmda.model.institution._
3+
import akka.testkit.TestProbe
84
import hmda.persistence.demo.DemoData
95
import hmda.persistence.institutions.InstitutionPersistence._
106
import hmda.persistence.messages.CommonMessages.GetState

persistence/src/test/scala/hmda/persistence/institutions/SubmissionPersistenceSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package hmda.persistence.institutions
22

3-
import akka.testkit.{ EventFilter, TestProbe }
3+
import akka.testkit.TestProbe
44
import hmda.model.fi._
55
import hmda.persistence.messages.CommonMessages.GetState
66
import hmda.persistence.demo.DemoData

persistence/src/test/scala/hmda/persistence/processing/HmdaFileValidatorSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package hmda.persistence.processing
22

3-
import akka.actor.{ ActorRef, ActorSystem }
3+
import akka.actor.ActorRef
44
import akka.testkit.TestProbe
55
import com.typesafe.config.ConfigFactory
66
import hmda.model.fi.SubmissionId

persistence/src/test/scala/hmda/persistence/processing/HmdaFilingSpec.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import hmda.persistence.messages.CommonMessages.GetState
77
import hmda.persistence.messages.events.processing.CommonHmdaValidatorEvents.LarValidated
88
import hmda.persistence.model.ActorSpec
99
import hmda.persistence.processing.HmdaFiling._
10-
import hmda.persistence.processing.HmdaFileValidator._
1110

1211
class HmdaFilingSpec extends ActorSpec with LarGenerators {
1312

query/src/main/scala/hmda/query/HmdaQuerySupervisor.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package hmda.query
33
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import akka.pattern.ask
55
import akka.util.Timeout
6-
import com.typesafe.config.ConfigFactory
76
import hmda.persistence.model.HmdaSupervisorActor
87
import hmda.query.projections.filing.HmdaFilingDBProjection.CreateSchema
98
import hmda.query.view.filing.HmdaFilingView

query/src/main/scala/hmda/query/repository/filing/FilingCassandraRepository.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package hmda.query.repository.filing
22

33
import akka.{ Done, NotUsed }
4-
import akka.stream.alpakka.cassandra.scaladsl.{ CassandraSink, CassandraSource }
5-
import akka.stream.scaladsl.{ Flow, Sink, Source }
4+
import akka.stream.alpakka.cassandra.scaladsl.CassandraSink
5+
import akka.stream.scaladsl.{ Flow, Source }
66
import com.datastax.driver.core._
77
import hmda.query.model.filing.LoanApplicationRegisterQuery
88
import hmda.query.projections.ProjectionRuntime

query/src/main/scala/hmda/query/repository/filing/FilingComponent.scala

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
package hmda.query.repository.filing
22

33
import akka.NotUsed
4-
import akka.actor.ActorSystem
5-
import akka.stream.ActorMaterializer
6-
import akka.stream.scaladsl.{ Sink, Source }
4+
import akka.stream.scaladsl.Source
75
import com.typesafe.config.ConfigFactory
8-
import hmda.model.fi.SubmissionId
96
import hmda.query.DbConfiguration._
10-
import hmda.query.model.filing.{ LoanApplicationRegisterQuery, LoanApplicationRegisterTotal, ModifiedLoanApplicationRegister }
7+
import hmda.query.model.filing.{ LoanApplicationRegisterQuery, ModifiedLoanApplicationRegister }
118
import hmda.query.repository.{ Repository, TableRepository }
129
import slick.basic.{ DatabaseConfig, DatabasePublisher }
1310
import slick.jdbc.JdbcProfile
1411
import slick.collection.heterogeneous._
1512
import slick.collection.heterogeneous.syntax._
1613

17-
import scala.concurrent.{ ExecutionContext, Future }
18-
import scala.util.Try
19-
2014
trait FilingComponent {
2115
import config.profile.api._
2216

@@ -621,14 +615,14 @@ trait FilingComponent {
621615

622616
def findByInstitutionId(instId: String) = db.run(table.filter(_.institutionId === instId).result)
623617

624-
private def findByInstitutionIdStream(instId: String, period: String)(implicit ec: ExecutionContext): DatabasePublisher[ModifiedLoanApplicationRegister] = {
618+
private def findByInstitutionIdStream(instId: String, period: String): DatabasePublisher[ModifiedLoanApplicationRegister] = {
625619
val disableAutocommit = SimpleDBIO(_.connection.setAutoCommit(false))
626620
val query = table.filter(x => x.institutionId === instId && x.period === period)
627621
val action = query.result.withStatementParameters(fetchSize = queryFetchSize)
628622
db.stream(disableAutocommit andThen action)
629623
}
630624

631-
def findByInstitutionIdSource(instId: String, period: String)(implicit ec: ExecutionContext): Source[ModifiedLoanApplicationRegister, NotUsed] =
625+
def findByInstitutionIdSource(instId: String, period: String): Source[ModifiedLoanApplicationRegister, NotUsed] =
632626
Source.fromPublisher(findByInstitutionIdStream(instId, period))
633627
}
634628

0 commit comments

Comments
 (0)