diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml index cf3326a..b2b0843 100644 --- a/.github/workflows/checkstyle.yml +++ b/.github/workflows/checkstyle.yml @@ -1,21 +1,16 @@ +# Copyright 2024 shoothzj # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: checkstyle on: diff --git a/.github/workflows/line_lint.yml b/.github/workflows/line_lint.yml index e2d2f89..519b5f9 100644 --- a/.github/workflows/line_lint.yml +++ b/.github/workflows/line_lint.yml @@ -1,21 +1,16 @@ +# Copyright 2024 shoothzj # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: line lint on: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d34bc4..6289785 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,21 +1,16 @@ +# Copyright 2024 shoothzj # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: Release diff --git a/.github/workflows/spotbugs.yml b/.github/workflows/spotbugs.yml index 1861075..2e8aa64 100644 --- a/.github/workflows/spotbugs.yml +++ b/.github/workflows/spotbugs.yml @@ -1,21 +1,16 @@ +# Copyright 2024 shoothzj # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: spot bugs on: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 76750ed..6df5311 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -1,21 +1,16 @@ +# Copyright 2024 shoothzj # -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. name: unit tests on: diff --git a/ci/checkstyle/checkstyle.xml b/ci/checkstyle/checkstyle.xml index f5f7dc9..55c1a5b 100644 --- a/ci/checkstyle/checkstyle.xml +++ b/ci/checkstyle/checkstyle.xml @@ -1,22 +1,19 @@ + + + + diff --git a/netty-codec-cmpp/pom.xml b/netty-codec-cmpp/pom.xml index 88eae92..b0072ad 100644 --- a/netty-codec-cmpp/pom.xml +++ b/netty-codec-cmpp/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 netty-codec-cmpp diff --git a/netty-codec-cngp/pom.xml b/netty-codec-cngp/pom.xml index 00223d2..3516d26 100644 --- a/netty-codec-cngp/pom.xml +++ b/netty-codec-cngp/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 netty-codec-cngp diff --git a/netty-codec-sgip/pom.xml b/netty-codec-sgip/pom.xml index fcdc2cd..e382c51 100644 --- a/netty-codec-sgip/pom.xml +++ b/netty-codec-sgip/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 netty-codec-sgip diff --git a/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipConst.java b/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipConst.java index 725abfc..b66ca32 100644 --- a/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipConst.java +++ b/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipConst.java @@ -101,7 +101,9 @@ public class SgipConst { public static final int LEN_BIND_RESP_RESERVE = 8; - public static final int LEN_BIND_RESP_MSG = 9; + public static final int LEN_BIND_RESP_BODY = 9; + + public static final int LEN_BIND_RESP_MSG = 25; public static final int LEN_DELIVER_MSG = SgipConst.LEN_HEADER + 16; diff --git a/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipEncoder.java b/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipEncoder.java index e779122..a3a30f1 100644 --- a/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipEncoder.java +++ b/netty-codec-sgip/src/main/java/io/github/protocol/codec/sgip/SgipEncoder.java @@ -84,13 +84,12 @@ private ByteBuf encodeBind(ChannelHandlerContext ctx, SgipBind message) { private ByteBuf encodeBindResp(ChannelHandlerContext ctx, SgipBindResp message) { ByteBuf buf = ctx.alloc().buffer(SgipConst.LEN_BIND_RESP_MSG); - writeHeader(buf, message.header(), SgipConst.LEN_BIND_MSG); + writeHeader(buf, message.header(), SgipConst.LEN_BIND_RESP_MSG); buf.writeByte(message.body().result()); writeString(buf, message.body().reserve(), SgipConst.LEN_BIND_RESP_RESERVE); return buf; } - private ByteBuf encodeSubmit(ChannelHandlerContext ctx, SgipSubmit message) { int bodyLen = submitBodyLen(message.body()); ByteBuf buf = ctx.alloc().buffer(bodyLen); diff --git a/netty-codec-sgip/src/test/java/io/github/protocol/codec/sgip/SgipBindRespTest.java b/netty-codec-sgip/src/test/java/io/github/protocol/codec/sgip/SgipBindRespTest.java index ebd7ef5..f59cd08 100644 --- a/netty-codec-sgip/src/test/java/io/github/protocol/codec/sgip/SgipBindRespTest.java +++ b/netty-codec-sgip/src/test/java/io/github/protocol/codec/sgip/SgipBindRespTest.java @@ -32,7 +32,7 @@ public class SgipBindRespTest { @Test public void case1() { - SgipHeader header = new SgipHeader(SgipConst.LEN_BIND_RESP_MSG, SgipConst.BIND_RESP_ID, 112345678L); + SgipHeader header = new SgipHeader(SgipConst.LEN_BIND_RESP_BODY, SgipConst.BIND_RESP_ID, 112345678L); ChannelHandlerContext ctx = Mockito.mock(ChannelHandlerContext.class); Mockito.when(ctx.alloc()).thenReturn(ByteBufAllocator.DEFAULT); SgipBindRespBody body = new SgipBindRespBody((byte) 1, "reserve"); diff --git a/netty-codec-smgp/pom.xml b/netty-codec-smgp/pom.xml index e128755..10fbe42 100644 --- a/netty-codec-smgp/pom.xml +++ b/netty-codec-smgp/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 netty-codec-smgp diff --git a/netty-codec-smpp/pom.xml b/netty-codec-smpp/pom.xml index f0c1440..d889020 100644 --- a/netty-codec-smpp/pom.xml +++ b/netty-codec-smpp/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 netty-codec-smpp diff --git a/pom.xml b/pom.xml index 8be646b..947afb0 100644 --- a/pom.xml +++ b/pom.xml @@ -1,22 +1,19 @@ io.github.protocol-laboratory netty-codec-sms - 0.0.11 + 0.0.12 pom netty-codec-cmpp @@ -42,16 +39,17 @@ UTF-8 src/main/java - 5.9.2 + 5.10.2 2.20.0 - 5.3.1 - 4.1.93.Final + 5.11.0 + 4.1.107.Final + 10.14.0 - 3.10.1 - 3.2.0 - 10.12.0 - 4.7.2.0 - 3.1.0 + 3.11.0 + 3.3.1 + 3.6.0 + 3.2.1 + 4.8.3.1 @@ -97,7 +95,7 @@ org.apache.maven.plugins maven-compiler-plugin - ${compiler-plugin.version} + ${maven-compiler-plugin.version} ${maven.compiler.source} ${maven.compiler.target} @@ -106,12 +104,12 @@ org.apache.maven.plugins maven-surefire-plugin - ${surefire-plugin.version} + ${maven-surefire-plugin.version} org.apache.maven.plugins maven-checkstyle-plugin - ${checkstyle-plugin.version} + ${maven-checkstyle-plugin.version} com.puppycrawl.tools @@ -165,7 +163,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.1 + ${maven-javadoc-plugin.version} ${src.dir} all,-missing