Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Commit dfce0bd

Browse files
committed
prefer list over raw array
1 parent bad0d1b commit dfce0bd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/org/kohsuke/github/GHTree.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
package org.kohsuke.github;
22

33
import java.net.URL;
4+
import java.util.Arrays;
5+
import java.util.Collections;
6+
import java.util.List;
47

58
/**
69
* Provides information for Git Trees
@@ -26,8 +29,8 @@ public String getSha() {
2629
* Return an array of entries of the trees
2730
* @return
2831
*/
29-
public GHTreeEntry[] getTree() {
30-
return tree;
32+
public List<GHTreeEntry> getTree() {
33+
return Collections.unmodifiableList(Arrays.asList(tree));
3134
}
3235

3336
/**

0 commit comments

Comments
 (0)