From 56d8ee90328500a9450f1f3e702c2d48037b2531 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 4 Nov 2023 14:28:26 +0000 Subject: [PATCH 1/4] Remove redundant field from `Cidr.Strict` --- shared/src/main/scala/com/comcast/ip4s/Cidr.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala index 367d637..1bb196d 100644 --- a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala +++ b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala @@ -138,9 +138,10 @@ object Cidr { * This means the address will never have any bits set outside the prefix. For example, a range * such as 192.168.0.1/31 is not allowed. */ - final class Strict[+A <: IpAddress] private (override val prefix: A, prefixBits: Int) + final class Strict[+A <: IpAddress] private (prefix: A, prefixBits: Int) extends Cidr[A](prefix, prefixBits) { override def normalized: this.type = this + override def prefix = address } object Strict { From b4b39e670585897bc577568df88008ec651a8a01 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 4 Nov 2023 14:29:05 +0000 Subject: [PATCH 2/4] Bump base version --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 2247f4d..f2985b5 100644 --- a/build.sbt +++ b/build.sbt @@ -1,6 +1,6 @@ import com.typesafe.tools.mima.core._ -ThisBuild / tlBaseVersion := "3.3" +ThisBuild / tlBaseVersion := "3.4" ThisBuild / organization := "com.comcast" ThisBuild / organizationName := "Comcast Cable Communications Management, LLC" From 83687168ad233ae3e3ee3720b859d46cde13c2a6 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 4 Nov 2023 14:31:43 +0000 Subject: [PATCH 3/4] Fix naming clash --- shared/src/main/scala/com/comcast/ip4s/Cidr.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala index 1bb196d..8d7700b 100644 --- a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala +++ b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala @@ -138,8 +138,8 @@ object Cidr { * This means the address will never have any bits set outside the prefix. For example, a range * such as 192.168.0.1/31 is not allowed. */ - final class Strict[+A <: IpAddress] private (prefix: A, prefixBits: Int) - extends Cidr[A](prefix, prefixBits) { + final class Strict[+A <: IpAddress] private (address: A, prefixBits: Int) + extends Cidr[A](address, prefixBits) { override def normalized: this.type = this override def prefix = address } From ea468f5644a4f59b8702c5fd9ad57fd331c94769 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 4 Nov 2023 14:33:34 +0000 Subject: [PATCH 4/4] Formatting --- shared/src/main/scala/com/comcast/ip4s/Cidr.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala index 8d7700b..ff80c8c 100644 --- a/shared/src/main/scala/com/comcast/ip4s/Cidr.scala +++ b/shared/src/main/scala/com/comcast/ip4s/Cidr.scala @@ -138,8 +138,7 @@ object Cidr { * This means the address will never have any bits set outside the prefix. For example, a range * such as 192.168.0.1/31 is not allowed. */ - final class Strict[+A <: IpAddress] private (address: A, prefixBits: Int) - extends Cidr[A](address, prefixBits) { + final class Strict[+A <: IpAddress] private (address: A, prefixBits: Int) extends Cidr[A](address, prefixBits) { override def normalized: this.type = this override def prefix = address }