Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused allocations #166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1886,8 +1886,8 @@ private static class TimeCollector {
long typeCount;
long perJoinpointCount;
long perTypes;
Map<String, Long> joinpointsPerPointcut = new HashMap<>();
Map<String, Long> timePerPointcut = new HashMap<>();
final Map<String, Long> joinpointsPerPointcut;
final Map<String, Long> timePerPointcut;
Map<String, Long> fastMatchTimesPerPointcut = new HashMap<>();
Map<String, Long> fastMatchTypesPerPointcut = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class PointcutImpl implements Pointcut {
private final PointcutExpression pc;
private final Method baseMethod;
private final AjType<?> declaringType;
private String[] parameterNames = new String[0];
private final String[] parameterNames;

protected PointcutImpl(String name, String pc, Method method, AjType declaringType, String pNames) {
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,8 @@ protected void setupOptions() {
}

protected File zipDirectory(File dir) {
File tempDir = new File(".");
try {
tempDir = File.createTempFile("AjcTest", ".tmp");
File tempDir = File.createTempFile("AjcTest", ".tmp");
tempDir.mkdirs();
tempDir.deleteOnExit(); // XXX remove zip explicitly..
} catch (IOException e) {
Expand Down
2 changes: 0 additions & 2 deletions util/src/main/java/org/aspectj/util/FileUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public String toString() {
// }
// };

final static int[] INT_RA = new int[0];

/** accept all files */
public static final FileFilter ALL = new FileFilter() {
public boolean accept(File f) {
Expand Down
4 changes: 2 additions & 2 deletions util/src/main/java/org/aspectj/util/GenericSignature.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public String toString() {

public static class MethodTypeSignature {
public FormalTypeParameter[] formalTypeParameters = FormalTypeParameter.NONE;
public TypeSignature[] parameters = new TypeSignature[0];
public final TypeSignature[] parameters;
public TypeSignature returnType;
public FieldTypeSignature[] throwsSignatures = new FieldTypeSignature[0];
public final FieldTypeSignature[] throwsSignatures;

public MethodTypeSignature(FormalTypeParameter[] aFormalParameterList, TypeSignature[] aParameterList,
TypeSignature aReturnType, FieldTypeSignature[] aThrowsSignatureList) {
Expand Down