You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2011/09/07 06:19:53 UTC

svn commit: r1165993 - in /camel/branches/camel-2.8.x: ./ components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java

Author: ningjiang
Date: Wed Sep  7 04:19:53 2011
New Revision: 1165993

URL: http://svn.apache.org/viewvc?rev=1165993&view=rev
Log:
Merged revisions 1165987 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1165987 | ningjiang | 2011-09-07 11:27:35 +0800 (Wed, 07 Sep 2011) | 1 line
  
  CAMEL-4422 Fixed the NPE issue of camel-smpp when sending the message length is less then 255
........

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Sep  7 04:19:53 2011
@@ -1 +1 @@
-/camel/trunk:1148706,1148710,1149570,1150651,1151000,1151054,1151087,1151362,1152170,1152755,1153620,1153812,1153829,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157749,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395,1163420,1164557,1164633,1164973-1165000,1165152,1165157,1165971
+/camel/trunk:1148706,1148710,1149570,1150651,1151000,1151054,1151087,1151362,1152170,1152755,1153620,1153812,1153829,1154684,1155230,1156108,1156260,1156277,1156479,1156524,1157348,1157749,1157798,1157831,1157878,1158153,1159171,1159174,1159326,1159457,1159460,1159606,1159682-1159683,1159867,1160547,1160637,1161010,1161082,1161524,1162309,1162395,1163420,1164557,1164633,1164973-1165000,1165152,1165157,1165971,1165987

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.8.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java?rev=1165993&r1=1165992&r2=1165993&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java (original)
+++ camel/branches/camel-2.8.x/components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppBinding.java Wed Sep  7 04:19:53 2011
@@ -100,6 +100,8 @@ public class SmppBinding {
             
             if (shortMessage.length < 255) {
                 submitSm.setShortMessage(shortMessage);
+                // To avoid the NPE error
+                submitSm.setOptionalParametes(new OptionalParameter[]{});
             } else {
                 submitSm.setShortMessage(new byte[0]);
                 OptionalParameter messagePayloadTLV = OptionalParameters.deserialize(OptionalParameter.Tag.MESSAGE_PAYLOAD.code(), shortMessage);
@@ -306,4 +308,4 @@ public class SmppBinding {
     public void setConfiguration(SmppConfiguration configuration) {
         this.configuration = configuration;
     }
-}
\ No newline at end of file
+}