Fix more Warnings

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1412 379699f6-c40d-0410-875b-85095c16579e
master
hoenicke 12 years ago
parent 5815ab3a08
commit 3c76f52d03
  1. 2
      jode/src/net/sf/jode/bytecode/ClassInfo.java
  2. 1
      jode/src/net/sf/jode/decompiler/ImportHandler.java
  3. 4
      jode/src/net/sf/jode/decompiler/MethodAnalyzer.java
  4. 2
      jode/src/net/sf/jode/expr/Operator.java
  5. 2
      jode/src/net/sf/jode/flow/ConditionalBlock.java
  6. 2
      jode/src/net/sf/jode/flow/CreateAssignExpression.java
  7. 1
      jode/src/net/sf/jode/flow/Jump.java
  8. 2
      jode/src/net/sf/jode/flow/StructuredBlock.java
  9. 2
      jode/src/net/sf/jode/flow/TransformExceptionHandlers.java
  10. 2
      jode/src/net/sf/jode/jvm/CodeVerifier.java
  11. 2
      jode/src/net/sf/jode/obfuscator/TranslationTable.java
  12. 2
      jode/src/net/sf/jode/obfuscator/modules/NameSwapper.java
  13. 1
      jode/src/net/sf/jode/type/Type.java

@ -19,10 +19,8 @@
package net.sf.jode.bytecode;
import net.sf.jode.GlobalOptions;
import net.sf.jode.util.UnifyHash;
import java.io.DataInputStream;
import java.io.BufferedInputStream;
import java.io.DataOutputStream;
import java.io.OutputStream;
import java.io.IOException;

@ -208,7 +208,6 @@ public class ImportHandler {
}
public void dumpHeader(TabbedPrintWriter writer)
throws java.io.IOException
{
writer.println("/* "+ className
+ " - Decompiled by JODE");

@ -433,7 +433,7 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
Block[] blocks = bb.getBlocks();
for (int i=0; i < blocks.length; i++)
count += blocks[i].getInstructions().length;
return (double) count;
return count;
}
}
@ -984,7 +984,7 @@ public class MethodAnalyzer implements Scope, ClassDeclarer {
}
public void analyzeInvokeOperator(InvokeOperator cop) {
ClassInfo clazz = (ClassInfo) cop.getClassInfo();
ClassInfo clazz = cop.getClassInfo();
ClassAnalyzer anonAnalyzer = getParent().getClassAnalyzer(clazz);
if (anonAnalyzer == null) {

@ -133,7 +133,7 @@ public abstract class Operator extends Expression {
- subExpressions[i].getFreeOperandCount();
subExpressions[i] = expr;
expr.parent = this;
for (Operator ce = this; ce != null; ce = (Operator) ce.parent)
for (Operator ce = this; ce != null; ce = ce.parent)
ce.operandcount += diff;
updateType();
}

@ -35,8 +35,6 @@ public class ConditionalBlock extends InstructionContainer {
public void checkConsistent() {
super.checkConsistent();
if (!(trueBlock instanceof EmptyBlock))
throw new InternalError("Inconsistency");
}
/**

@ -126,7 +126,7 @@ public class CreateAssignExpression {
&& loadExpr.getSubExpressions()[0] instanceof Operator)
loadExpr = (Operator) loadExpr.getSubExpressions()[0];
if (!store.lvalueMatches((Operator) loadExpr)
if (!store.lvalueMatches(loadExpr)
|| !(loadExpr.isFreeOperator(lvalueCount)))
return false;

@ -62,7 +62,6 @@ public class Jump {
* @param writer The tabbed print writer, where we print to.
*/
public void dumpSource(net.sf.jode.decompiler.TabbedPrintWriter writer)
throws java.io.IOException
{
if (destination == null)
writer.println ("GOTO null-ptr!!!!!");

@ -549,7 +549,7 @@ public abstract class StructuredBlock {
subs[i].checkConsistent();
}
if (jump != null && jump.destination != null) {
Jump jumps = (Jump) flowBlock.getJumps(jump.destination);
Jump jumps = flowBlock.getJumps(jump.destination);
for (; jumps != jump; jumps = jumps.next) {
if (jumps == null)
throw new InternalError("Inconsistency");

@ -713,7 +713,7 @@ public class TransformExceptionHandlers {
&& doWhileFalse.bodyBlock instanceof SequentialBlock) {
if (transformSubRoutine(catchBlock.getSubBlocks()[1])) {
finallyBlock = catchBlock.getSubBlocks()[1];
catchBlock = (SequentialBlock) doWhileFalse.bodyBlock;
catchBlock = doWhileFalse.bodyBlock;
}
}
}

@ -1415,7 +1415,7 @@ public class CodeVerifier implements Opcodes {
if (info.jsrInfo == null || !retVarType.isOfType(tType("R")))
throw new VerifyException(instr.getDescription());
Block jsrTarget = retVarType.getJsrTarget();
BitSet usedLocals = (BitSet) info.jsrInfo.jsrUsed;
BitSet usedLocals = info.jsrInfo.jsrUsed;
for (Block lastTarget = info.jsrInfo.jsrTarget;
jsrTarget != lastTarget;
lastTarget = subInfos[lastTarget.getBlockNr()]

@ -69,7 +69,7 @@ public class TranslationTable extends TreeMap {
}
}
public void store(OutputStream out) throws IOException {
public void store(OutputStream out) {
PrintWriter writer = new PrintWriter(out);
for (Iterator i = entrySet().iterator(); i.hasNext(); ) {
Map.Entry e = (Map.Entry) i.next();

@ -68,7 +68,7 @@ public class NameSwapper implements Renamer {
Iterator i = pool.iterator();
while (pos > 0)
i.next();
return (String) i.next();
return i.next();
}
public void remove() {

@ -597,6 +597,7 @@ public class Type {
* Returns the java.lang.Class representing this type. You should
* only call this on singleton types.
* @return the Class object representing this type.
* @throws ClassNotFoundException if Class was not found.
*/
public Class getTypeClass() throws ClassNotFoundException {
switch (typecode) {

Loading…
Cancel
Save