Closed Bug 1244944 Opened 8 years ago Closed 8 years ago

Import org.json.simple less in services code

Categories

(Firefox for Android Graveyard :: Android Sync, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(9 files)

58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
58 bytes, text/x-review-board-request
rnewman
: review+
Details
This is one step toward Bug 1204559.  Let's not expose org.json.simple directly in as many ways, and in particular, let's not expose org.json.simple's ParseException directly.
This is safe because the single consumer of `MetaGlobal.fetch` is
`FetchMetaGlobalStage.execute`, which already expects to be called on
a thread and have another thread waiting for the callback.

Review commit: https://reviewboard.mozilla.org/r/33155/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33155/
Attachment #8714581 - Flags: review?(rnewman)
One step further on the path of removing dependence on
org.json.simple: don't expose its exceptions to consumers of EJO.  We
re-purpose the existing UnexpectedJSONException classes to incorporate
what were once ParseException instances.

Review commit: https://reviewboard.mozilla.org/r/33167/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33167/
Attachment #8714587 - Flags: review?(rnewman)
This works due to string conversions, but it's not elegant.  Let's
just define the API we want, and work to improve the implementation
when we remove org.json.simple entirely.

Review commit: https://reviewboard.mozilla.org/r/33171/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33171/
Attachment #8714589 - Flags: review?(rnewman)
rnewman: the idea with these commits is to clean up some cruft; make the API more explicit, in preparation for handling typed arrays natively; and to reduce surface area of org.simple.json.  One step on the path.
Comment on attachment 8714581 [details]
MozReview Request: Bug 1244944 - Remove old and crufty defer{Get,Put}. r?rnewman

https://reviewboard.mozilla.org/r/33155/#review30955
Attachment #8714581 - Flags: review?(rnewman) → review+
Attachment #8714582 - Flags: review?(rnewman) → review+
Comment on attachment 8714582 [details]
MozReview Request: Bug 1244944 - Remove unused deepCopy method. r?rnewman

https://reviewboard.mozilla.org/r/33157/#review30957
Comment on attachment 8714583 [details]
MozReview Request: But 1244944 - Remove untyped EJO.putAll. r?rnewman

https://reviewboard.mozilla.org/r/33159/#review30959
Attachment #8714583 - Flags: review?(rnewman) → review+
Comment on attachment 8714584 [details]
MozReview Request: Bug 1244944 - Fix test. r?rnewman

https://reviewboard.mozilla.org/r/33161/#review30961
Attachment #8714584 - Flags: review?(rnewman) → review+
Comment on attachment 8714585 [details]
MozReview Request: Bug 1244944 - Use typed put() variants. r?rnewman

https://reviewboard.mozilla.org/r/33163/#review30963
Attachment #8714585 - Flags: review?(rnewman) → review+
Comment on attachment 8714586 [details]
MozReview Request: Bug 1244944 - Inline ExtendedJSONObject.parseJSONObject. r?rnewman

https://reviewboard.mozilla.org/r/33165/#review30965
Attachment #8714586 - Flags: review?(rnewman) → review+
Comment on attachment 8714587 [details]
MozReview Request: Bug 1244944 - Don't throw ParseException from ExtendedJSONObject. r?rnewman

https://reviewboard.mozilla.org/r/33167/#review30967
Attachment #8714587 - Flags: review?(rnewman) → review+
Comment on attachment 8714588 [details]
MozReview Request: Bug 1244944 - Don't catch or throw ParseException. r?rnewman

https://reviewboard.mozilla.org/r/33169/#review30969
Attachment #8714588 - Flags: review?(rnewman) → review+
Comment on attachment 8714589 [details]
MozReview Request: Bug 1244944 - Don't stick an org.json.JSONArray into an ExtendedJSONObject. r?rnewman

https://reviewboard.mozilla.org/r/33171/#review30971
Attachment #8714589 - Flags: review?(rnewman) → review+
Product: Android Background Services → Firefox for Android
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: