Skip to content

Commit e06280a

Browse files
committed
Fix docs and tests
1 parent 9e1240d commit e06280a

File tree

6 files changed

+17
-6
lines changed

6 files changed

+17
-6
lines changed

Parse/src/main/java/com/parse/ParseParcelDecoder.java

+5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
* A {@code ParseParcelableDecoder} can be used to unparcel objects such as
2222
* {@link com.parse.ParseObject} from a {@link android.os.Parcel}.
2323
*
24+
* This is capable of decoding objects and pointers to them.
25+
* However, for improved behavior in the case of {@link ParseObject}s, use the stateful
26+
* implementation {@link ParseObjectParcelDecoder}.
27+
*
2428
* @see ParseParcelEncoder
29+
* @see ParseObjectParcelDecoder
2530
*/
2631
/* package */ class ParseParcelDecoder {
2732

Parse/src/main/java/com/parse/ParseParcelEncoder.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@
1818
import java.util.Map;
1919

2020
/**
21-
* A {@code ParseParcelableEncoder} can be used to parcel objects such as
22-
* {@link com.parse.ParseObject} into a {@link android.os.Parcel}.
21+
* A {@code ParseParcelableEncoder} can be used to parcel objects into a {@link android.os.Parcel}.
22+
*
23+
* This is capable of parceling {@link ParseObject}s, but the result can likely be a
24+
* {@link StackOverflowError} due to circular references in the objects tree.
25+
* When needing to parcel {@link ParseObject}, use the stateful {@link ParseObjectParcelEncoder}.
2326
*
2427
* @see ParseParcelDecoder
28+
* @see ParseObjectParcelEncoder
2529
*/
2630
/* package */ class ParseParcelEncoder {
2731

Parse/src/test/java/com/parse/ParseACLTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
3939

4040
@RunWith(RobolectricTestRunner.class)
41-
@Config(constants = BuildConfig.class, sdk = 23)
41+
@Config(constants = BuildConfig.class, sdk = TestHelper.ROBOLECTRIC_SDK_VERSION)
4242
public class ParseACLTest {
4343

4444
private final static String UNRESOLVED_KEY = "*unresolved";

Parse/src/test/java/com/parse/ParseObjectStateTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import static org.junit.Assert.assertTrue;
2626

2727
@RunWith(RobolectricTestRunner.class)
28-
@Config(constants = BuildConfig.class, sdk = 23)
28+
@Config(constants = BuildConfig.class, sdk = TestHelper.ROBOLECTRIC_SDK_VERSION)
2929
public class ParseObjectStateTest {
3030

3131
@Test

Parse/src/test/java/com/parse/ParseObjectTest.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import static org.mockito.Mockito.when;
5050

5151
@RunWith(RobolectricTestRunner.class)
52-
@Config(constants = BuildConfig.class, sdk = 23)
52+
@Config(constants = BuildConfig.class, sdk = TestHelper.ROBOLECTRIC_SDK_VERSION)
5353
public class ParseObjectTest {
5454

5555
@Rule
@@ -636,6 +636,7 @@ public void testParcelWhileSavingWithLDSEnabled() throws Exception {
636636

637637
tcs.setResult(null);
638638
saveTask.waitForCompletion();
639+
Parse.setLocalDatastore(null);
639640
}
640641

641642
@Test
@@ -688,6 +689,7 @@ public void testParcelWhileDeletingWithLDSEnabled() throws Exception {
688689
deleteTask.waitForCompletion(); // complete deletion on original object.
689690
assertFalse(other.isDeleting);
690691
assertTrue(other.isDeleted);
692+
Parse.setLocalDatastore(null);
691693
}
692694

693695
//endregion

Parse/src/test/java/com/parse/ParseRelationTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import static org.skyscreamer.jsonassert.JSONAssert.assertEquals;
3131

3232
@RunWith(RobolectricTestRunner.class)
33-
@Config(constants = BuildConfig.class, sdk = 23)
33+
@Config(constants = BuildConfig.class, sdk = TestHelper.ROBOLECTRIC_SDK_VERSION)
3434
public class ParseRelationTest {
3535

3636
@Rule

0 commit comments

Comments
 (0)