Skip to content

Commit 6f70041

Browse files
authored
Deps: Bump commons-lang3 to 1.18.0 in examples/pom.xml. (#856)
* Bump commons-lang3 to 1.18.0 in examples/pom.xml. * Omit limit on SearchForApplicationBoxes when limit=0.
1 parent b1ecb52 commit 6f70041

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

examples/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
<dependency>
6666
<groupId>org.apache.commons</groupId>
6767
<artifactId>commons-lang3</artifactId>
68-
<!-- this is the last version with java 1.7 support -->
69-
<version>3.8</version>
68+
<version>3.18.0</version>
7069
</dependency>
7170
<dependency>
7271
<groupId>org.bouncycastle</groupId>

src/main/java/com/algorand/algosdk/v2/client/indexer/SearchForApplicationBoxes.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ public SearchForApplicationBoxes(Client client, Long applicationId) {
3030
* limit is not reached.
3131
*/
3232
public SearchForApplicationBoxes limit(Long limit) {
33-
addQuery("limit", String.valueOf(limit));
33+
// Only add limit parameter if limit is not null and not 0
34+
// This matches behavior of other SDKs (Python/Go) which omit the parameter when limit=0
35+
if (limit != null && limit != 0) {
36+
addQuery("limit", String.valueOf(limit));
37+
}
3438
return this;
3539
}
3640

src/test/java/com/algorand/algosdk/unit/utils/TestingUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,6 @@ public static boolean notEmpty(String str) {
311311
}
312312

313313
public static boolean notEmpty(Long val) {
314-
return val != 0;
314+
return val != null && val != 0;
315315
}
316316
}

0 commit comments

Comments
 (0)