Преглед на файлове

fix license number under 100

herlanS_ преди 3 години
родител
ревизия
f59446df6b
променени са 2 файла, в които са добавени 8 реда и са изтрити 1 реда
  1. 6 0
      pom.xml
  2. 2 1
      src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/BridgeFIlter.kt

+ 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)