diff options
Diffstat (limited to 'src/proguard/preverify/Preverifier.java')
-rw-r--r-- | src/proguard/preverify/Preverifier.java | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/proguard/preverify/Preverifier.java b/src/proguard/preverify/Preverifier.java index da9649b..59dad7f 100644 --- a/src/proguard/preverify/Preverifier.java +++ b/src/proguard/preverify/Preverifier.java @@ -2,7 +2,7 @@ * ProGuard -- shrinking, optimization, obfuscation, and preverification * of Java bytecode. * - * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu) + * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -54,20 +54,15 @@ public class Preverifier programClassPool.classesAccept(new ClassCleaner()); // Preverify all methods. - ClassVisitor preverifier = + // Classes for JME must be preverified. + // Classes for JSE 6 may optionally be preverified. + // Classes for JSE 7 or higher must be preverified. + programClassPool.classesAccept( + new ClassVersionFilter(configuration.microEdition ? + ClassConstants.CLASS_VERSION_1_0 : + ClassConstants.CLASS_VERSION_1_6, new AllMethodVisitor( new AllAttributeVisitor( - new CodePreverifier(configuration.microEdition))); - - // Classes from Java 6 may optionally be preverified. - // Classes from Java 7 or higher must be preverified. - if (!configuration.microEdition) - { - preverifier = - new ClassVersionFilter(ClassConstants.INTERNAL_CLASS_VERSION_1_6, - preverifier); - } - - programClassPool.classesAccept(preverifier); + new CodePreverifier(configuration.microEdition))))); } } |