- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The good news is that because it's open sourced, Soraya can just go in and rewrite it, and all will be well. Of course she just overwrites what's already there, so if anyone was relying upon the features of the old functionality, they'll get an instant lesson in, oh never mind.
Admin
And because it's Open Source the fully glory is only a Google-search away: https://github.com/wangda/alipay_sdk_all/blob/master/src/main/java/com/alipay/api/internal/util/AlipayHashMap.java
Admin
Better URL I think is https://github.com/alipay/alipay-sdk-java-all/blob/master/src/main/java/com/alipay/api/internal/util/AlipayHashMap.java
Looks like the official repository
Admin
In that case, StringUtils.areNotEmpty checks if the strings are not empty or whitespace. Which includes this: ''' for (int i = 0; i < strLen; i++) { if ((Character.isWhitespace(value.charAt(i)) == false)) { return false; } } '''
Admin
The Strings The Thing - Shakespeare
Admin
They also invented Base62.
And isNumeric(Object obj), which checks obj.toString()
And unicodeToChinese() is a no-op
Admin
public static boolean areNotEmpty(String... values) { boolean result = true; if (values == null || values.length == 0) { result = false; } else { for (String value : values) { result &= !isEmpty(value); } } return result; }
So maybe they're worried about timing attacks. Exceptpublic static boolean isEmpty(String value) { int strLen; if (value == null || (strLen = value.length()) == 0) { return true; } for (int i = 0; i < strLen; i++) { if ((Character.isWhitespace(value.charAt(i)) == false)) { return false; } } return true; }
They're not.Addendum 2019-06-19 09:20: Oh, screw you, textfield.
Admin
Attn: Sales Manager
To the Yanko-Pinkerton purveyors of this disgrace, prepare for the Navy Waves.
MANDATORY REQUIREMENT: DONATE TO YOUR LOCAL PTA.
END.
Admin
The Theory of Humanistic Beauty:
Symmetry exists as an amplifier of interface, not control.
We really are not bicameral, not even naturally two organisms, the Freudian Horse and it's Rider.
The particles of the corpus callasum of the human brain uplinked, long long ago, very ancient in prehistory, through will and will alone, to the fundamental astrophysical reality.
What does this mean:
Even in the most primitive aspects, humans have sovereignty not to dominate, instead to ironically turn creation to and fro as easy as the dimmer switch on your wall.
No regression to primitive human behavior servers as anything except a pantomime of loosing face.
I thought of something really funny a few moments ago ... ... ...
If it's worthwhile, I will remember it.
Watch what happens when this hits "the street" !
Admin
You could even use
String.valueOf(value)
thereby saving yourself the manual null check.Addendum 2019-06-25 08:29: Edit: Ah, I misread, that gets deliberately skipped in this case, while
String.valueOf
would return the string"null"
.