Created ProGuard version 5.3.1.

This commit is contained in:
Eric Lafortune 2016-10-23 23:10:50 +02:00
Родитель 442c661e52
Коммит 9942e031ce
22 изменённых файлов: 70 добавлений и 54 удалений

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-anttask</artifactId>

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-base</artifactId>

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-gradle</artifactId>

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-gui</artifactId>

Просмотреть файл

@ -7,7 +7,7 @@
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<packaging>pom</packaging>
<name>[${project.groupId}] ${project.artifactId}</name>
<description>ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier.</description>

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-retrace</artifactId>

Просмотреть файл

@ -7,7 +7,7 @@
<parent>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-parent</artifactId>
<version>5.3</version>
<version>5.3.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>proguard-wtk-plugin</artifactId>

Двоичные данные
examples/annotations/lib/annotations.jar

Двоичный файл не отображается.

Просмотреть файл

@ -39,7 +39,7 @@ import java.io.*;
*/
public class ProGuard
{
public static final String VERSION = "ProGuard, version 5.3";
public static final String VERSION = "ProGuard, version 5.3.1";
private final Configuration configuration;
private ClassPool programClassPool = new ClassPool();

Просмотреть файл

@ -25,7 +25,7 @@ preverification = Preverification
#
# Panel titles.
#
welcome = Welcome to ProGuard, version 5.3
welcome = Welcome to ProGuard, version 5.3.1
options = Options
keepAdditional = Keep additional classes and class members
keepNamesAdditional = Keep additional class names and class member names

Просмотреть файл

@ -33,7 +33,7 @@ import java.util.*;
*/
public class ReTrace
{
private static final String USAGE = "Usage: java proguard.ReTrace [-regex <regex>] [-verbose] <mapping_file> [<stacktrace_file>]";
private static final String USAGE = "Usage: java proguard.retrace.ReTrace [-regex <regex>] [-verbose] <mapping_file> [<stacktrace_file>]";
private static final String REGEX_OPTION = "-regex";
private static final String VERBOSE_OPTION = "-verbose";

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class AndMatcher implements StringMatcher
public class AndMatcher extends StringMatcher
{
private final StringMatcher matcher1;
private final StringMatcher matcher2;
@ -41,9 +41,9 @@ public class AndMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return matcher1.matches(string) &&
matcher2.matches(string);
return matcher1.matches(string, offset, length) &&
matcher2.matches(string, offset, length);
}
}

Просмотреть файл

@ -25,7 +25,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class ConstantMatcher implements StringMatcher
public class ConstantMatcher extends StringMatcher
{
private boolean matches;
@ -41,7 +41,7 @@ public class ConstantMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return matches;
}

Просмотреть файл

@ -25,12 +25,12 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class EmptyStringMatcher implements StringMatcher
public class EmptyStringMatcher extends StringMatcher
{
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return string.length() == 0;
return length == 0;
}
}

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class ExtensionMatcher implements StringMatcher
public class ExtensionMatcher extends StringMatcher
{
private final String extension;
@ -43,9 +43,9 @@ public class ExtensionMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return endsWithIgnoreCase(string, extension);
return endsWithIgnoreCase(string, offset, length, extension);
}
@ -53,11 +53,10 @@ public class ExtensionMatcher implements StringMatcher
* Returns whether the given string ends with the given suffix, ignoring its
* case.
*/
private static boolean endsWithIgnoreCase(String string, String suffix)
private static boolean endsWithIgnoreCase(String string, int offset, int length, String suffix)
{
int stringLength = string.length();
int suffixLength = suffix.length();
return string.regionMatches(true, stringLength - suffixLength, suffix, 0, suffixLength);
return string.regionMatches(true, offset + length - suffixLength, suffix, 0, suffixLength);
}
}

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class FixedStringMatcher implements StringMatcher
public class FixedStringMatcher extends StringMatcher
{
private final String fixedString;
private final StringMatcher nextMatcher;
@ -47,10 +47,14 @@ public class FixedStringMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return string.startsWith(fixedString) &&
int fixedStringLength = fixedString.length();
return length >= fixedStringLength &&
string.startsWith(fixedString, offset) &&
(nextMatcher == null ||
nextMatcher.matches(string.substring(fixedString.length())));
nextMatcher.matches(string,
offset + fixedStringLength,
length - fixedStringLength));
}
}

