Permalink
Browse files

Fixed bug of code generation for methods with shadowed generics

  • Loading branch information...
senneco committed Mar 24, 2016
1 parent 2e4404f commit ac081cd089612eea26759a83accd1b757ceea90e
View
@@ -15,4 +15,6 @@
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
#org.gradle.java.home=<path to jdk1.8 for tests>
@@ -277,17 +277,23 @@ else if ("tag()".equals(key.toString()))
generics += ", ";
}
generics += typeVariable.asElement();
final TypeMirror upperBound = typeVariable.getUpperBound();
if (upperBound.toString().equals(Object.class.getCanonicalName()))
{
generics += typeVariable.asElement();
continue;
}
final String filledGeneric = fillGenerics(methodTypes, upperBound);
generics += " extends " + filledGeneric;
if (filledGeneric.startsWith("?"))
{
generics += filledGeneric.replaceFirst("\\?", typeVariable.asElement().toString());
}
else
{
generics += typeVariable.asElement() + " extends " + filledGeneric;
}
}
generics += "> ";
}
@@ -1,6 +1,5 @@
package view;
import com.arellomobile.mvp.GenerateViewState;
import com.arellomobile.mvp.MvpView;
/**
@@ -9,7 +8,6 @@
*
* @author Savin Mikhail
*/
@GenerateViewState
public interface PositiveViewStateView extends MvpView
{
void method();

0 comments on commit ac081cd

Please sign in to comment.