dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37608
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19201: TextUtils, null check
------------------------------------------------------------
revno: 19201
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-05-29 14:36:50 +0200
message:
TextUtils, null check
modified:
dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/util/TextUtils.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/util/TextUtils.java'
--- dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/util/TextUtils.java 2015-05-21 15:20:54 +0000
+++ dhis-2/dhis-support/dhis-support-commons/src/main/java/org/hisp/dhis/util/TextUtils.java 2015-05-29 12:36:50 +0000
@@ -146,6 +146,11 @@
*/
public static String subString( String string, int beginIndex, int length )
{
+ if ( string == null )
+ {
+ return null;
+ }
+
final int endIndex = beginIndex + length;
if ( beginIndex >= string.length() )