mirror of
https://github.com/gbevin/urlencoder.git
synced 2025-04-30 01:08:13 -07:00
Added parameterized tests and related fixes
This commit is contained in:
parent
3ff4549d0e
commit
1370da18bb
2 changed files with 119 additions and 106 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2001-2022 Geert Bevin (gbevin[remove] at uwyn dot com)
|
||||
* Copyright 2001-2023 Geert Bevin (gbevin[remove] at uwyn dot com)
|
||||
* Licensed under the Apache License, Version 2.0 (the "License")
|
||||
*/
|
||||
package com.uwyn.urlencoder;
|
||||
|
@ -167,7 +167,7 @@ public final class UrlEncoder {
|
|||
* @since 1.0
|
||||
*/
|
||||
public static String encode(String source, String allow) {
|
||||
if (source == null || source.isBlank()) {
|
||||
if (source == null || source.isEmpty()) {
|
||||
return source;
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ public final class UrlEncoder {
|
|||
}
|
||||
|
||||
var text = "";
|
||||
if (args.size() == 1) {
|
||||
if (args.size() == 1 && !args.get(0).isEmpty()) {
|
||||
text = args.remove(0);
|
||||
valid_arguments = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue