We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 869b16c commit a0fa7f0Copy full SHA for a0fa7f0
core/src/main/scala/sttp/model/MediaType.scala
@@ -63,7 +63,7 @@ case class MediaType(
63
64
def isModel: Boolean = mainType.equalsIgnoreCase("model")
65
66
- override lazy val toString: String = {
+ private lazy val toStringCache: String = {
67
val sb = new java.lang.StringBuilder(32) // "application/json; charset=utf-8".length == 31 ;)
68
sb.append(mainType).append('/').append(subType)
69
charset match {
@@ -77,6 +77,7 @@ case class MediaType(
77
sb.toString
78
}
79
80
+ override def toString() = toStringCache
81
override lazy val hashCode: Int = toString.toLowerCase.hashCode
82
83
override def equals(that: Any): Boolean =
0 commit comments