Skip to content

Commit

Permalink
Don't show not important warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jun 17, 2013
1 parent 69eb57c commit d6a468f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/jadx/dex/nodes/ClassNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public ClassNode(DexNode dex, ClassDef cls) throws DecodeException {
String fileName = dex.getString(sfIdx);
if(!this.getFullName().contains(fileName.replace(".java", ""))) {
this.getAttributes().add(new SourceFileAttr(fileName));
LOG.info("TODO: move class {} to {} file", this, fileName);
LOG.debug("Class '{}' compiled from '{}'", this, fileName);
}
}

Expand Down
16 changes: 14 additions & 2 deletions src/main/java/jadx/dex/visitors/regions/CheckRegions.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package jadx.dex.visitors.regions;

import jadx.Consts;
import jadx.dex.attributes.AttributeFlag;
import jadx.dex.nodes.BlockNode;
import jadx.dex.nodes.IBlock;
Expand Down Expand Up @@ -37,8 +38,19 @@ public void processBlock(MethodNode mth, IBlock container) {
};
DepthRegionTraverser.traverseAll(mth, collectBlocks);

if (mth.getBasicBlocks().size() != blocksInRegions.size())
mth.getAttributes().add(AttributeFlag.INCONSISTENT_CODE);
if (mth.getBasicBlocks().size() != blocksInRegions.size()) {
for (BlockNode block : mth.getBasicBlocks()) {
if (!blocksInRegions.contains(block)) {
if (!block.getInstructions().isEmpty()) {
mth.getAttributes().add(AttributeFlag.INCONSISTENT_CODE);
if (Consts.DEBUG)
LOG.debug("Missing block: {} in {}", block, mth);
else
break;
}
}
}
}

// check loop conditions
IRegionVisitor checkLoops = new AbstractRegionVisitor() {
Expand Down

0 comments on commit d6a468f

Please sign in to comment.