Skip to content

Commit 92f0eca

Browse files
raname loadAllAs to loadAll
1 parent 00d0328 commit 92f0eca

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

util/src/main/java/io/kubernetes/client/util/Yaml.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ public static <T> T loadAs(Reader reader, Class<T> clazz) {
217217
* @return List of instantiated objects.
218218
* @throws IOException If an error occurs while reading the YAML.
219219
*/
220-
public static List<Object> loadAllAs(String content) throws IOException {
221-
return loadAllAs(new StringReader(content));
220+
public static List<Object> loadAll(String content) throws IOException {
221+
return loadAll(new StringReader(content));
222222
}
223223

224224
/**
@@ -231,8 +231,8 @@ public static List<Object> loadAllAs(String content) throws IOException {
231231
* @return List of instantiated of the objects.
232232
* @throws IOException If an error occurs while reading the YAML.
233233
*/
234-
public static List<Object> loadAllAs(File f) throws IOException {
235-
return loadAllAs(new FileReader(f));
234+
public static List<Object> loadAll(File f) throws IOException {
235+
return loadAll(new FileReader(f));
236236
}
237237

238238
/**
@@ -246,7 +246,7 @@ public static List<Object> loadAllAs(File f) throws IOException {
246246
* @return List of instantiated of the objects.
247247
* @throws IOException If an error occurs while reading the YAML.
248248
*/
249-
public static List<Object> loadAllAs(Reader reader) throws IOException {
249+
public static List<Object> loadAll(Reader reader) throws IOException {
250250
Iterable<Object> iterable = getSnakeYaml().loadAll(reader);
251251
List<Object> list = new ArrayList<Object>();
252252
for (Object object : iterable) {

util/src/test/java/io/kubernetes/client/util/YamlTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ public void testLoad() {
8484
}
8585

8686
@Test
87-
public void testLoadAllAs() throws IOException {
87+
public void testLoadAll() throws IOException {
8888
StringBuilder sb = new StringBuilder();
8989
for (int i = 0; i < kinds.length; i++) {
9090
sb.append(input.replace("XXXX", kinds[i]).replace("YYYY", apiVersions[i]));
9191
sb.append("\n---\n");
9292
}
9393

9494
List<Object> list = null;
95-
list = (List<Object>) Yaml.loadAllAs(sb.toString());
95+
list = (List<Object>) Yaml.loadAll(sb.toString());
9696
for (int i = 0; i < kinds.length; i++) {
9797
String className = classNames[i];
9898
try {
@@ -109,8 +109,8 @@ public void testLoadAllAs() throws IOException {
109109
}
110110

111111
@Test
112-
public void testLoadAllAsFile() throws Exception {
113-
List<Object> list = Yaml.loadAllAs(new File(TEST_YAML_FILE_PATH));
112+
public void testLoadAllFile() throws Exception {
113+
List<Object> list = Yaml.loadAll(new File(TEST_YAML_FILE_PATH));
114114
for (Object object : list) {
115115
String type = object.getClass().getSimpleName();
116116
if (type.equals("V1Service")) {

0 commit comments

Comments
 (0)