File tree Expand file tree Collapse file tree 8 files changed +19
-2
lines changed
main/scala/com/avsystem/commons/spring
test/scala/com/avsystem/commons/spring Expand file tree Collapse file tree 8 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 4040* ` commons-hocon ` - Utilities for working with [ HOCON] ( https://github.com/lightbend/config/blob/master/HOCON.md )
4141 * ` HoconInput ` - an ` Input ` implementation for ` GenCodec ` that can read Lightbend Config (` com.typesafe.config.Config ` )
4242 * An AST (` HTree ` ) and a lexer/parser for HOCON (` HLexer ` , ` HParser ` )
43- * ` commons-spring ` - Spring framework utilities:
43+ * ` commons-spring ` (DEPRECATED) - Spring framework utilities:
4444 * ` HoconBeanDefinitionReader ` - an utility that allows you to define Spring application context using
4545 [ HOCON] ( https://github.com/lightbend/config/blob/master/HOCON.md ) format
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition
66
77/** Created: 17-03-2014 Author: ghik
88 */
9+ @ deprecated(spring.DeprecatedMessage , spring.DeprecatedSince )
910object AttrNames {
1011 final val AbstractAttr = " %abstract"
1112 final val ArgTypesAttr = " %arg-types"
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import org.springframework.core.io.Resource
1313import java .{util => ju }
1414import scala .annotation .nowarn
1515
16+ @ deprecated(spring.DeprecatedMessage , spring.DeprecatedSince )
1617class HoconBeanDefinitionReader (registry : BeanDefinitionRegistry ) extends AbstractBeanDefinitionReader (registry) {
1718
1819 import com .avsystem .commons .spring .HoconBeanDefinitionReader .Keys ._
Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ package com.avsystem.commons
22package spring
33
44import com .typesafe .config ._
5+ import scala .annotation .nowarn
56
7+ @ deprecated(spring.DeprecatedMessage , spring.DeprecatedSince )
68trait HoconType [T ] {
79
810 protected def requireNonNull (value : ConfigValue ): ConfigValue = {
@@ -21,6 +23,7 @@ trait HoconType[T] {
2123 def get (value : ConfigValue ): T
2224}
2325
26+ @ nowarn(" msg=deprecated" )
2427object HoconType {
2528
2629 import com .typesafe .config .ConfigValueType ._
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import scala.annotation.tailrec
1111import scala .beans .BeanProperty
1212import scala .reflect .{ScalaLongSignature , ScalaSignature }
1313
14+ @ deprecated(spring.DeprecatedMessage , spring.DeprecatedSince )
1415class ScalaDefaultValuesInjector extends BeanDefinitionRegistryPostProcessor {
1516 @ BeanProperty var paramNameDiscoverer : ParameterNameDiscoverer =
1617 new StandardReflectionParameterNameDiscoverer
Original file line number Diff line number Diff line change 1+ package com .avsystem .commons
2+
3+ package object spring {
4+ private [spring] final val DeprecatedMessage = " spring module is deprecated and it is going to be removed"
5+ private [spring] final val DeprecatedSince = " 2.27.0"
6+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory
88import org .springframework .context .support .GenericApplicationContext
99import org .springframework .core .StandardReflectionParameterNameDiscoverer
1010
11- import java .{util => ju }
11+ import java .util as ju
12+ import scala .annotation .nowarn
1213import scala .beans .BeanProperty
1314
1415class TestBean (val constrInt : Int = 1 , val constrString : String = " constrDefault" ) {
@@ -35,6 +36,7 @@ object ConditionalTestBean {
3536 var initializedCount = 0
3637}
3738
39+ @ nowarn(" msg=deprecated" )
3840class HoconBeanDefinitionReaderTest extends AnyFunSuite with BeforeAndAfterEach {
3941 def createContext (resource : String ): GenericApplicationContext = {
4042 val beanFactory = new DefaultListableBeanFactory
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ package spring
44import com .typesafe .config .ConfigFactory
55import org .springframework .context .support .GenericApplicationContext
66
7+ import scala .annotation .nowarn
8+
9+ @ nowarn(" msg=deprecated" )
710object XmlPlayground {
811 def main (args : Array [String ]): Unit = {
912 val ctx = new GenericApplicationContext
You can’t perform that action at this time.
0 commit comments