diff --git a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/Storage.java b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/Storage.java index ee0b93afaa4..7b75aa2db68 100755 --- a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/Storage.java +++ b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/Storage.java @@ -19,6 +19,10 @@ public class Storage extends JavaScriptObject { registerAsStorageEventHandler(); } + protected Storage() { + super(); + } + private static void registerAsStorageEventHandler() { if (isSupported()) { registerAsStorageEventHandlerImpl(); @@ -100,27 +104,27 @@ public class Storage extends JavaScriptObject { return result; } - public native void setItem(String key, String value) /*-{ + public final native void setItem(String key, String value) /*-{ this.setItem(key, value); }-*/; - public native String getItem(String key) /*-{ + public final native String getItem(String key) /*-{ return this.getItem(key); }-*/; - public native void removeItem(String key) /*-{ + public final native void removeItem(String key) /*-{ return this.removeItem(key); }-*/; - public native void clear() /*-{ + public final native void clear() /*-{ this.clear(); }-*/; - public native String getKey(int index) /*-{ + public final native String getKey(int index) /*-{ return this.key(index); }-*/; - public native int getLength() /*-{ + public final native int getLength() /*-{ return this.length; }-*/; } diff --git a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/StorageEvent.java b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/StorageEvent.java index fede0873f12..5dd8566d5d1 100755 --- a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/StorageEvent.java +++ b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/client/StorageEvent.java @@ -12,31 +12,35 @@ import com.google.gwt.core.client.JavaScriptObject; * */ public class StorageEvent extends JavaScriptObject { + protected StorageEvent() { + super(); + } + public static interface Handler { void onStorageChange(StorageEvent event); } - public native String getKey() /*-{ + public final native String getKey() /*-{ return this.key; }-*/; - public native String getNewValue() /*-{ + public final native String getNewValue() /*-{ return this.newValue; }-*/; - public native String getOldValue() /*-{ + public final native String getOldValue() /*-{ return this.oldValue; }-*/; - public Storage getStorageArea() { + public final Storage getStorageArea() { return getStorageAreaImpl().cast(); } - private native JavaScriptObject getStorageAreaImpl() /*-{ + private final native JavaScriptObject getStorageAreaImpl() /*-{ return this.storageArea; }-*/; - public native String getUrl() /*-{ + public final native String getUrl() /*-{ return this.url; }-*/; }