Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Fix-up comments on the SMPP error code constants#116

Merged
jjlauer merged 1 commit into
twitter-archive:masterfrom
pcolby:master
Nov 24, 2015
Merged

Fix-up comments on the SMPP error code constants#116
jjlauer merged 1 commit into
twitter-archive:masterfrom
pcolby:master

Conversation

@pcolby
Copy link
Copy Markdown
Contributor

@pcolby pcolby commented Nov 5, 2015

It looks like these were extracted from Table 5-2 of the SMPP Protocol Specification v3.4 using some sort of script / automation, and that extraction got messed up from the STATUS_INVCMDID constant onwards, such that thereafter the constants' comments were placed after the
constant, not before.

This change simply moves the relevant constants to their correct location, before their relevant constants, consistent with the class' other constants. The diff is a bit messy, which can't be helped, but
the constants themselves (names and values) are not changed.

For interest, the broken layout existed in the very first commit of the SmppConstants.java file (e6965ae) which was an "initial export of svn repo for public release".

To show that the constants were not touched, here's a diff of the change ignoring comment:

git show a4fb64024698d48bfae77db772be14c6560441e7 | sed -nre 's:^-(    [^/]):\1:p' > a.txt 
git show a4fb64024698d48bfae77db772be14c6560441e7 | sed -nre 's:^\+(    [^/]):\1:p' > b.txt 
diff a.txt b.txt
6c6
<     public static final int STATUS_SYSERR = 0x00000008; // System Error

---
>     public static final int STATUS_SYSERR = 0x00000008;
10,11c10,11
<     public static final int STATUS_BINDFAIL = 0x0000000D; // Bind Failed
<     public static final int STATUS_INVPASWD = 0x0000000E; // Invalid Password

---
>     public static final int STATUS_BINDFAIL = 0x0000000D;
>     public static final int STATUS_INVPASWD = 0x0000000E;
37c37
<     public static final int STATUS_UNKNOWNERR = 0x000000FF; // Unknown Error

---
>     public static final int STATUS_UNKNOWNERR = 0x000000FF;

Those lines only changed because their code comments had been moved from the end of the line to the preceding line to be consistent with all the others.

Cheers.

It looks like these were extracted from Table 5-2 of the SMPP Protocol
Specification v3.4 using some sort of script / automation, and that
extraction got messed up from the `STATUS_INVCMDID` constant onwards,
such that thereafter the constants' comments were placed _after_ the
constant, not before.

This change simply moves the relevant constants to their correct
location, _before_ their relevant constants, consistent with the class'
other constants.  The diff is a bit messy, which can't be helped, but
the constants themselves (names and values) are not changed.

For interest, the broken layout existed in the very first commit of
the `SmppConstants.java` file (e6965ae)
which was an "initial export of svn repo for public release".
jjlauer added a commit that referenced this pull request Nov 24, 2015
Fix-up comments on the SMPP error code constants
@jjlauer jjlauer merged commit 906e3fe into twitter-archive:master Nov 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants