litesoft
Diff Revisions
949
vs
950
for /trunk/Java/GWT/Server/tests/org/litesoft/GWT/client/localstorage/Html5LocalStorageTestImpl.java
|
@@ -1,6 +1,7 @@ |
1 |
1 |
|
package org.litesoft.GWT.client.localstorage; |
2 |
2 |
|
|
3 |
3 |
|
import org.litesoft.commonfoundation.annotations.*; |
|
4 |
+ |
import org.litesoft.commonfoundation.base.*; |
4 |
5 |
|
import org.litesoft.commonfoundation.typeutils.*; |
5 |
6 |
|
import org.litesoft.core.simpletypes.*; |
6 |
7 |
|
|
|
@@ -56,7 +57,7 @@ |
56 |
57 |
|
* @return non-null value associated with <code>key</code> or null if <code>key</code> has no association. |
57 |
58 |
|
*/ |
58 |
59 |
|
public synchronized String getItem( @NotNull String key ) { |
59 |
|
- |
return mStore.get( Strings.assertNotNullNotEmpty( "key", key ) ); |
|
60 |
+ |
return mStore.get( Confirm.significant( "key", key ) ); |
60 |
61 |
|
} |
61 |
62 |
|
|
62 |
63 |
|
/** |
|
@@ -74,8 +75,8 @@ |
74 |
75 |
|
* @return true if the key/value pair was successfully stored. |
75 |
76 |
|
*/ |
76 |
77 |
|
public synchronized boolean setItem( @NotNull String key, @NotNull String value ) { |
77 |
|
- |
key = Strings.assertNotNullNotEmpty( "key", key ); |
78 |
|
- |
value = Objects.assertNotNull( "value", value ); |
|
78 |
+ |
key = Confirm.significant( "key", key ); |
|
79 |
+ |
value = Confirm.isNotNull( "value", value ); |
79 |
80 |
|
if ( null == mStore.put( key, value ) ) { |
80 |
81 |
|
mKeys = null; |
81 |
82 |
|
if ( mMaxSize < mStore.size() ) // Indicate "Full" |
|
@@ -95,7 +96,7 @@ |
95 |
96 |
|
* @param key non-null key to remove (any whitespace in the key has un-specified behavior). |
96 |
97 |
|
*/ |
97 |
98 |
|
public synchronized void removeItem( @NotNull String key ) { |
98 |
|
- |
if ( null != mStore.remove( Strings.assertNotNullNotEmpty( "key", key ) ) ) { |
|
99 |
+ |
if ( null != mStore.remove( Confirm.significant( "key", key ) ) ) { |
99 |
100 |
|
mKeys = null; |
100 |
101 |
|
} |
101 |
102 |
|
} |