Skip to content

Commit

Permalink
Add return type where asked by compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
iilyak committed Jan 29, 2024
1 parent 028f685 commit 22d7615
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class ClouseauQueryParser(version: Version,
fpRegex.matcher(str).matches()
}

private def setLowercaseExpandedTerms(field: String) = {
private def setLowercaseExpandedTerms(field: String): Unit = {
getAnalyzer match {
case a: PerFieldAnalyzer =>
setLowercaseExpandedTerms(a.getWrappedAnalyzer(field))
Expand All @@ -116,7 +116,7 @@ class ClouseauQueryParser(version: Version,
}
}

private def setLowercaseExpandedTerms(analyzer: Analyzer) = {
private def setLowercaseExpandedTerms(analyzer: Analyzer): Unit = {
setLowercaseExpandedTerms(!analyzer.isInstanceOf[KeywordAnalyzer])
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class IndexCleanupService(ctx: ServiceContext[ConfigurationArgs]) extends Servic
cleanup(rootDir, pattern, activeSigs)
}

private def cleanup(fileOrDir: File, includePattern: Pattern, activeSigs: List[String]) = {
private def cleanup(fileOrDir: File, includePattern: Pattern, activeSigs: List[String]): Unit = {
if (!fileOrDir.isDirectory) {
return
}
Expand All @@ -71,7 +71,7 @@ class IndexCleanupService(ctx: ServiceContext[ConfigurationArgs]) extends Servic
}
}

private def recursivelyDelete(fileOrDir: File, deleteDir: Boolean) = {
private def recursivelyDelete(fileOrDir: File, deleteDir: Boolean): Unit = {
if (fileOrDir.isDirectory) {
for (file <- fileOrDir.listFiles)
recursivelyDelete(file, deleteDir)
Expand All @@ -82,7 +82,7 @@ class IndexCleanupService(ctx: ServiceContext[ConfigurationArgs]) extends Servic
fileOrDir.delete
}

private def rename(srcDir: File, destDir: File) = {
private def rename(srcDir: File, destDir: File): Unit = {
if (!srcDir.isDirectory) {
return
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/cloudant/clouseau/QueryExplainer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object QueryExplainer {
builder.toString
}

private def planBooleanQuery(builder: StringBuilder, query: BooleanQuery) = {
private def planBooleanQuery(builder: StringBuilder, query: BooleanQuery): Unit = {
for (clause <- query.getClauses) {
builder.append(clause.getOccur)
explain(builder, clause.getQuery)
Expand Down

0 comments on commit 22d7615

Please sign in to comment.