| Chunk |
|---|
| Conflicting content |
|---|
* @throws IllegalStateException if input cacheSize > {@link #MAX_SQL_CACHE_SIZE} or
* the value set with previous setMaxSqlCacheSize() call.
*/
<<<<<<< HEAD
public synchronized void setMaxSqlCacheSize(int cacheSize) {
if (cacheSize > MAX_SQL_CACHE_SIZE || cacheSize < 0) {
throw new IllegalStateException("expected value between 0 and " + MAX_SQL_CACHE_SIZE);
} else if (cacheSize < mMaxSqlCacheSize) {
throw new IllegalStateException("cannot set cacheSize to a value less than the value " +
"set with previous setMaxSqlCacheSize() call.");
}
mMaxSqlCacheSize = cacheSize;
=======
public void setMaxSqlCacheSize(int cacheSize) {
synchronized(this) {
if (cacheSize > MAX_SQL_CACHE_SIZE || cacheSize < 0) {
throw new IllegalStateException("expected value between 0 and " + MAX_SQL_CACHE_SIZE);
} else if (cacheSize < mMaxSqlCacheSize) {
throw new IllegalStateException("cannot set cacheSize to a value less than the value " +
"set with previous setMaxSqlCacheSize() call.");
}
mMaxSqlCacheSize = cacheSize;
}
>>>>>>> d96c5e0cb31f486fb30dc836f0e74b2216f2ccc2
}
/* package */ boolean isSqlInStatementCache(String sql) { |
| Solution content |
|---|
* @throws IllegalStateException if input cacheSize > {@link #MAX_SQL_CACHE_SIZE} or
* the value set with previous setMaxSqlCacheSize() call.
*/
<<<<<<< HEAD:core/java/android/database/sqlite/SQLiteDatabase.java
public synchronized void setMaxSqlCacheSize(int cacheSize) {
if (cacheSize > MAX_SQL_CACHE_SIZE || cacheSize < 0) {
throw new IllegalStateException("expected value between 0 and " + MAX_SQL_CACHE_SIZE);
} else if (cacheSize < mMaxSqlCacheSize) {
throw new IllegalStateException("cannot set cacheSize to a value less than the value " +
"set with previous setMaxSqlCacheSize() call.");
}
mMaxSqlCacheSize = cacheSize;
}
/* package */ boolean isSqlInStatementCache(String sql) {
synchronized (mCompiledQueries) {
return mCompiledQueries.containsKey(sql);
}
|||||||
public void setMaxSqlCacheSize(int cacheSize) {
mCache.setMaxSqlCacheSize(cacheSize);
=======
public void setMaxSqlCacheSize(int cacheSize) {
synchronized(this) {
if (cacheSize > MAX_SQL_CACHE_SIZE || cacheSize < 0) {
throw new IllegalStateException("expected value between 0 and " + MAX_SQL_CACHE_SIZE);
} else if (cacheSize < mMaxSqlCacheSize) {
throw new IllegalStateException("cannot set cacheSize to a value less than the value " +
"set with previous setMaxSqlCacheSize() call.");
}
mMaxSqlCacheSize = cacheSize;
}
}
/* package */ boolean isSqlInStatementCache(String sql) { |
| File |
|---|
| SQLiteDatabase.java |
| Developer's decision |
|---|
| Manual |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method signature |
| Synchronized statement |
| Variable |