Closed Bug 971873 Opened 10 years ago Closed 10 years ago

ProxySelector references String.isEmpty(), which is API level 9

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 30

People

(Reporter: gbrown, Assigned: mfinkle)

Details

Attachments

(1 file)

http://hg.mozilla.org/mozilla-central/annotate/879038dcacb7/mobile/android/base/util/ProxySelector.java#l82 may call String.isEmpty(), which is API level 9 -- a problem for Android 2.2 devices. Maybe TextUtils.isEmpty() should be used instead?
Using TextUtils.isEmpty
Assignee: nobody → mark.finkle
Attachment #8375970 - Flags: review?(bnicholson)
Comment on attachment 8375970 [details] [diff] [review]
proxy-textutils v0.1

Review of attachment 8375970 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/util/ProxySelector.java
@@ +80,5 @@
>       * null.
>       */
>      private Proxy lookupProxy(String hostKey, String portKey, Proxy.Type type, int defaultPort) {
>          String host = System.getProperty(hostKey);
> +        if (host == null || TextUtils.isEmpty(host)) {

`host == null` check is redundant since isEmpty looks for null or empty string.
Attachment #8375970 - Flags: review?(bnicholson) → review+
https://hg.mozilla.org/mozilla-central/rev/4f2fe6efed84
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: