Fix most unchecked/deprecation javac warnings in compiler modules
This commit is contained in:
@@ -70,6 +70,7 @@ public class SourceMap3Builder implements SourceMapBuilder {
|
||||
|
||||
@Override
|
||||
public String build() {
|
||||
@SuppressWarnings("unchecked")
|
||||
JsonObject json = new JsonObject();
|
||||
json.getProperties().put("version", new JsonNumber(3));
|
||||
json.getProperties().put("file", new JsonString(generatedFile.getName()));
|
||||
|
||||
@@ -49,14 +49,15 @@ public final class BindingUtils {
|
||||
private BindingUtils() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@NotNull
|
||||
static private <E extends PsiElement, D extends DeclarationDescriptor>
|
||||
D getDescriptorForExpression(@NotNull BindingContext context, @NotNull E expression, Class<D> descriptorClass) {
|
||||
private static <E extends PsiElement, D extends DeclarationDescriptor> D getDescriptorForExpression(
|
||||
@NotNull BindingContext context, @NotNull E expression, Class<D> descriptorClass
|
||||
) {
|
||||
DeclarationDescriptor descriptor = context.get(BindingContext.DECLARATION_TO_DESCRIPTOR, expression);
|
||||
assert descriptor != null;
|
||||
assert descriptorClass.isInstance(descriptor)
|
||||
: message(expression, expression.toString() + " expected to have of type" + descriptorClass.toString());
|
||||
//noinspection unchecked
|
||||
return (D) descriptor;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user