Tag List report – Apache Commons BCEL (original) (raw)

org.apache.bcel.Constants

Line

mutable public array!!

2460

org.apache.bcel.PLSETest

Line

need for real assertions here

156

org.apache.bcel.classfile.AccessFlags

Line

not used externally at present

34

org.apache.bcel.classfile.AnnotationEntry

Line

return List

163

org.apache.bcel.classfile.Annotations

Line

Auto-generated method stub

91

org.apache.bcel.classfile.Attribute

Line

make private (has getter & setter).

254

org.apache.bcel.classfile.BootstrapMethod

Line

should this throw?

96

org.apache.bcel.classfile.BootstrapMethods

Line

this could be made final (setter is not used)

39

org.apache.bcel.classfile.Code

Line

this could be made final (setter is not used)

66

this could be made final (setter is not used)

67

org.apache.bcel.classfile.CodeException

Line

should this throw?

133

unused

210

unused

219

org.apache.bcel.classfile.CodeExceptionTest

Line

--No comment--

23

org.apache.bcel.classfile.Constant

Line

should be private & final

131

should this throw?

164

org.apache.bcel.classfile.ConstantCP

Line

make private (has getter & setter) This field has the same meaning for all subclasses.

47

make private (has getter & setter)

54

org.apache.bcel.classfile.ConstantPool

Line

should this throw?

227

org.apache.bcel.classfile.ConstantUtf8

Line

these should perhaps be AtomicInt?

87

org.apache.bcel.classfile.ElementValue

Line

isRuntimeVisible

142

should be final

167

should be final

173

org.apache.bcel.classfile.InnerClass

Line

should this throw?

94

unused

171

unused

180

org.apache.bcel.classfile.InnerClasses

Line

this could be recoded to use a lower level constructor after creating a copy of the inner classes

106

org.apache.bcel.classfile.JavaClass

Line

Check if assignment compatibility is sufficient. What does Sun do?

445

make protected?

996

org.apache.bcel.classfile.JavaClassCyclicTest

Line

Use the test method once ClassCircularityError is implemented for this case test(cyclicTestClass::getAllInterfaces); TOOO Remove once the above is used

113

org.apache.bcel.classfile.LineNumber

Line

should this throw?

89

org.apache.bcel.classfile.LineNumberTable

Line

could use the lower level constructor and thereby allow lineNumberTable to be made final

102

org.apache.bcel.classfile.LocalVariable

Line

should this throw?

143

unused

258

unused

276

unused

285

unused

294

org.apache.bcel.classfile.MethodParameter

Line

should this throw?

78

org.apache.bcel.classfile.ModuleExports

Line

should this throw?

77

org.apache.bcel.classfile.ModuleOpens

Line

should this throw?

77

org.apache.bcel.classfile.ModuleProvides

Line

should this throw?

79

org.apache.bcel.classfile.ModuleRequires

Line

should this throw?

71

org.apache.bcel.classfile.ParameterAnnotationEntry

Line

isRuntimeVisible

67

org.apache.bcel.classfile.StackMapEntry

Line

unused

336

unused

344

org.apache.bcel.classfile.StackMapType

Line

should this throw?

92

org.apache.bcel.generic.BranchHandle

Line

could be package-protected?

69

org.apache.bcel.generic.CPInstruction

Line

could be package-protected?

112

org.apache.bcel.generic.ClassGen

Line

Sometime later, trash any attributes called 'RuntimeVisibleAnnotations' or 'RuntimeInvisibleAnnotations'

417

could be package-protected - only called by test code

611

could be package-protected - only called by test code

642

org.apache.bcel.generic.CodeExceptionGen

Line

could be package-protected?

140

could be package-protected?

150

could be package-protected?

160

org.apache.bcel.generic.ConstantPoolGen

Line

