Skip to content

Commit c870354

Browse files
authored
drop scala 2.11 and remove paranamer dependency (#707)
1 parent ce98a6a commit c870354

File tree

3 files changed

+6
-29
lines changed

3 files changed

+6
-29
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
scala: [2.11.12, 2.12.20, 2.13.16, 3.3.5]
25+
scala: [2.12.20, 2.13.16, 3.3.5]
2626
java: [zulu@17, zulu@21]
2727
runs-on: ${{ matrix.os }}
2828
steps:
@@ -100,16 +100,6 @@ jobs:
100100
- name: Setup sbt
101101
uses: sbt/setup-sbt@v1
102102

103-
- name: Download target directories (2.11.12)
104-
uses: actions/download-artifact@v4
105-
with:
106-
name: target-${{ matrix.os }}-2.11.12-${{ matrix.java }}
107-
108-
- name: Inflate target directories (2.11.12)
109-
run: |
110-
tar xf targets.tar
111-
rm targets.tar
112-
113103
- name: Download target directories (2.12.20)
114104
uses: actions/download-artifact@v4
115105
with:

build.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ThisBuild / version := "3.0.0-rc1-SNAPSHOT"
1111
val scala213Version = "2.13.16"
1212
ThisBuild / scalaVersion := scala213Version
1313

14-
ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.20", scala213Version, "3.3.5")
14+
ThisBuild / crossScalaVersions := Seq("2.12.20", scala213Version, "3.3.5")
1515

1616
sonatypeCredentialHost := "s01.oss.sonatype.org"
1717
sonatypeRepository := "s01.oss.sonatype.org"
@@ -110,14 +110,13 @@ Test / unmanagedSourceDirectories ++= {
110110
libraryDependencies ++= Seq(
111111
"tools.jackson.core" % "jackson-core" % jacksonVersion changing(),
112112
"tools.jackson.core" % "jackson-databind" % jacksonVersion changing(),
113-
"com.thoughtworks.paranamer" % "paranamer" % "2.8",
114113
"tools.jackson.datatype" % "jackson-datatype-joda" % jacksonVersion % Test changing(),
115114
"tools.jackson.datatype" % "jackson-datatype-guava" % jacksonVersion % Test changing(),
116115
"org.scala-lang.modules" %% "scala-java8-compat" % "1.0.2" % Test,
117116
"tools.jackson.jaxrs" % "jackson-jaxrs-json-provider" % jacksonVersion % Test changing(),
118117
"javax.ws.rs" % "javax.ws.rs-api" % "2.1.1" % Test,
119118
"io.swagger" % "swagger-core" % "1.6.8" % Test,
120-
"org.scalatest" %% "scalatest" % "3.2.18" % Test
119+
"org.scalatest" %% "scalatest" % "3.2.19" % Test
121120
)
122121

123122
// build.properties
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
11
package tools.jackson.module.scala.introspect
22

3-
import com.thoughtworks.paranamer.{BytecodeReadingParanamer, CachingParanamer}
4-
53
import java.lang.reflect.{Constructor, Field, Method, Parameter}
6-
import scala.util.Try
74

85
private[introspect] object JavaParameterIntrospector {
96

10-
private val paranamer = new CachingParanamer(new BytecodeReadingParanamer)
11-
127
def getCtorParamNames(ctor: Constructor[_]): IndexedSeq[String] = {
13-
Try(paranamer.lookupParameterNames(ctor, false))
14-
.getOrElse(ctor.getParameters.map(_.getName))
15-
.toIndexedSeq
8+
ctor.getParameters.map(_.getName).toIndexedSeq
169
}
1710

1811
def getMethodParamNames(mtd: Method): IndexedSeq[String] = {
19-
Try(paranamer.lookupParameterNames(mtd, false))
20-
.getOrElse(mtd.getParameters.map(_.getName))
21-
.toIndexedSeq
12+
mtd.getParameters.map(_.getName).toIndexedSeq
2213
}
2314

24-
def getFieldName(field: Field): String = {
25-
Try(paranamer.lookupParameterNames(field, false).headOption.getOrElse(None.orNull))
26-
.getOrElse(field.getName)
27-
}
15+
def getFieldName(field: Field): String = field.getName
2816

2917
def getParameterName(parameter: Parameter): String = parameter.getName
3018
}

0 commit comments

Comments
 (0)