Просмотреть файл

@ -28,7 +28,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class ListMatcher implements StringMatcher
public class ListMatcher extends StringMatcher
{
private final StringMatcher[] matchers;
private final boolean[] negate;
@ -49,13 +49,13 @@ public class ListMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
// Check the list of matchers.
for (int index = 0; index < matchers.length; index++)
{
StringMatcher matcher = matchers[index];
if (matcher.matches(string))
if (matcher.matches(string, offset, length))
{
return negate == null ||
!negate[index];

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class NotMatcher implements StringMatcher
public class NotMatcher extends StringMatcher
{
private final StringMatcher matcher;
@ -39,8 +39,8 @@ public class NotMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return !matcher.matches(string);
return !matcher.matches(string, offset, length);
}
}

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class OrMatcher implements StringMatcher
public class OrMatcher extends StringMatcher
{
private final StringMatcher matcher1;
private final StringMatcher matcher2;
@ -41,9 +41,9 @@ public class OrMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return matcher1.matches(string) ||
matcher2.matches(string);
return matcher1.matches(string, offset, length) ||
matcher2.matches(string, offset, length);
}
}

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class SettableMatcher implements StringMatcher
public class SettableMatcher extends StringMatcher
{
private StringMatcher matcher;
@ -39,8 +39,8 @@ public class SettableMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
return matcher.matches(string);
return matcher.matches(string, offset, length);
}
}

Просмотреть файл

@ -22,17 +22,30 @@ package proguard.util;
/**
* This interface provides a method to determine whether strings match a given
* criterion, which is specified by the implementation.
* This abstract class provides methods to determine whether strings match
* a given criterion, which is specified by the implementation.
*
* @author Eric Lafortune
*/
public interface StringMatcher
public abstract class StringMatcher
{
/**
* Checks whether the given string matches.
* @param string the string to match.
* @return a boolean indicating whether the string matches the criterion.
*/
public boolean matches(String string);
public boolean matches(String string)
{
return matches(string, 0, string.length());
}
/**
* Checks whether the given substring matches.
* @param string the string to match.
* @param offset the start offset of the substring.
* @param length the length of the substring.
* @return a boolean indicating whether the substring matches the criterion.
*/
protected abstract boolean matches(String string, int offset, int length);
}

Просмотреть файл

@ -26,7 +26,7 @@ package proguard.util;
*
* @author Eric Lafortune
*/
public class VariableStringMatcher implements StringMatcher
public class VariableStringMatcher extends StringMatcher
{
private final char[] allowedCharacters;
private final char[] disallowedCharacters;
@ -50,15 +50,15 @@ public class VariableStringMatcher implements StringMatcher
// Implementations for StringMatcher.
public boolean matches(String string)
protected boolean matches(String string, int offset, int length)
{
if (string.length() < minimumLength)
if (length < minimumLength)
{
return false;
}
// Check the first minimum number of characters.
for (int index = 0; index < minimumLength; index++)
for (int index = offset; index < offset + minimumLength; index++)
{
if (!isAllowedCharacter(string.charAt(index)))
{
@ -66,12 +66,12 @@ public class VariableStringMatcher implements StringMatcher
}
}
int maximumLength = Math.min(this.maximumLength, string.length());
int maximumLength = Math.min(this.maximumLength, length);
// Check the remaining characters, up to the maximum number.
for (int index = minimumLength; index < maximumLength; index++)
for (int index = offset + minimumLength; index < offset + maximumLength; index++)
{
if (nextMatcher.matches(string.substring(index)))
if (nextMatcher.matches(string, index, length + offset - index))
{
return true;
}
@ -83,7 +83,7 @@ public class VariableStringMatcher implements StringMatcher
}
// Check the remaining characters in the string.
return nextMatcher.matches(string.substring(maximumLength));
return nextMatcher.matches(string, offset + maximumLength, length - maximumLength);
}