Skip to content

Commit

Permalink
#330 Replace deprecated StrSubstitutor class with StringSubstitutor c…
Browse files Browse the repository at this point in the history
…lass in Apache Commons Text to avoid deprecation warnings.
  • Loading branch information
PVGeorgievPrime committed Jun 26, 2024
1 parent 5fa382a commit 78e7f95
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package com.primeholding.rxbloc_generator_plugin.generator

import com.google.common.io.CharStreams
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.InputStreamReader
import java.lang.RuntimeException

Expand Down Expand Up @@ -55,7 +55,7 @@ abstract class RxBlocGeneratorBase(
}

override fun generate(): String {
val substitute = StrSubstitutor(templateValues)
val substitute = StringSubstitutor(templateValues)
return substitute.replace(templateString)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package com.primeholding.rxbloc_generator_plugin.generator

import com.google.common.io.CharStreams
import com.primeholding.rxbloc_generator_plugin.action.GenerateRxBlocDialog.RoutingIntegration
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.InputStreamReader
import java.lang.RuntimeException

Expand Down Expand Up @@ -49,7 +49,7 @@ abstract class RxDependenciesGeneratorBase(
}

override fun generate(): String {
val substitute = StrSubstitutor(templateValues)
val substitute = StringSubstitutor(templateValues)
var result = substitute.replace(templateString)
if (includeLocalServiceFlag) {
result = result.replace("// ", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
package com.primeholding.rxbloc_generator_plugin.generator

import com.google.common.io.CharStreams
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.InputStreamReader
import java.lang.RuntimeException

Expand Down Expand Up @@ -34,7 +34,7 @@ abstract class RxListBlocGeneratorBase(
}

override fun generate(): String {
val substitutor = StrSubstitutor(templateValues)
val substitutor = StringSubstitutor(templateValues)
return substitutor.replace(templateString)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package com.primeholding.rxbloc_generator_plugin.generator

import com.google.common.io.CharStreams
import com.primeholding.rxbloc_generator_plugin.action.GenerateRxBlocDialog
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.InputStreamReader
import java.lang.RuntimeException

Expand Down Expand Up @@ -45,7 +45,7 @@ abstract class RxPageGeneratorBase(
}

override fun generate(): String {
val substitutor = StrSubstitutor(templateValues)
val substitutor = StringSubstitutor(templateValues)
return substitutor.replace(templateString)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.google.common.io.CharStreams
import com.intellij.openapi.vfs.VirtualFile
import com.primeholding.rxbloc_generator_plugin.generator.parser.TestableClass
import com.primeholding.rxbloc_generator_plugin.generator.parser.Utils
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.File
import java.io.InputStreamReader
import java.lang.RuntimeException
Expand Down Expand Up @@ -420,7 +420,7 @@ abstract class RxTestGeneratorBase(
}

override fun generate(): String {
val substitutor = StrSubstitutor(templateValues)
val substitutor = StringSubstitutor(templateValues)
return substitutor.replace(templateString)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package com.primeholding.rxbloc_generator_plugin.generator.components
import com.google.common.io.CharStreams
import com.primeholding.rxbloc_generator_plugin.generator.RxBlocGeneratorBase
import com.primeholding.rxbloc_generator_plugin.generator.RxGeneratorBase
import org.apache.commons.lang.text.StrSubstitutor
import org.apache.commons.text.StringSubstitutor
import java.io.InputStreamReader
import java.lang.RuntimeException

Expand Down Expand Up @@ -39,7 +39,7 @@ class RxBlocWithServiceGenerator(
override fun contextDirectoryName(): String = "services"

override fun generate(): String {
val substitute = StrSubstitutor(templateValues)
val substitute = StringSubstitutor(templateValues)
return substitute.replace(templateString)
}
}

0 comments on commit 78e7f95

Please sign in to comment.