8000 Modified visbility of AbstractMemoryDataStore from package private to… · rchani99/google-http-java-client@cf75a23 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf75a23

Browse files
guinchojeanbza
authored andcommitted
Modified visbility of AbstractMemoryDataStore from package private to public.
This will make custom implementations easier. All other classes in the package are already public. Also modified the visibility of AbstractMemoryDataStore.save() from package private to public. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=174893279
1 parent 7bee549 commit cf75a23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

google-http-client/src/main/java/com/google/api/client/util/store/AbstractMemoryDataStore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
*
3838
* @author Yaniv Inbar
3939
*/
40-
class AbstractMemoryDataStore<V extends Serializable> extends AbstractDataStore<V> {
40+
public class AbstractMemoryDataStore<V extends Serializable> extends AbstractDataStore<V> {
4141

4242
/** Lock on access to the store. */
4343
private final Lock lock = new ReentrantLock();
4444

4545
/** Data store map from the key to the value. */
46-
HashMap<String, byte[]> keyValueMap = Maps.newHashMap();
46+
protected HashMap<String, byte[]> keyValueMap = Maps.newHashMap();
4747

4848
/**
4949
* @param dataStoreFactory data store factory
@@ -182,7 +182,7 @@ public int size() throws IOException {
182182
* {@link #clear()}.
183183
*/
184184
@SuppressWarnings("unused")
185-
void save() throws IOException {
185+
public void save() throws IOException {
186186
}
187187

188188
@Override

google-http-client/src/main/java/com/google/api/client/util/store/FileDataStoreFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static class FileDataStore<V extends Serializable> extends AbstractMemoryDataSto
104104
}
105105

106106
@Override
107-
void save() throws IOException {
107+
public void save() throws IOException {
108108
IOUtils.serialize(keyValueMap, new FileOutputStream(dataFile));
109109
}
110110

0 commit comments

Comments
 (0)
0