should this be handled somehow? } else if (c instanceof org.apache.bcel.classfile.ConstantMethodHandle) {

203

should this be handled somehow? } else if (c instanceof org.apache.bcel.classfile.ConstantModule) {

205

should this be handled somehow? } else if (c instanceof org.apache.bcel.classfile.ConstantPackage) {

207

should this be handled somehow? } else { // Not helpful, should throw an exception. assert false : "Unexpected constant type: " + c.getClass().getName(); }

209

org.apache.bcel.generic.ElementValueGen

Line

isRuntimeVisible ??????????

146

org.apache.bcel.generic.FieldAnnotationsTest

Line

L...;?

68

org.apache.bcel.generic.FieldGenOrMethodGen

Line

could this be package protected?

69

could be package-protected?

200

could be package-protected?

205

could be package-protected?

210

org.apache.bcel.generic.GeneratingAnnotatedClassesTest

Line

L??;

358

org.apache.bcel.generic.Instruction

Line

check range?

575

org.apache.bcel.generic.InstructionHandle

Line

remove this method in any redesign of BCEL

317

org.apache.bcel.generic.InstructionList

Line

could be package-protected? (some test code would need to be repackaged)

1110

should this be an error?

1173

org.apache.bcel.generic.JavaHome

Line

Apache Commons 2.14.0: Use FilesUncheck

73

org.apache.bcel.generic.LDC

Line

useless check?

71

org.apache.bcel.generic.LineNumberGen

Line

could be package-protected?

84

could be package-protected?

90

org.apache.bcel.generic.LocalVariableGen

Line

could be package-protected?

213

could be package-protected?

246

org.apache.bcel.generic.LocalVariableInstruction

Line

could be package-protected?

171

org.apache.bcel.generic.MethodGen

Line

could be package-protected?

1177

could be package-protected?

1186

could be package-protected? (some tests would need repackaging)

1193

could be package-protected? (some tests would need repackaging)

1226

could be package-protected?

1239

org.apache.bcel.generic.ReferenceType

Line

Above sounds a little arbitrary. On the other hand, there is no object referenced by {@link #NULL} so we can also say all the objects referenced by {@link #NULL} were derived from {@link Object}. However, the Java Language's "instanceof" operator proves us wrong: "null" is not referring to an instance of {@link Object} :)

62

Is there a proof of {@link #OBJECT} being the direct ancestor of every ArrayType?

69

Above sounds a little arbitrary. On the other hand, there is no object referenced by {@link #NULL} so we can also say all the objects referenced by {@link #NULL} were derived from {@link Object}. However, the Java Language's "instanceof" operator proves us wrong: "null" is not referring to an instance of {@link Object} :)

95

Is there a proof of {@link #OBJECT} being the direct ancestor of every ArrayType?

112

The above line is correct comparing to the vmspec2. But one could make class file verification a bit stronger here by using the notion of superinterfaces or even castability or assignment compatibility.

121

Check if this is still valid or find a way to dynamically find out which interfaces arrays implement. However, as of the JVM specification edition 2, there are at least two different pages where assignment compatibility is defined and on one of them "interfaces implemented by arrays" is exchanged with "'Cloneable' or 'java.io.Serializable'"

235

org.apache.bcel.generic.Select

Line

could be package-protected?

291

org.apache.bcel.generic.Type

Line

should be final (and private)

324

org.apache.bcel.util.BCELifierTest

Line

detect if JDK present and skip test if not

227

org.apache.bcel.util.Class2HTMLTest

Line

assertions on generated HTML code

52

org.apache.bcel.util.ClassQueue

Line

not used externally

34

org.apache.bcel.verifier.statics.Pass1Verifier

Line

Maybe change Repository's behavior to throw a LoadingException instead of just returning "null" if a class file cannot be found or in another way be looked up.

157

org.apache.bcel.verifier.statics.Pass2Verifier

Line

rework it.

226

implement. Are there any restrictions?

1176

org.apache.bcel.verifier.statics.Pass3aVerifier

Line

From time to time check if BCEL allows to detect if the 'count' operand is consistent with the information in the CONSTANT_InterfaceMethodref and if the last operand is zero. By now, BCEL hides those two operands because they're superfluous.

458

Make this a binary search! The instructionPositions array is naturally ordered!

926

--No comment--

1029

Check how BCEL handles (and will handle) instructions like IMPDEP1, IMPDEP2, BREAKPOINT... that BCEL knows about but which are illegal anyway. We currently go the safe way here.

1107

see the do_verify() comments. Maybe we should really work on the byte array first to give more comprehensive messages.

1150

Review Exception API, possibly build in some "offending instruction" thing when we're ready to insulate the offending instruction by doing the above thing.

1152

Implement as much as possible here. BCEL does _not_ check everything.

1156

org.apache.bcel.verifier.structurals.ControlFlowGraph

Line

implement caching!

97

remove. Only JustIce must not use it, but foreign users of the ControlFlowGraph will want it. Thanks Johannes Wust. throw new AssertionViolatedException("DID YOU REALLY WANT TO ASK FOR RET'S SUCCS?");

110

Can be performance-improved.

319

Put information in the brackets, for example Is this an ExceptionHandler? Is this a RET? Is this the start of a subroutine?

344

org.apache.bcel.verifier.structurals.ExecutionVisitor

Line

could be package-protected?

95

could be package-protected?

106

One could use a sophisticated analysis here to check if a type cannot possibly be cated to another and by so doing predict the ClassCastException at run-time.

237

org.apache.bcel.verifier.structurals.InstConstraintVisitor

Line

could be package-protected?

155

could be package-protected?

167

This can possibly only be checked using Staerk-et-al's "set-of-object types", not using "wider cast object types" created during verification. Comment it out if you encounter problems. See also the analogon at visitPUTFIELD|visitPUTSTATIC.

944

One day move to Staerk-et-al's "Set of object types" instead of "wider" object types created during the verification. "Wider" object types don't allow us to check for things like that below. constraintViolated(o, "The referenced field has the ACC_PROTECTED modifier, "+ "and it's a member of the current class or a superclass of the current class."+ " However, the referenced object type '"+stack().peek()+ "' is not the current class or a subclass of the current class."); }

1071

Could go into Pass 3a.

1082

--No comment--

1555

Do we want to do anything with it? ConstantInterfaceMethodref cimr = (ConstantInterfaceMethodref) (cpg.getConstant(o.getIndex()));

1570

This can only be checked when using Staerk-et-al's "set of object types" instead of a "wider cast object type" created during verification. if ( ! rFromStack.isAssignmentCompatibleWith(rFromDesc) ) { constraintViolated(o, "Expecting a '"+fromDesc+"' but found a '"+fromStack+ "' on the stack (which is not assignment compatible)."); }

1598

This can only be checked if we're using Staerk-et-al's "set of object types" instead of "wider cast object types" generated during verification. if ( ! Repository.implementationOf(objRefClassName, theInterface) ) { constraintViolated(o, "The 'objRef' item '" + objRef + "' does not implement '" + theInterface + "' as expected."); }

1629

This can possibly only be checked when using Staerk-et-al's "set of object types" instead of a single "wider cast object type" created during verification.

1668

Could go into Pass 3a.

2454

This can only be checked if using Staerk-et-al's "set of object types" instead of a "wider cast object type" created during verification. if (! (objectref.isAssignmentCompatibleWith(mg.getType())) ) { constraintViolated(o, "Type on stack top which should be returned is a '"+stack().peek()+ "' which is not assignment compatible with the return type of this method, '"+mg.getType()+"'."); }

2531

org.apache.bcel.verifier.structurals.LocalVariables

Line

if ((locals[i] instanceof org.apache.bcel.generic.ReturnaddressType) && (lv.locals[i] instanceof org.apache.bcel.generic.ReturnaddressType)) { //System.err.println("merging "+locals[i]+" and "+lv.locals[i]); throw new AssertionViolatedException("Merging different ReturnAddresses: '"+locals[i]+"' and '"+lv.locals[i]+"'."); }

176

could be package-protected?

194

org.apache.bcel.verifier.structurals.Pass3bVerifier

Line

Throughout pass 3b, upper halves of LONG and DOUBLE are represented by Type.UNKNOWN. This should be changed in favor of LONG_Upper and DOUBLE_Upper as in pass 2.

59

the "oldchain" and "newchain" is used to determine the subroutine we're in (by searching for the last JSR) by the InstructionContext implementation. Therefore, we should not use this chain mechanism when dealing with exception handlers. Example: a JSR with an exception handler as its successor does not mean we're in a subroutine if we go to the exception handler. We should address this problem later; by now we simply "cut" the chain by using an empty chain for the exception handlers. if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(), new OperandStack (u.getOutFrame().getStack().maxStack(), (exc_hds[s].getExceptionType() == null ? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev) { icq.add(v, (ArrayList) newchain.clone());

253

This is buggy, we check only the top-level return instructions this way. Maybe some maniac returns from a method when in a subroutine?

277

org.apache.bcel.verifier.structurals.Subroutines

Line

refer to the paper.

56

Implement caching.

149

can this be made private? CHECKSTYLE:ON

401

org.apache.bcel.verifier.tests.TestArrayAccess02Creator

Line

why is this not used

64

why is this not used

67

why is this not used

80

why is this not used

84

why is this not used

88

why is this not used

95

org.apache.bcel.verifier.tests.TestArrayAccess03Creator

Line

why is this not used

64

why is this not used

67

why is this not used

80

why is this not used

84

why is this not used

91

org.apache.bcel.verifier.tests.TestArrayAccess04Creator

Line

why is this not used

68

why is this not used

71

why is this not used

84

why is this not used

88

why is this not used

91

why is this not used

96

org.apache.bcel.verifier.tests.TestReturn01Creator

Line

why is this not used

60

why is this not used

63

why is this not used

76

why is this not used

81

org.apache.bcel.verifier.tests.TestReturn03Creator

Line

why is this not used

66

why is this not used

69

why is this not used

82

org.apache.bcel.visitors.CountingVisitor

Line

Auto-generated method stub

301

Auto-generated method stub

312

Auto-generated method stub

491