Skip to content

Commit

Permalink
chore: add missing classes #3374 (#3375)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgomer2001 authored Dec 21, 2022
1 parent 55012d4 commit 7ba6131
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package co;

public class ListUtil {

private ListUtil() {}

public static Integer sum(List<Integer> list) {
return list.stream().mapToInt(x -> x).sum();
}

public static void ensureNotNull(List<Test> list) {
Objects.requireNonNull(list);
}

public static void ensureArrayNotNull(Test[] arr) {
Objects.requireNonNull(arr);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package co;

public interface MyInterface {

default String echo(String s) {
return s;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package co;

public class SubTest extends Test {

private String name;

public SubTest() {}

public SubTest(String id, String name) {
this.id = id;
this.name = name;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

}
20 changes: 20 additions & 0 deletions jans-auth-server/agama/engine/src/test/resources/libs/co/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package co;

public class Test implements MyInterface {

private String id;

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public static String sum(Test t1, Test t2) {
if (t1 == null || t2 == null) return "";
return t1.getId() + t2.getId();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package co.coo

class Foo {

String name

void bar() {
//Intentionally malformed
"Hello ${name}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package co.coo

class Foobar {

String sayHello() {
def greet = "Hello, Groovy!"
greet
}

}

0 comments on commit 7ba6131

Please sign in to comment.