Skip to content

Commit b8808f4

Browse files
committed
Sync with underscore-java.
1 parent e29a295 commit b8808f4

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

src/main/java/com/github/underscore/U.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright 2015-2018 Valentyn Kolesnikov
4+
* Copyright 2015-2019 Valentyn Kolesnikov
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -2236,9 +2236,7 @@ public Tuple<V, K> apply(Map.Entry<K, V> entry) {
22362236
public static List<String> functions(final Object object) {
22372237
final List<String> result = newArrayList();
22382238
for (final Method method : object.getClass().getDeclaredMethods()) {
2239-
if (!method.getName().contains("$")) {
2240-
result.add(method.getName());
2241-
}
2239+
result.add(method.getName());
22422240
}
22432241
return sort(uniq(result));
22442242
}

src/main/java/com/github/underscore/lodash/Json.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright 2015-2018 Valentyn Kolesnikov
4+
* Copyright 2015-2019 Valentyn Kolesnikov
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/com/github/underscore/lodash/U.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright 2015-2018 Valentyn Kolesnikov
4+
* Copyright 2015-2019 Valentyn Kolesnikov
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/main/java/com/github/underscore/lodash/Xml.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright 2015-2018 Valentyn Kolesnikov
4+
* Copyright 2015-2019 Valentyn Kolesnikov
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/test/java/com/github/underscore/ObjectsTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,14 @@ public void invert() {
9191
*/
9292
@Test
9393
public void functions() {
94-
List<String> result = U.functions(U.class);
95-
assertEquals(5, U.first(result, 5).size());
94+
class Test {
95+
public void test() {
96+
}
97+
public void test$() {
98+
}
99+
}
100+
List<String> result = U.functions(Test.class);
101+
assertEquals(1, U.first(result, 1).size());
96102
}
97103

98104
/*

0 commit comments

Comments
 (0)