Skip to content

Commit

Permalink
Servlet 4 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
rossabaker committed Jun 19, 2022
1 parent 3157d46 commit 5ed2b7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / tlBaseVersion := "0.23" // your current series x.y
ThisBuild / tlBaseVersion := "0.24" // your current series x.y
ThisBuild / tlMimaPreviousVersions ++= (0 to 11).map(y => s"0.23.$y").toSet

ThisBuild / licenses := Seq(License.Apache2)
Expand All @@ -16,9 +16,9 @@ ThisBuild / scalaVersion := Scala213 // the default Scala

val asyncHttpClientVersion = "2.12.3"
val http4sVersion = "0.23.12"
val http4sServletVersion = "0.23.11"
val http4sServletVersion = "0.24.0-M1"
val munitCatsEffectVersion = "1.0.7"
val servletApiVersion = "3.1.0"
val servletApiVersion = "4.0.1"
val tomcatVersion = "9.0.64"

lazy val root = project
Expand Down
6 changes: 3 additions & 3 deletions examples/src/main/scala/com/example/TomcatExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ package com.example
import cats.effect._
import org.http4s._
import org.http4s.server.Server
import org.http4s.servlet.DefaultFilter
import org.http4s.tomcat.server.TomcatBuilder

import javax.servlet.FilterChain
import javax.servlet.http.HttpFilter
import javax.servlet.http.HttpServlet
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
Expand Down Expand Up @@ -53,8 +53,8 @@ class TomcatExample[F[_]](implicit F: Async[F]) {
}

// Also supports raw filters alongside your http4s routes
val filter: DefaultFilter = new DefaultFilter {
override def doHttpFilter(
val filter: HttpFilter = new HttpFilter {
override protected def doFilter(
request: HttpServletRequest,
response: HttpServletResponse,
chain: FilterChain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import java.net.InetSocketAddress
import java.util
import java.util.concurrent.Executor
import javax.servlet.DispatcherType
import javax.servlet.Filter
import javax.servlet.http.HttpFilter
import javax.servlet.http.HttpServlet
import scala.collection.immutable
import scala.concurrent.duration._
Expand Down Expand Up @@ -132,7 +132,7 @@ sealed class TomcatBuilder[F[_]] private (
})

override def mountFilter(
filter: Filter,
filter: HttpFilter,
urlMapping: String,
name: Option[String],
dispatches: util.EnumSet[DispatcherType],
Expand Down

0 comments on commit 5ed2b7f

Please sign in to comment.