diff --git a/library/src/main/java/com/orm/SchemaGenerator.java b/library/src/main/java/com/orm/SchemaGenerator.java index c25407fc..e041e755 100644 --- a/library/src/main/java/com/orm/SchemaGenerator.java +++ b/library/src/main/java/com/orm/SchemaGenerator.java @@ -9,7 +9,6 @@ import com.orm.annotation.MultiUnique; import com.orm.annotation.NotNull; import com.orm.annotation.Unique; -import com.orm.dsl.BuildConfig; import com.orm.helper.ManifestHelper; import com.orm.util.KeyWordUtil; import com.orm.util.MigrationFileParser; @@ -56,7 +55,6 @@ public void createDatabase(SQLiteDatabase sqLiteDatabase) { public void afterTableCreated(Class table, SQLiteDatabase sqLiteDatabase) { String fileName = table.getSimpleName() + ".sql"; executeScript(sqLiteDatabase,"sugar_after_create/" ,fileName); - } public void doUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) { @@ -102,7 +100,7 @@ private boolean executeSugarUpgrade(SQLiteDatabase db, int oldVersion, int newVe List files = Arrays.asList(getAssets().list("sugar_upgrades")); Collections.sort(files, new NumberComparator()); for (String file : files) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "filename : " + file); } @@ -114,14 +112,14 @@ private boolean executeSugarUpgrade(SQLiteDatabase db, int oldVersion, int newVe isSuccess = true; } } catch (NumberFormatException e) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "not a sugar script. ignored." + file); } } } } catch (IOException e) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.e(SUGAR, e.getMessage()); } } @@ -139,8 +137,8 @@ private void executeScript(SQLiteDatabase db,String path ,String file) { sb.append(line); } MigrationFileParser migrationFileParser = new MigrationFileParser(sb.toString()); - for(String statement: migrationFileParser.getStatements()){ - if(ManifestHelper.isDebugEnabled()) { + for (String statement: migrationFileParser.getStatements()) { + if (ManifestHelper.isDebugEnabled()) { Log.i("Sugar script", statement); } if (!statement.isEmpty()) { @@ -149,12 +147,12 @@ private void executeScript(SQLiteDatabase db,String path ,String file) { } } catch (IOException e) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.e(SUGAR, e.getMessage()); } } - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Script executed"); } } @@ -193,7 +191,7 @@ private void addColumns(Class table, SQLiteDatabase sqLiteDatabase) { } for (String command : alterCommands) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i("Sugar", command); } sqLiteDatabase.execSQL(command); @@ -201,14 +199,14 @@ private void addColumns(Class table, SQLiteDatabase sqLiteDatabase) { } protected String createTableSQL(Class table) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Create table if not exists"); } List fields = ReflectionUtil.getTableFields(table); String tableName = NamingHelper.toTableName(table); - if(KeyWordUtil.isKeyword(tableName)) { - if(ManifestHelper.isDebugEnabled()) { + if (KeyWordUtil.isKeyword(tableName)) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "ERROR, SQLITE RESERVED WORD USED IN " + tableName); } } @@ -265,11 +263,11 @@ protected String createTableSQL(Class table) { sb.append(", UNIQUE("); String[] constraintFields = constraint.split(","); - for(int i = 0; i < constraintFields.length; i++) { + for (int i = 0; i < constraintFields.length; i++) { String columnName = NamingHelper.toSQLNameDefault(constraintFields[i]); sb.append(columnName); - if(i < (constraintFields.length -1)) { + if (i < (constraintFields.length -1)) { sb.append(","); } } @@ -278,7 +276,7 @@ protected String createTableSQL(Class table) { } sb.append(" ) "); - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Creating table " + tableName); } diff --git a/library/src/main/java/com/orm/SugarDb.java b/library/src/main/java/com/orm/SugarDb.java index bc71ba23..28391900 100644 --- a/library/src/main/java/com/orm/SugarDb.java +++ b/library/src/main/java/com/orm/SugarDb.java @@ -4,7 +4,6 @@ import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; -import com.orm.dsl.BuildConfig; import com.orm.helper.ManifestHelper; import com.orm.util.SugarCursorFactory; @@ -63,7 +62,7 @@ public synchronized SQLiteDatabase getDB() { @Override public synchronized SQLiteDatabase getReadableDatabase() { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.d(LOG_TAG, "getReadableDatabase"); } openedConnections++; @@ -72,12 +71,12 @@ public synchronized SQLiteDatabase getReadableDatabase() { @Override public synchronized void close() { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.d(LOG_TAG, "getReadableDatabase"); } openedConnections--; - if(openedConnections == 0) { - if(ManifestHelper.isDebugEnabled()) { + if (openedConnections == 0) { + if (ManifestHelper.isDebugEnabled()) { Log.d(LOG_TAG, "closing"); } super.close(); diff --git a/library/src/main/java/com/orm/SugarRecord.java b/library/src/main/java/com/orm/SugarRecord.java index 2ade2ba3..5fd5ab3f 100644 --- a/library/src/main/java/com/orm/SugarRecord.java +++ b/library/src/main/java/com/orm/SugarRecord.java @@ -114,7 +114,7 @@ public static int deleteInTx(Collection objects) { sqLiteDatabase.setTransactionSuccessful(); } catch (Exception e) { deletedRows = 0; - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Error in deleting in transaction " + e.getMessage()); } } finally { @@ -134,7 +134,9 @@ public static List listAll(Class type, String orderBy) { public static T findById(Class type, Long id) { List list = find(type, "id=?", new String[]{String.valueOf(id)}, null, null, "1"); - if (list.isEmpty()) return null; + if (list.isEmpty()) { + return null; + } return list.get(0); } @@ -190,7 +192,6 @@ public static List find(Class type, String whereClause, String... wher public static List findWithQuery(Class type, String query, String... arguments) { Cursor cursor = getSugarDataBase().rawQuery(query, arguments); - return getEntitiesFromCursor(cursor, type); } @@ -199,7 +200,6 @@ public static void executeQuery(String query, String... arguments) { } public static List find(Class type, String whereClause, String[] whereArgs, String groupBy, String orderBy, String limit) { - String args[]; args = (whereArgs == null) ? null : replaceArgs(whereArgs); @@ -219,11 +219,11 @@ public static List findOneToMany(Class type, String relationFieldName, return getEntitiesFromCursor(cursor, type, relationFieldName, relationObject); } - public static List getEntitiesFromCursor(Cursor cursor, Class type){ + public static List getEntitiesFromCursor(Cursor cursor, Class type) { return getEntitiesFromCursor(cursor, type, null, null); } - public static List getEntitiesFromCursor(Cursor cursor, Class type, String relationFieldName, Object relationObject){ + public static List getEntitiesFromCursor(Cursor cursor, Class type, String relationFieldName, Object relationObject) { T entity; List result = new ArrayList<>(); try { @@ -370,7 +370,7 @@ static long update(SQLiteDatabase db, Object object) { List whereArgs = new ArrayList<>(); for (Field column : columns) { - if(column.isAnnotationPresent(Unique.class)) { + if (column.isAnnotationPresent(Unique.class)) { try { column.setAccessible(true); String columnName = NamingHelper.toColumnName(column); @@ -407,12 +407,12 @@ public boolean delete() { Long id = getId(); Class type = getClass(); if (id != null && id > 0L) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, type.getSimpleName() + " deleted : " + id); } return getSugarDataBase().delete(NamingHelper.toTableName(type), "Id=?", new String[]{id.toString()}) == 1; } else { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Cannot delete object: " + type.getSimpleName() + " - object has not been saved"); } return false; @@ -428,23 +428,23 @@ public static boolean delete(Object object) { Long id = (Long) field.get(object); if (id != null && id > 0L) { boolean deleted = getSugarDataBase().delete(NamingHelper.toTableName(type), "Id=?", new String[]{id.toString()}) == 1; - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, type.getSimpleName() + " deleted : " + id); } return deleted; } else { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Cannot delete object: " + object.getClass().getSimpleName() + " - object has not been saved"); } return false; } } catch (NoSuchFieldException e) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Cannot delete object: " + object.getClass().getSimpleName() + " - annotated object has no id"); } return false; } catch (IllegalAccessException e) { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Cannot delete object: " + object.getClass().getSimpleName() + " - can't access id"); } return false; @@ -452,7 +452,7 @@ public static boolean delete(Object object) { } else if (SugarRecord.class.isAssignableFrom(type)) { return ((SugarRecord) object).delete(); } else { - if(ManifestHelper.isDebugEnabled()) { + if (ManifestHelper.isDebugEnabled()) { Log.i(SUGAR, "Cannot delete object: " + object.getClass().getSimpleName() + " - not persisted"); } return false; @@ -534,17 +534,12 @@ public void remove() { } } - public static String[] replaceArgs(String[] args){ - + public static String[] replaceArgs(String[] args) { String [] replace = new String[args.length]; - for (int i=0; i getSourcePaths() throws PackageManager.NameNotFoundEx sourcePaths.add(applicationInfo.sourceDir); //add the default apk path if (instantRunDir.exists()) { //check if app using instant run - for(final File dexFile : instantRunDir.listFiles()) { //add all sources from instan-run + for (final File dexFile : instantRunDir.listFiles()) { //add all sources from instant-run sourcePaths.add(dexFile.getAbsolutePath()); } } diff --git a/library/src/main/java/com/orm/query/Select.java b/library/src/main/java/com/orm/query/Select.java index cc57199d..d0fb3132 100644 --- a/library/src/main/java/com/orm/query/Select.java +++ b/library/src/main/java/com/orm/query/Select.java @@ -64,9 +64,7 @@ public Select where(String whereClause) { } public Select where(Condition... condition) { - mergeConditions(condition, Condition.Type.AND); - return this; } @@ -130,6 +128,7 @@ public Select where(String whereClause, String[] args) { public Cursor getCursor() { return SugarRecord.getCursor(record, whereClause, arguments, groupBy, orderBy, limit); } + public List list() { if (arguments == null) { arguments = convertArgs(args); diff --git a/library/src/main/java/com/orm/util/MigrationFileParser.java b/library/src/main/java/com/orm/util/MigrationFileParser.java index 1691a1eb..997623a5 100644 --- a/library/src/main/java/com/orm/util/MigrationFileParser.java +++ b/library/src/main/java/com/orm/util/MigrationFileParser.java @@ -10,11 +10,11 @@ public class MigrationFileParser { /** * @param content */ - public MigrationFileParser(String content){ + public MigrationFileParser(String content) { this.content = content.replaceAll("(\\/\\*([\\s\\S]*?)\\*\\/)|(--(.)*)|(\n)",""); } - public String[] getStatements(){ + public String[] getStatements() { return this.content.split(";"); } diff --git a/library/src/main/java/com/orm/util/NumberComparator.java b/library/src/main/java/com/orm/util/NumberComparator.java index a6a08053..e4750c29 100644 --- a/library/src/main/java/com/orm/util/NumberComparator.java +++ b/library/src/main/java/com/orm/util/NumberComparator.java @@ -37,10 +37,12 @@ protected int compareRight(String a, String b) { bias = -1; } } else if (ca > cb) { - if (bias == 0) + if (bias == 0) { bias = 1; - } else if ((ca == 0) && (cb == 0)) + } + } else if ((ca == 0) && (cb == 0)) { return bias; + } ia++; ib++; } diff --git a/library/src/main/java/com/orm/util/ReflectionUtil.java b/library/src/main/java/com/orm/util/ReflectionUtil.java index 18943d09..dab708ed 100644 --- a/library/src/main/java/com/orm/util/ReflectionUtil.java +++ b/library/src/main/java/com/orm/util/ReflectionUtil.java @@ -35,7 +35,9 @@ private ReflectionUtil() { } public static List getTableFields(Class table) { List fieldList = SugarConfig.getFields(table); - if (fieldList != null) return fieldList; + if (fieldList != null) { + return fieldList; + } if (ManifestHelper.isDebugEnabled()) { Log.d("Sugar", "Fetching properties"); @@ -78,7 +80,7 @@ public static void addFieldValueToColumn(ContentValues values, Field column, Obj try { field = columnType.getDeclaredField("id"); field.setAccessible(true); - if(columnValue != null) { + if (columnValue != null) { values.put(columnName,String.valueOf(field.get(columnValue))); } else { values.putNull(columnName); @@ -272,7 +274,9 @@ public static List getDomainClasses() { try { for (String className : getAllClasses()) { Class domainClass = getDomainClass(className); - if (domainClass != null) domainClasses.add(domainClass); + if (domainClass != null) { + domainClasses.add(domainClass); + } } } catch (IOException | PackageManager.NameNotFoundException e) { if (ManifestHelper.isDebugEnabled()) { @@ -318,7 +322,9 @@ private static List getAllClasses() throws PackageManager.NameNotFoundEx try { List allClasses = MultiDexHelper.getAllClasses(); for (String classString : allClasses) { - if (classString.startsWith(packageName)) classNames.add(classString); + if (classString.startsWith(packageName)) { + classNames.add(classString); + } } } catch (NullPointerException e) { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); @@ -333,7 +339,9 @@ private static List getAllClasses() throws PackageManager.NameNotFoundEx populateFiles(filePath, fileNames, ""); } for (String fileName : fileNames) { - if (fileName.startsWith(packageName)) classNames.add(fileName); + if (fileName.startsWith(packageName)) { + classNames.add(fileName); + } } } } diff --git a/library/src/main/java/com/orm/util/SugarCursor.java b/library/src/main/java/com/orm/util/SugarCursor.java index d058c5c1..59186bdc 100644 --- a/library/src/main/java/com/orm/util/SugarCursor.java +++ b/library/src/main/java/com/orm/util/SugarCursor.java @@ -14,17 +14,19 @@ public int getColumnIndexOrThrow(String columnName) throws IllegalArgumentExcept try { return super.getColumnIndexOrThrow(columnName); } catch (IllegalArgumentException e) { - if (columnName.equals("_id")) + if (columnName.equals("_id")) { return super.getColumnIndexOrThrow("ID"); - else + } else { throw e; + } } } @Override public int getColumnIndex(String columnName) { - if (columnName.equals("_id")) + if (columnName.equals("_id")) { columnName = "ID"; + } return super.getColumnIndex(columnName); } } diff --git a/library/src/main/java/com/orm/util/ThreadUtil.java b/library/src/main/java/com/orm/util/ThreadUtil.java index 665e5c2d..56faa6bc 100644 --- a/library/src/main/java/com/orm/util/ThreadUtil.java +++ b/library/src/main/java/com/orm/util/ThreadUtil.java @@ -25,7 +25,7 @@ public static Future doInBackground(Callable callable) { final ExecutorService executor = Executors.newSingleThreadExecutor(); Future future = executor.submit(callable); - if(executor.isTerminated()) { + if (executor.isTerminated()) { executor.shutdown(); } diff --git a/library/src/test/java/com/orm/SchemaGeneratorTest.java b/library/src/test/java/com/orm/SchemaGeneratorTest.java index 811d1aa1..fd290707 100644 --- a/library/src/test/java/com/orm/SchemaGeneratorTest.java +++ b/library/src/test/java/com/orm/SchemaGeneratorTest.java @@ -5,7 +5,7 @@ import com.orm.app.ClientApp; import com.orm.dsl.BuildConfig; -import com.orm.model.AllAnotatedModel; +import com.orm.model.AllAnnotatedModel; import com.orm.model.EmptyModel; import com.orm.model.IntUniqueModel; import com.orm.model.MultiColumnUniqueModel; @@ -111,10 +111,10 @@ public void testTableCreation() { public void testAnnotatedModelTableCreation() { SQLiteDatabase sqLiteDatabase = SugarContext.getSugarContext().getSugarDb().getDB(); SchemaGenerator schemaGenerator = SchemaGenerator.getInstance(); - schemaGenerator.createTable(AllAnotatedModel.class, sqLiteDatabase); + schemaGenerator.createTable(AllAnnotatedModel.class, sqLiteDatabase); String sql = "select count(*) from sqlite_master where type='table' and name='%s';"; - String tableName = NamingHelper.toTableName(AllAnotatedModel.class); + String tableName = NamingHelper.toTableName(AllAnnotatedModel.class); Cursor c = sqLiteDatabase.rawQuery(String.format(sql, tableName), null); if (c.moveToFirst()) { diff --git a/library/src/test/java/com/orm/SugarAppTest.java b/library/src/test/java/com/orm/SugarAppTest.java index 0f247ae8..8da62ce2 100644 --- a/library/src/test/java/com/orm/SugarAppTest.java +++ b/library/src/test/java/com/orm/SugarAppTest.java @@ -18,7 +18,6 @@ public void testOnCreate() { Assert.assertNotNull(context); } - @Test(expected = NullPointerException.class) public void testOnTerminate() { SugarApp app = new SugarApp(); diff --git a/library/src/test/java/com/orm/helper/ManifestHelperTest.java b/library/src/test/java/com/orm/helper/ManifestHelperTest.java index 2fad344c..62c512bd 100644 --- a/library/src/test/java/com/orm/helper/ManifestHelperTest.java +++ b/library/src/test/java/com/orm/helper/ManifestHelperTest.java @@ -2,7 +2,6 @@ import com.orm.app.ClientApp; import com.orm.dsl.BuildConfig; -import com.orm.util.KeyWordUtil; import org.junit.Test; import org.junit.runner.RunWith; @@ -32,7 +31,6 @@ public void testPrivateConstructor() throws Exception { assertNull(helper); } - @Test public void testGetDbName() { assertEquals(DATABASE_DEFAULT_NAME, getDatabaseName()); diff --git a/library/src/test/java/com/orm/helper/NamingHelperTest.java b/library/src/test/java/com/orm/helper/NamingHelperTest.java index d53769ad..048114e7 100644 --- a/library/src/test/java/com/orm/helper/NamingHelperTest.java +++ b/library/src/test/java/com/orm/helper/NamingHelperTest.java @@ -33,7 +33,7 @@ public void testToSQLNameFromField() { if (null != fieldList && !fieldList.isEmpty()) { List columnList = new ArrayList<>(); - for(Field field: fieldList) { + for (Field field: fieldList) { columnList.add(toColumnName(field)); } diff --git a/library/src/test/java/com/orm/model/AllAnotatedModel.java b/library/src/test/java/com/orm/model/AllAnnotatedModel.java similarity index 85% rename from library/src/test/java/com/orm/model/AllAnotatedModel.java rename to library/src/test/java/com/orm/model/AllAnnotatedModel.java index c2fb888d..28a97903 100644 --- a/library/src/test/java/com/orm/model/AllAnotatedModel.java +++ b/library/src/test/java/com/orm/model/AllAnnotatedModel.java @@ -10,7 +10,7 @@ * @author jonatan.salas */ @Table -public class AllAnotatedModel { +public class AllAnnotatedModel { @NotNull @Unique private Long id; @@ -21,5 +21,5 @@ public class AllAnotatedModel { @Ignore private String surname; - public AllAnotatedModel() { } + public AllAnnotatedModel() { } } diff --git a/library/src/test/java/com/orm/model/foreignnull/OriginRecord.java b/library/src/test/java/com/orm/model/foreignnull/OriginRecord.java index dbcd84bc..a3b9b108 100644 --- a/library/src/test/java/com/orm/model/foreignnull/OriginRecord.java +++ b/library/src/test/java/com/orm/model/foreignnull/OriginRecord.java @@ -15,6 +15,4 @@ public OriginRecord(Long id, OriginRecord origin) { this.id = id; this.origin = origin; } - - } diff --git a/library/src/test/java/com/orm/query/SelectTest.java b/library/src/test/java/com/orm/query/SelectTest.java index ad0393bd..bee2fee9 100644 --- a/library/src/test/java/com/orm/query/SelectTest.java +++ b/library/src/test/java/com/orm/query/SelectTest.java @@ -16,7 +16,7 @@ public final class SelectTest { @Test - public void testMergeCondition(){ + public void testMergeCondition() { Select where = Select.from(TestRecord.class).where(Condition.prop("test").eq("satya")); assertEquals("(test = ? )", where.getWhereCond()); assertEquals(1, where.getArgs().length); @@ -30,7 +30,7 @@ public void testMergeCondition(){ } @Test - public void testWhere(){ + public void testWhere() { Select where = Select.from(TestRecord.class).where(Condition.prop("test").eq("satya")); assertEquals("(test = ? )", where.getWhereCond()); assertEquals(1, where.getArgs().length); @@ -44,7 +44,7 @@ public void testWhere(){ } @Test - public void toSqlAllClauses(){ + public void toSqlAllClauses() { String toSql = Select.from(TestRecord.class) .where("foo") .orderBy("doe") @@ -56,14 +56,14 @@ public void toSqlAllClauses(){ } @Test - public void toSqlNoClauses(){ + public void toSqlNoClauses() { String toSql = Select.from(TestRecord.class) .toSql(); assertEquals("SELECT * FROM TEST_RECORD ", toSql); } @Test - public void toSqlWhereLimitClauses(){ + public void toSqlWhereLimitClauses() { String toSql = Select.from(TestRecord.class) .where("foo") .limit("10") @@ -73,7 +73,7 @@ public void toSqlWhereLimitClauses(){ @Test - public void testWhereOr(){ + public void testWhereOr() { Select where = Select.from(TestRecord.class).whereOr(Condition.prop("test").eq("satya")); assertEquals("(test = ? )", where.getWhereCond()); assertEquals(1, where.getArgs().length); @@ -87,7 +87,7 @@ public void testWhereOr(){ } @Test - public void testAnd(){ + public void testAnd() { Select where = Select.from(TestRecord.class).whereOr(Condition.prop("test").eq("satya")); assertEquals("(test = ? )", where.getWhereCond()); assertEquals(1, where.getArgs().length); @@ -102,7 +102,7 @@ public void testAnd(){ } @Test - public void testOr(){ + public void testOr() { Select where = Select.from(TestRecord.class).whereOr(Condition.prop("test").eq("satya")); assertEquals("(test = ? )", where.getWhereCond()); assertEquals(1, where.getArgs().length); diff --git a/library/src/test/java/com/orm/record/DoubleFieldTests.java b/library/src/test/java/com/orm/record/DoubleFieldTests.java index a05fa3e0..f4b4fb95 100644 --- a/library/src/test/java/com/orm/record/DoubleFieldTests.java +++ b/library/src/test/java/com/orm/record/DoubleFieldTests.java @@ -1,7 +1,6 @@ package com.orm.record; import com.orm.app.ClientApp; -import com.orm.SugarRecord; import com.orm.dsl.BuildConfig; import com.orm.model.DoubleFieldAnnotatedModel; import com.orm.model.DoubleFieldExtendedModel; diff --git a/library/src/test/java/com/orm/record/NestedMixedBATests.java b/library/src/test/java/com/orm/record/NestedMixedBATests.java index c6f07da5..6a803404 100644 --- a/library/src/test/java/com/orm/record/NestedMixedBATests.java +++ b/library/src/test/java/com/orm/record/NestedMixedBATests.java @@ -1,7 +1,6 @@ package com.orm.record; import com.orm.app.ClientApp; -import com.orm.SugarRecord; import com.orm.dsl.BuildConfig; import com.orm.model.NestedMixedBAModel; import com.orm.model.RelationshipMixedAModel; diff --git a/library/src/test/java/com/orm/util/ContextUtilTest.java b/library/src/test/java/com/orm/util/ContextUtilTest.java index 9ce16c7d..e23fd903 100644 --- a/library/src/test/java/com/orm/util/ContextUtilTest.java +++ b/library/src/test/java/com/orm/util/ContextUtilTest.java @@ -28,7 +28,6 @@ public void testPrivateConstructor() throws Exception { assertNull(contextUtil); } - @Test public void testInitContext() { assertNotNull(getContext());