Skip to content

Commit

Permalink
Fixed IDE warning
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 9, 2015
1 parent b09cd9d commit 9d10526
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public String convert(JavaMethodResource source)
annotation.setCompleter(new UICompleter<String>()
{
@Override
public Iterable<String> getCompletionProposals(UIContext context, InputComponent<?, String> input, String value)
public Iterable<String> getCompletionProposals(UIContext context, InputComponent<?, String> input,
String value)
{
Project project = getSelectedProject(builder.getUIContext());
List<JavaResource> javaClasses = projectOperations.getProjectAnnotations(project);
Expand All @@ -190,6 +191,7 @@ public Iterable<String> getCompletionProposals(UIContext context, InputComponent
builder.add(targetClass).add(annotation).add(onProperty).add(onMethod);
}

@SuppressWarnings("unchecked")
@Override
public Result execute(UIExecutionContext context) throws Exception
{
Expand All @@ -200,7 +202,7 @@ public Result execute(UIExecutionContext context) throws Exception
if (onProperty.hasValue())
{
String propertyName = onProperty.getValue().getUnderlyingResourceObject().getName();
AnnotationTargetSource field = javaSource.getField(propertyName);
AnnotationTargetSource<JavaClassSource, ?> field = javaSource.getField(propertyName);

addAnnotationToSource(field, annotation.getValue());

Expand All @@ -209,7 +211,7 @@ public Result execute(UIExecutionContext context) throws Exception
}
else if (onMethod.hasValue())
{
List<Parameter> parameters = onMethod.getValue().getUnderlyingResourceObject().getParameters();
List<Parameter<?>> parameters = onMethod.getValue().getUnderlyingResourceObject().getParameters();

String[] stringParametersArray = new String[parameters.size()];

Expand All @@ -219,7 +221,7 @@ else if (onMethod.hasValue())
}

String methodName = onMethod.getValue().getUnderlyingResourceObject().getName();
AnnotationTargetSource method = javaSource.getMethod(methodName, stringParametersArray);
AnnotationTargetSource<JavaClassSource, ?> method = javaSource.getMethod(methodName, stringParametersArray);

addAnnotationToSource(method, annotation.getValue());

Expand All @@ -239,7 +241,7 @@ else if (onMethod.hasValue())
return result;
}

private void addAnnotationToSource(AnnotationTargetSource targetSource, String annotationStr)
private void addAnnotationToSource(AnnotationTargetSource<JavaClassSource, ?> targetSource, String annotationStr)
{
String annotationClassName = getAnnotationClassNameFromString(annotationStr);

Expand Down Expand Up @@ -289,7 +291,8 @@ private void populateAnnotationFromString(AnnotationSource<JavaClassSource> anno
{
if ("$missing$".equals(valuePair.getLiteralValue()))
{
throw new IllegalArgumentException("Parameter \"" + valuePair.getName() + "\" is missing or is incomplete.");
throw new IllegalArgumentException(
"Parameter \"" + valuePair.getName() + "\" is missing or is incomplete.");
}
annotationSource.setLiteralValue(valuePair.getName(), valuePair.getLiteralValue());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public Result execute(UIExecutionContext context) throws Exception
if (targetclass instanceof Extendable)
{
superClassMethod = inspectSuperClasses(context,
((Extendable) targetclass).getSuperType(), name,
((Extendable<?>) targetclass).getSuperType(), name,
parameterTypes);
}

Expand Down

0 comments on commit 9d10526

Please sign in to comment.