Skip to content

Commit 3425061

Browse files
committed
Handle null branch names in Revision.toString
1 parent 8c1886a commit 3425061

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/hudson/plugins/git/Revision.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import com.google.common.base.Joiner;
55
import com.google.common.collect.Iterables;
66

7+
import hudson.Util;
8+
79
import java.util.ArrayList;
810
import java.util.Collection;
911

@@ -72,7 +74,7 @@ public String toString() {
7274
Iterables.transform(branches, new Function<Branch, String>() {
7375

7476
public String apply(Branch from) {
75-
return from.getName();
77+
return Util.fixNull(from.getName());
7678
}
7779
}));
7880
s.append(')');

0 commit comments

Comments
 (0)