Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message for inaccessible private fields #388

Merged
merged 1 commit into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {

ext.KOTLIN_VERSION = "1.2.10"
ext.KOTLIN_VERSION = "1.2.20"
ext.ANDROID_PLUGIN_VERSION = "3.0.1"

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,14 @@ private void findGetterAndSetterForPrivateField(ErrorLogger errorLogger) {
}
}
if (getterMethodName == null || setterMethodName == null) {
// We disable the "private" field setting so that we can still generate
// some code that compiles in an ok manner (ie via direct field access)
isPrivate = false;

errorLogger
.logError("%s annotations must not be on private fields"
+ " without proper getter and setter methods. (class: %s, field: %s)",
EpoxyAttribute.class,
EpoxyAttribute.class.getSimpleName(),
classElement.getSimpleName(),
fieldName);
}
Expand Down