Skip to content

Commit 87ea532

Browse files
committed
Bug fix for java case coercion helpers.
If an empty tab stop was used with either of the java case coercion helper functions then they would blow up. Fixed by returning an empty string if the word passed to them is falsey.
1 parent e5f3d6b commit 87ea532

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

UltiSnips/java.snippets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ def getArgs(group):
2525
return [i.split(" ") for i in word.findall(group) ]
2626
2727
def camel(word):
28+
if not word: return ''
2829
return word[0].upper() + word[1:]
2930
3031
def mixedCase(word):
32+
if not word: return ''
3133
return word[0].lower() + word[1:]
3234
3335
endglobal

0 commit comments

Comments
 (0)