aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny van Heumen <danny@dannyvanheumen.nl>2014-08-01 19:39:04 +0200
committerDanny van Heumen <danny@dannyvanheumen.nl>2014-08-01 19:39:04 +0200
commitcc7072ab414864fd90e98c51016783b58da587b1 (patch)
treee25f94d292c0cf9c797e40cd02319da3ad8ca622
parent9aff5aa6bc45ccb0c9c414e21b56a2f3c0da6b3d (diff)
downloadjitsi-cc7072ab414864fd90e98c51016783b58da587b1.zip
jitsi-cc7072ab414864fd90e98c51016783b58da587b1.tar.gz
jitsi-cc7072ab414864fd90e98c51016783b58da587b1.tar.bz2
Added constant for foreground color code index.
-rw-r--r--src/net/java/sip/communicator/impl/protocol/irc/Utils.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/irc/Utils.java b/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
index 1cc7db4..00550aa 100644
--- a/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
+++ b/src/net/java/sip/communicator/impl/protocol/irc/Utils.java
@@ -21,7 +21,13 @@ public final class Utils
private static final Logger LOGGER = Logger.getLogger(Utils.class);
/**
- * Index indicating the end of the color code.
+ * Index indicating the end of the foreground color code.
+ */
+ private static final int INDEX_END_FOREGROUND_COLOR_CODE = 2;
+
+ /**
+ * Index indicating the end of the background color code. (additional 1 for
+ * comma separating foreground color code from background color code)
*/
private static final int INDEX_END_BACKGROUND_COLOR_CODE = 3;
@@ -93,7 +99,7 @@ public final class Utils
}
else
{
- i += 2;
+ i += INDEX_END_FOREGROUND_COLOR_CODE;
Color background =
parseBackgroundColor(text.substring(i + 1));
if (background != null)