Skip to content

Commit fd4c3d9

Browse files
committed
Fix NPE during incremental build
1 parent b75c88b commit fd4c3d9

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/handler/OrmLiteDaoHandler.java‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,10 @@ private boolean isSubtypeOfDao(TypeMirror type) {
136136
* succeeding
137137
*/
138138
private void createDaoParametrizedTypes() {
139-
if (daoParametrizedType == null) {
140-
TypeMirror wildcardType = helper.getTypeUtils().getWildcardType(null, null);
141-
TypeElement daoTypeElement = helper.typeElementFromQualifiedName(CanonicalNameConstants.DAO);
142-
daoParametrizedType = helper.getTypeUtils().getDeclaredType(daoTypeElement, wildcardType, wildcardType);
143-
TypeElement runtimeExceptionDaoTypeElement = helper.typeElementFromQualifiedName(CanonicalNameConstants.RUNTIME_EXCEPTION_DAO);
144-
runtimeExceptionDaoParametrizedType = helper.getTypeUtils().getDeclaredType(runtimeExceptionDaoTypeElement, wildcardType, wildcardType);
145-
}
139+
TypeMirror wildcardType = helper.getTypeUtils().getWildcardType(null, null);
140+
TypeElement daoTypeElement = helper.typeElementFromQualifiedName(CanonicalNameConstants.DAO);
141+
daoParametrizedType = helper.getTypeUtils().getDeclaredType(daoTypeElement, wildcardType, wildcardType);
142+
TypeElement runtimeExceptionDaoTypeElement = helper.typeElementFromQualifiedName(CanonicalNameConstants.RUNTIME_EXCEPTION_DAO);
143+
runtimeExceptionDaoParametrizedType = helper.getTypeUtils().getDeclaredType(runtimeExceptionDaoTypeElement, wildcardType, wildcardType);
146144
}
147145
}

0 commit comments

Comments
 (0)