Skip to content

Commit

Permalink
Merge pull request #437 from dnalves/removingGuava
Browse files Browse the repository at this point in the history
Removing guava
  • Loading branch information
sibelius committed Nov 25, 2015
2 parents fa7e6e4 + 3e9d453 commit 520b030
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ android {
}

dependencies {
compile 'com.google.guava:guava:18.0'
testCompile 'junit:junit:4.12'
}

Expand Down
12 changes: 6 additions & 6 deletions library/src/main/java/com/orm/SugarContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

import android.content.Context;

import com.google.common.collect.MapMaker;

import java.util.concurrent.ConcurrentMap;
import java.util.Collections;
import java.util.Map;
import java.util.WeakHashMap;

public class SugarContext {

private static SugarContext instance = null;
private SugarDb sugarDb;
private Context context;
private ConcurrentMap<Object, Long> entitiesMap;
private Map<Object, Long> entitiesMap;

private SugarContext(Context context) {
this.context = context;
this.sugarDb = new SugarDb(context);
this.entitiesMap = new MapMaker().weakKeys().makeMap();
this.entitiesMap = Collections.synchronizedMap(new WeakHashMap<Object, Long>());
}

public static SugarContext getSugarContext() {
Expand Down Expand Up @@ -53,7 +53,7 @@ protected SugarDb getSugarDb() {
return sugarDb;
}

ConcurrentMap<Object, Long> getEntitiesMap() {
Map<Object, Long> getEntitiesMap() {
return entitiesMap;
}
}

0 comments on commit 520b030

Please sign in to comment.