Pārlūkot izejas kodu

fix license number under 100

herlanS_ 3 gadi atpakaļ
vecāks
revīzija
f59446df6b

+ 6 - 0
pom.xml

@@ -81,6 +81,12 @@
 			<artifactId>commons-io</artifactId>
 			<version>2.6</version>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>3.12.0</version>
+		</dependency>
+
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-test</artifactId>

+ 2 - 1
src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/BridgeFIlter.kt

@@ -2,6 +2,7 @@ package co.id.datacomsolusindo.ipphonebridge
 
 import com.fasterxml.jackson.databind.ObjectMapper
 import com.fasterxml.jackson.databind.ObjectWriter
+import org.apache.commons.lang3.StringUtils
 import org.apache.logging.log4j.LogManager
 import org.springframework.core.Ordered
 import org.springframework.core.annotation.Order
@@ -102,7 +103,7 @@ class BridgeFilter(private val template: SimpMessagingTemplate, val resourceLoad
                     val partStr = ow.writeValueAsString(rb).chunked(chunkSize)
                     val partialID = UUID.randomUUID().toString()
                     val st2 = System.nanoTime()
-                    if (!ClientHolder.get().containsKey(clientNumber.toString())) {
+                    if (!ClientHolder.get().containsKey(StringUtils.leftPad(clientNumber.toString(), 3, '0'))) {
 //                        subscribeGW /topic/request/reqID
 //                        sendGW "/app/partial/$client"
                         chain.doFilter(request, response)