Cleanup (warnings)
This commit is contained in:
@@ -257,8 +257,7 @@ public class ClassWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void addTracer(StructClass cls, StructMethod method, BytecodeMappingTracer tracer) {
|
private static void addTracer(StructClass cls, StructMethod method, BytecodeMappingTracer tracer) {
|
||||||
StructLineNumberTableAttribute table =
|
StructLineNumberTableAttribute table = method.getAttribute(StructGeneralAttribute.ATTRIBUTE_LINE_NUMBER_TABLE);
|
||||||
(StructLineNumberTableAttribute)method.getAttribute(StructGeneralAttribute.ATTRIBUTE_LINE_NUMBER_TABLE);
|
|
||||||
tracer.setLineNumberTable(table);
|
tracer.setLineNumberTable(table);
|
||||||
String key = InterpreterUtil.makeUniqueKey(method.getName(), method.getDescriptor());
|
String key = InterpreterUtil.makeUniqueKey(method.getName(), method.getDescriptor());
|
||||||
DecompilerContext.getBytecodeSourceMapper().addTracer(cls.qualifiedName, key, tracer);
|
DecompilerContext.getBytecodeSourceMapper().addTracer(cls.qualifiedName, key, tracer);
|
||||||
@@ -439,8 +438,7 @@ public class ClassWriter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (fd.hasModifier(CodeConstants.ACC_FINAL) && fd.hasModifier(CodeConstants.ACC_STATIC)) {
|
else if (fd.hasModifier(CodeConstants.ACC_FINAL) && fd.hasModifier(CodeConstants.ACC_STATIC)) {
|
||||||
StructConstantValueAttribute attr =
|
StructConstantValueAttribute attr = fd.getAttribute(StructGeneralAttribute.ATTRIBUTE_CONSTANT_VALUE);
|
||||||
(StructConstantValueAttribute)fd.getAttribute(StructGeneralAttribute.ATTRIBUTE_CONSTANT_VALUE);
|
|
||||||
if (attr != null) {
|
if (attr != null) {
|
||||||
PrimitiveConstant constant = cl.getPool().getPrimitiveConstant(attr.getIndex());
|
PrimitiveConstant constant = cl.getPool().getPrimitiveConstant(attr.getIndex());
|
||||||
buffer.append(" = ");
|
buffer.append(" = ");
|
||||||
@@ -696,8 +694,7 @@ public class ClassWriter {
|
|||||||
|
|
||||||
List<StructMethodParametersAttribute.Entry> methodParameters = null;
|
List<StructMethodParametersAttribute.Entry> methodParameters = null;
|
||||||
if (DecompilerContext.getOption(IFernflowerPreferences.USE_METHOD_PARAMETERS)) {
|
if (DecompilerContext.getOption(IFernflowerPreferences.USE_METHOD_PARAMETERS)) {
|
||||||
StructMethodParametersAttribute attr =
|
StructMethodParametersAttribute attr = mt.getAttribute(StructGeneralAttribute.ATTRIBUTE_METHOD_PARAMETERS);
|
||||||
(StructMethodParametersAttribute)mt.getAttribute(StructGeneralAttribute.ATTRIBUTE_METHOD_PARAMETERS);
|
|
||||||
if (attr != null) {
|
if (attr != null) {
|
||||||
methodParameters = attr.getEntries();
|
methodParameters = attr.getEntries();
|
||||||
}
|
}
|
||||||
@@ -956,7 +953,7 @@ public class ClassWriter {
|
|||||||
private static void appendAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType) {
|
private static void appendAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType) {
|
||||||
Set<String> filter = new HashSet<>();
|
Set<String> filter = new HashSet<>();
|
||||||
|
|
||||||
for (StructGeneralAttribute.Key key : ANNOTATION_ATTRIBUTES) {
|
for (StructGeneralAttribute.Key<?> key : ANNOTATION_ATTRIBUTES) {
|
||||||
StructAnnotationAttribute attribute = (StructAnnotationAttribute)mb.getAttribute(key);
|
StructAnnotationAttribute attribute = (StructAnnotationAttribute)mb.getAttribute(key);
|
||||||
if (attribute != null) {
|
if (attribute != null) {
|
||||||
for (AnnotationExprent annotation : attribute.getAnnotations()) {
|
for (AnnotationExprent annotation : attribute.getAnnotations()) {
|
||||||
@@ -973,7 +970,7 @@ public class ClassWriter {
|
|||||||
private static void appendParameterAnnotations(TextBuffer buffer, StructMethod mt, int param) {
|
private static void appendParameterAnnotations(TextBuffer buffer, StructMethod mt, int param) {
|
||||||
Set<String> filter = new HashSet<>();
|
Set<String> filter = new HashSet<>();
|
||||||
|
|
||||||
for (StructGeneralAttribute.Key key : PARAMETER_ANNOTATION_ATTRIBUTES) {
|
for (StructGeneralAttribute.Key<?> key : PARAMETER_ANNOTATION_ATTRIBUTES) {
|
||||||
StructAnnotationParameterAttribute attribute = (StructAnnotationParameterAttribute)mt.getAttribute(key);
|
StructAnnotationParameterAttribute attribute = (StructAnnotationParameterAttribute)mt.getAttribute(key);
|
||||||
if (attribute != null) {
|
if (attribute != null) {
|
||||||
List<List<AnnotationExprent>> annotations = attribute.getParamAnnotations();
|
List<List<AnnotationExprent>> annotations = attribute.getParamAnnotations();
|
||||||
@@ -991,7 +988,7 @@ public class ClassWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void appendTypeAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType, int index, Set<String> filter) {
|
private static void appendTypeAnnotations(TextBuffer buffer, int indent, StructMember mb, int targetType, int index, Set<String> filter) {
|
||||||
for (StructGeneralAttribute.Key key : TYPE_ANNOTATION_ATTRIBUTES) {
|
for (StructGeneralAttribute.Key<?> key : TYPE_ANNOTATION_ATTRIBUTES) {
|
||||||
StructTypeAnnotationAttribute attribute = (StructTypeAnnotationAttribute)mb.getAttribute(key);
|
StructTypeAnnotationAttribute attribute = (StructTypeAnnotationAttribute)mb.getAttribute(key);
|
||||||
if (attribute != null) {
|
if (attribute != null) {
|
||||||
for (TypeAnnotation annotation : attribute.getAnnotations()) {
|
for (TypeAnnotation annotation : attribute.getAnnotations()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user