Skip to content

Commit

Permalink
Reduces visibility to keep the compatibility.
Browse files Browse the repository at this point in the history
Adding public methods may break the subclasses if a method with
same signature defined with less visibility.

Also changes devmode version of ClientSerializationStreamReader
to use the server-side base64 implementation to workaround devmode
issue related to accessing package visibile method in supersourced
classes.

Change-Id: I2c928ea88a27e45b90ddc3f7efd237cbddad84ee
  • Loading branch information
gkdn committed Aug 29, 2015
1 parent 783c71a commit 2b23c5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected final void setVersion(int version) {
*
* Keep this synchronized with the version in Base64Utils.
*/
public static long longFromBase64(String value) {
static long longFromBase64(String value) {
int pos = 0;
long longVal = base64Value(value.charAt(pos++));
int len = value.length();
Expand All @@ -133,7 +133,7 @@ public static long longFromBase64(String value) {
*
* Keep this synchronized with the version in Base64Utils.
*/
public static String longToBase64(long value) {
static String longToBase64(long value) {
// Convert to ints early to avoid need for long ops
int low = (int) (value & 0xffffffff);
int high = (int) (value >> 32);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.google.gwt.dev.js.ast.JsVisitor;
import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.Base64Utils;

import java.io.StringReader;
import java.util.ArrayList;
Expand Down Expand Up @@ -382,7 +383,8 @@ public int readInt() {

@Override
public long readLong() {
return longFromBase64(((JsStringLiteral) decoder.getValues().get(--index)).getValue());
return Base64Utils.longFromBase64(
((JsStringLiteral) decoder.getValues().get(--index)).getValue());
}

@Override
Expand Down

0 comments on commit 2b23c5e

Please sign in to comment.