issue_id
int64 2.04k
425k
| title
stringlengths 9
251
| body
stringlengths 4
32.8k
⌀ | status
stringclasses 6
values | after_fix_sha
stringlengths 7
7
| project_name
stringclasses 6
values | repo_url
stringclasses 6
values | repo_name
stringclasses 6
values | language
stringclasses 1
value | issue_url
null | before_fix_sha
null | pull_url
null | commit_datetime
unknown | report_datetime
unknown | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | join(inJars, global.inJars);
join(inPath, global.inPath);
if ((null == lintMode) || (AJLINT_DEFAULT.equals(lintMode))) {
setLintMode(global.lintMode);
}
if (null == lintSpecFile) {
lintSpecFile = global.lintSpecFile;
}
if (!isTerminateAfterCompilation() && global.isTerminateAfterCompilation()) {
setTerminateAfterCompilation(true);
}
if ((null == outputDir) && (null == outputJar)) {
if (null != global.outputDir) {
outputDir = global.outputDir;
}
if (null != global.outputJar) {
outputJar = global.outputJar;
}
}
join(sourceRoots, global.sourceRoots);
if (!isXnoInline() && global.isXnoInline()) {
setXnoInline(true);
}
if (!isXserializableAspects() && global.isXserializableAspects()) {
setXserializableAspects(true);
}
if (!isXlazyTjp() && global.isXlazyTjp()) {
setXlazyTjp(true);
}
if (!getProceedOnError() && global.getProceedOnError()) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | setProceedOnError(true);
}
setTargetAspectjRuntimeLevel(global.getTargetAspectjRuntimeLevel());
setXJoinpoints(global.getXJoinpoints());
if (!isXHasMemberEnabled() && global.isXHasMemberEnabled()) {
setXHasMemberSupport(true);
}
if (!isXNotReweavable() && global.isXNotReweavable()) {
setXnotReweavable(true);
}
setOutxmlName(global.getOutxmlName());
setXconfigurationInfo(global.getXconfigurationInfo());
setAddSerialVerUID(global.isAddSerialVerUID());
if (!isXmlConfigured() && global.isXmlConfigured()) {
setXmlConfigured(global.isXmlConfigured());
}
setTiming(global.isTiming());
setMakeReflectable(global.isMakeReflectable());
}
@SuppressWarnings({ "rawtypes", "unchecked" })
void join(Collection local, Collection global) {
for (Iterator iter = global.iterator(); iter.hasNext();) {
Object next = iter.next();
if (!local.contains(next)) {
local.add(next);
}
}
}
public void setSourcePathResources(Map<String, File> map) {
sourcePathResources = map; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | }
/**
* used to indicate whether to proceed after parsing config
*/
public boolean shouldProceed() {
return shouldProceed;
}
public void doNotProceed() {
shouldProceed = false;
}
public String getLintMode() {
return lintMode;
}
public void setLintMode(String lintMode) {
this.lintMode = lintMode;
String lintValue = null;
if (AJLINT_IGNORE.equals(lintMode)) {
lintValue = AjCompilerOptions.IGNORE;
} else if (AJLINT_WARN.equals(lintMode)) {
lintValue = AjCompilerOptions.WARNING;
} else if (AJLINT_ERROR.equals(lintMode)) {
lintValue = AjCompilerOptions.ERROR;
}
if (lintValue != null) {
Map<String, String> lintOptions = new HashMap<String, String>();
lintOptions.put(AjCompilerOptions.OPTION_ReportInvalidAbsoluteTypeName, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportInvalidWildcardTypeName, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportUnresolvableMember, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportTypeNotExposedToWeaver, lintValue); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | lintOptions.put(AjCompilerOptions.OPTION_ReportShadowNotInStructure, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportUnmatchedSuperTypeInCall, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportCannotImplementLazyTJP, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportNeedSerialVersionUIDField, lintValue);
lintOptions.put(AjCompilerOptions.OPTION_ReportIncompatibleSerialVersion, lintValue);
options.set(lintOptions);
}
}
public boolean isTerminateAfterCompilation() {
return options.terminateAfterCompilation;
}
public void setTerminateAfterCompilation(boolean b) {
options.terminateAfterCompilation = b;
}
public boolean isXserializableAspects() {
return options.xSerializableAspects;
}
public void setXserializableAspects(boolean xserializableAspects) {
options.xSerializableAspects = xserializableAspects;
}
public void setXJoinpoints(String jps) {
options.xOptionalJoinpoints = jps;
}
public String getXJoinpoints() {
return options.xOptionalJoinpoints;
}
public boolean isXnoInline() {
return options.xNoInline;
}
public void setXnoInline(boolean xnoInline) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | options.xNoInline = xnoInline;
}
public boolean isXlazyTjp() {
return options.xLazyThisJoinPoint;
}
public void setXlazyTjp(boolean b) {
options.xLazyThisJoinPoint = b;
}
public void setXnotReweavable(boolean b) {
options.xNotReweavable = b;
}
public void setXconfigurationInfo(String info) {
options.xConfigurationInfo = info;
}
public String getXconfigurationInfo() {
return options.xConfigurationInfo;
}
public void setXHasMemberSupport(boolean enabled) {
options.xHasMember = enabled;
}
public boolean isXHasMemberEnabled() {
return options.xHasMember;
}
public void setXdevPinpointMode(boolean enabled) {
options.xdevPinpoint = enabled;
}
public boolean isXdevPinpoint() {
return options.xdevPinpoint;
}
public void setAddSerialVerUID(boolean b) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | options.addSerialVerUID = b;
}
public boolean isAddSerialVerUID() {
return options.addSerialVerUID;
}
public void setXmlConfigured(boolean b) {
options.xmlConfigured = b;
}
public void setMakeReflectable(boolean b) {
options.makeReflectable = b;
}
public boolean isXmlConfigured() {
return options.xmlConfigured;
}
public boolean isMakeReflectable() {
return options.makeReflectable;
}
public boolean isXNotReweavable() {
return options.xNotReweavable;
}
public boolean isGenerateJavadocsInModelMode() {
return options.generateJavaDocsInModel;
}
public void setGenerateJavadocsInModelMode(boolean generateJavadocsInModelMode) {
options.generateJavaDocsInModel = generateJavadocsInModelMode;
}
public boolean isGenerateCrossRefsMode() {
return options.generateCrossRefs;
}
public void setGenerateCrossRefsMode(boolean on) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | options.generateCrossRefs = on;
}
public boolean isCheckRuntimeVersion() {
return options.checkRuntimeVersion;
}
public void setCheckRuntimeVersion(boolean on) {
options.checkRuntimeVersion = on;
}
public boolean isEmacsSymMode() {
return options.generateEmacsSymFiles;
}
public void setEmacsSymMode(boolean emacsSymMode) {
options.generateEmacsSymFiles = emacsSymMode;
}
public boolean isGenerateModelMode() {
return options.generateModel;
}
public void setGenerateModelMode(boolean structureModelMode) {
options.generateModel = structureModelMode;
}
public boolean isNoAtAspectJAnnotationProcessing() {
return options.noAtAspectJProcessing;
}
public void setNoAtAspectJAnnotationProcessing(boolean noProcess) {
options.noAtAspectJProcessing = noProcess;
}
public void setShowWeavingInformation(boolean b) {
options.showWeavingInformation = true;
}
public boolean getShowWeavingInformation() { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | return options.showWeavingInformation;
}
public void setProceedOnError(boolean b) {
options.proceedOnError = b;
}
public boolean getProceedOnError() {
return options.proceedOnError;
}
public void setBehaveInJava5Way(boolean b) {
options.behaveInJava5Way = b;
}
public boolean getBehaveInJava5Way() {
return options.behaveInJava5Way;
}
public void setTiming(boolean b) {
options.timing = b;
}
public boolean isTiming() {
return options.timing;
}
public void setTargetAspectjRuntimeLevel(String level) {
options.targetAspectjRuntimeLevel = level;
}
public String getTargetAspectjRuntimeLevel() {
return options.targetAspectjRuntimeLevel;
}
/**
* Indicates what has changed in this configuration compared to the last time it was used, allowing the state management logic
* to make intelligent optimizations and skip unnecessary work.
* |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java | * @param changes set of bitflags, see {@link CompilerConfigurationChangeFlags} for flags
*/
public void setChanged(int changes) {
this.changes = changes;
}
/**
* Return the bit flags indicating what has changed since the last time this config was used.
*
* @return the bitflags according too {@link CompilerConfigurationChangeFlags}
*/
public int getChanged() {
return this.changes;
}
public void setModifiedFiles(List<File> projectSourceFilesChanged) {
this.changedFiles = projectSourceFilesChanged;
}
public List<File> getModifiedFiles() {
return this.changedFiles;
}
public void setClasspathElementsWithModifiedContents(List<String> cpElementsWithModifiedContents) {
this.cpElementsWithModifiedContents = cpElementsWithModifiedContents;
}
public List<String> getClasspathElementsWithModifiedContents() {
return this.cpElementsWithModifiedContents;
}
public void setProjectEncoding(String projectEncoding) {
options.defaultEncoding = projectEncoding;
}
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | /* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.ajdt.internal.core.builder;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.jar.Attributes;
import java.util.jar.JarFile;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import org.aspectj.ajdt.internal.compiler.AjCompilerAdapter;
import org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter;
import org.aspectj.ajdt.internal.compiler.CompilationResultDestinationManager;
import org.aspectj.ajdt.internal.compiler.IBinarySourceProvider;
import org.aspectj.ajdt.internal.compiler.ICompilerAdapter;
import org.aspectj.ajdt.internal.compiler.ICompilerAdapterFactory;
import org.aspectj.ajdt.internal.compiler.IIntermediateResultsRequestor;
import org.aspectj.ajdt.internal.compiler.IOutputClassFileNameProvider; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | import org.aspectj.ajdt.internal.compiler.InterimCompilationResult;
import org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment;
import org.aspectj.ajdt.internal.compiler.lookup.AnonymousClassPublisher;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter;
import org.aspectj.asm.AsmManager;
import org.aspectj.asm.IHierarchy;
import org.aspectj.asm.IProgramElement;
import org.aspectj.asm.internal.ProgramElement;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.CountingMessageHandler;
import org.aspectj.bridge.ILifecycleAware;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IProgressListener;
import org.aspectj.bridge.Message;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.SourceLocation;
import org.aspectj.bridge.Version;
import org.aspectj.bridge.context.CompilationAndWeavingContext;
import org.aspectj.bridge.context.ContextFormatter;
import org.aspectj.bridge.context.ContextToken;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.core.compiler.IProblem;
import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
import org.aspectj.org.eclipse.jdt.internal.compiler.ICompilerRequestor;
import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathLocation; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | import org.aspectj.org.eclipse.jdt.internal.compiler.batch.CompilationUnit;
import org.aspectj.org.eclipse.jdt.internal.compiler.batch.FileSystem;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.INameEnvironment;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.IrritantSet;
import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
import org.aspectj.tools.ajc.Main;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.CustomMungerFactory;
import org.aspectj.weaver.Dump;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
import org.aspectj.weaver.bcel.UnwovenClassFile;
import org.eclipse.core.runtime.OperationCanceledException;
public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySourceProvider, ICompilerAdapterFactory {
private static final String CROSSREFS_FILE_NAME = "build.lst";
private static final String CANT_WRITE_RESULT = "unable to write compilation result";
private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
public static boolean COPY_INPATH_DIR_RESOURCES = false;
private static boolean DO_RUNTIME_VERSION_CHECK = false;
static final boolean FAIL_IF_RUNTIME_NOT_FOUND = false;
private static final FileFilter binarySourceFilter = new FileFilter() {
public boolean accept(File f) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | return f.getName().endsWith(".class");
}
};
/**
* This builder is static so that it can be subclassed and reset. However, note that there is only one builder present, so if
* two extendsion reset it, only the latter will get used.
*/
public static AsmHierarchyBuilder asmHierarchyBuilder = new AsmHierarchyBuilder();
static {
CompilationAndWeavingContext.registerFormatter(CompilationAndWeavingContext.BATCH_BUILD, new AjBuildContexFormatter());
CompilationAndWeavingContext
.registerFormatter(CompilationAndWeavingContext.INCREMENTAL_BUILD, new AjBuildContexFormatter());
}
private IProgressListener progressListener = null;
private boolean environmentSupportsIncrementalCompilation = false;
private int compiledCount;
private int sourceFileCount;
private JarOutputStream zos;
private boolean batchCompile = true;
private INameEnvironment environment;
private Map binarySourcesForTheNextCompile = new HashMap();
public AjBuildConfig buildConfig;
private boolean ignoreOutxml;
private boolean wasFullBuild = true;
AjState state = new AjState(this);
/**
* Enable check for runtime version, used only by Ant/command-line Main. |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | *
* @param main Main unused except to limit to non-null clients.
*/
public static void enableRuntimeVersionCheck(Main caller) {
DO_RUNTIME_VERSION_CHECK = null != caller;
}
public BcelWeaver getWeaver() {
return state.getWeaver();
}
public BcelWorld getBcelWorld() {
return state.getBcelWorld();
}
public CountingMessageHandler handler;
private CustomMungerFactory customMungerFactory;
public AjBuildManager(IMessageHandler holder) {
super();
this.handler = CountingMessageHandler.makeCountingMessageHandler(holder);
}
public void environmentSupportsIncrementalCompilation(boolean itDoes) {
this.environmentSupportsIncrementalCompilation = itDoes;
if (itDoes) {
org.aspectj.weaver.loadtime.definition.DocumentParser.deactivateCaching();
}
}
public boolean doGenerateModel() {
return buildConfig.isGenerateModelMode();
}
public boolean batchBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException {
return performBuild(buildConfig, baseHandler, true); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler) throws IOException, AbortException {
return performBuild(buildConfig, baseHandler, false);
}
/**
* Perform a build.
*
* @return true if the build was successful (ie. no errors)
*/
private boolean performBuild(AjBuildConfig buildConfig, IMessageHandler baseHandler, boolean isFullBuild) throws IOException,
AbortException {
boolean ret = true;
batchCompile = isFullBuild;
wasFullBuild = isFullBuild;
if (baseHandler instanceof ILifecycleAware) {
((ILifecycleAware) baseHandler).buildStarting(!isFullBuild);
}
CompilationAndWeavingContext.reset();
int phase = isFullBuild ? CompilationAndWeavingContext.BATCH_BUILD : CompilationAndWeavingContext.INCREMENTAL_BUILD;
ContextToken ct = CompilationAndWeavingContext.enteringPhase(phase, buildConfig);
try {
if (isFullBuild) {
this.state = new AjState(this);
}
this.state.setCouldBeSubsequentIncrementalBuild(this.environmentSupportsIncrementalCompilation);
boolean canIncremental = state.prepareForNextBuild(buildConfig);
if (!canIncremental && !isFullBuild) {
CompilationAndWeavingContext.leavingPhase(ct);
if (state.listenerDefined()) {
state.getListener().recordDecision("Falling back to batch compilation"); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
return performBuild(buildConfig, baseHandler, true);
}
this.handler = CountingMessageHandler.makeCountingMessageHandler(baseHandler);
if (buildConfig == null || buildConfig.isCheckRuntimeVersion()) {
if (DO_RUNTIME_VERSION_CHECK) {
String check = checkRtJar(buildConfig);
if (check != null) {
if (FAIL_IF_RUNTIME_NOT_FOUND) {
MessageUtil.error(handler, check);
CompilationAndWeavingContext.leavingPhase(ct);
return false;
} else {
MessageUtil.warn(handler, check);
}
}
}
}
setBuildConfig(buildConfig);
if (isFullBuild || !AsmManager.attemptIncrementalModelRepairs) {
setupModel(buildConfig);
}
if (isFullBuild) {
initBcelWorld(handler);
}
if (handler.hasErrors()) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
if (buildConfig.getOutputJar() != null) {
if (!openOutputStream(buildConfig.getOutputJar())) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
}
if (isFullBuild) {
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) {
AsmManager.setLastActiveStructureModel(state.getStructureModel());
getWorld().setModel(state.getStructureModel());
}
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
performCompilation(buildConfig.getFiles());
state.clearBinarySourceFiles();
if (!proceedOnError() && handler.hasErrors()) {
CompilationAndWeavingContext.leavingPhase(ct);
if (AsmManager.isReporting()) {
state.getStructureModel().reportModelInfo("After a batch build");
}
return false;
}
if (AsmManager.isReporting()) {
state.getStructureModel().reportModelInfo("After a batch build");
}
} else { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | AsmManager.setLastActiveStructureModel(state.getStructureModel());
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(true);
Set<File> files = state.getFilesToCompile(true);
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) {
if (AsmManager.attemptIncrementalModelRepairs) {
state.getStructureModel().resetDeltaProcessing();
state.getStructureModel().processDelta(files, state.getAddedFiles(), state.getDeletedFiles());
}
}
boolean hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty());
for (int i = 0; (i < 5) && hereWeGoAgain; i++) {
if (state.listenerDefined()) {
state.getListener()
.recordInformation("Starting incremental compilation loop " + (i + 1) + " of possibly 5");
}
performCompilation(files);
if ((!proceedOnError() && handler.hasErrors())
|| (progressListener != null && progressListener.isCancelledRequested())) {
CompilationAndWeavingContext.leavingPhase(ct);
return false;
}
if (state.requiresFullBatchBuild()) {
if (state.listenerDefined()) {
state.getListener().recordInformation(" Dropping back to full build"); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
return batchBuild(buildConfig, baseHandler);
}
binarySourcesForTheNextCompile = state.getBinaryFilesToCompile(false);
files = state.getFilesToCompile(false);
hereWeGoAgain = !(files.isEmpty() && binarySourcesForTheNextCompile.isEmpty());
if (hereWeGoAgain) {
if (buildConfig.isEmacsSymMode() || buildConfig.isGenerateModelMode()) {
if (AsmManager.attemptIncrementalModelRepairs) {
state.getStructureModel().processDelta(files, state.getAddedFiles(), state.getDeletedFiles());
}
}
}
}
if (!files.isEmpty()) {
CompilationAndWeavingContext.leavingPhase(ct);
return batchBuild(buildConfig, baseHandler);
} else {
if (AsmManager.isReporting()) {
state.getStructureModel().reportModelInfo("After an incremental build");
}
}
}
if (buildConfig.isEmacsSymMode()) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | new org.aspectj.ajdt.internal.core.builder.EmacsStructureModelManager().externalizeModel(state.getStructureModel());
}
if (buildConfig.isGenerateCrossRefsMode()) {
File configFileProxy = new File(buildConfig.getOutputDir(), CROSSREFS_FILE_NAME);
state.getStructureModel().writeStructureModel(configFileProxy.getAbsolutePath());
}
state.successfulCompile(buildConfig, isFullBuild);
if (isFullBuild) {
copyResourcesToDestination();
}
if (buildConfig.getOutxmlName() != null) {
writeOutxmlFile();
}
if (buildConfig.isGenerateModelMode()) {
state.getStructureModel().fireModelUpdated();
}
CompilationAndWeavingContext.leavingPhase(ct);
} finally {
if (baseHandler instanceof ILifecycleAware) {
((ILifecycleAware) baseHandler).buildFinished(!isFullBuild);
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | if (zos != null) {
closeOutputStream(buildConfig.getOutputJar());
}
ret = !handler.hasErrors();
if (getBcelWorld() != null) {
BcelWorld bcelWorld = getBcelWorld();
bcelWorld.reportTimers();
bcelWorld.tidyUp();
}
if (getWeaver() != null) {
getWeaver().tidyUp();
}
}
return ret;
}
/**
* Open an output jar file in which to write the compiler output.
*
* @param outJar the jar file to open
* @return true if successful
*/
private boolean openOutputStream(File outJar) {
try {
OutputStream os = FileUtil.makeOutputStream(buildConfig.getOutputJar());
zos = new JarOutputStream(os, getWeaver().getManifest(true));
} catch (IOException ex) {
IMessage message = new Message("Unable to open outjar " + outJar.getPath() + "(" + ex.getMessage() + ")",
new SourceLocation(outJar, 0), true); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | handler.handleMessage(message);
return false;
}
return true;
}
private void closeOutputStream(File outJar) {
try {
if (zos != null) {
zos.close();
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outJar.getPath(),
CompilationResultDestinationManager.FILETYPE_OUTJAR);
}
}
zos = null;
if (handler.hasErrors()) {
outJar.delete();
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileRemove(outJar.getPath(),
CompilationResultDestinationManager.FILETYPE_OUTJAR);
}
}
} catch (IOException ex) {
IMessage message = new Message("Unable to write outjar " + outJar.getPath() + "(" + ex.getMessage() + ")",
new SourceLocation(outJar, 0), true);
handler.handleMessage(message);
}
}
private void copyResourcesToDestination() throws IOException { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | for (Iterator i = buildConfig.getInJars().iterator(); i.hasNext();) {
File inJar = (File) i.next();
copyResourcesFromJarFile(inJar);
}
for (Iterator i = buildConfig.getInpath().iterator(); i.hasNext();) {
File inPathElement = (File) i.next();
if (inPathElement.isDirectory()) {
copyResourcesFromDirectory(inPathElement);
} else {
copyResourcesFromJarFile(inPathElement);
}
}
if (buildConfig.getSourcePathResources() != null) {
for (Iterator i = buildConfig.getSourcePathResources().keySet().iterator(); i.hasNext();) {
String resource = (String) i.next();
File from = buildConfig.getSourcePathResources().get(resource);
copyResourcesFromFile(from, resource, from);
}
}
writeManifest();
}
private void copyResourcesFromJarFile(File jarFile) throws IOException {
JarInputStream inStream = null;
try {
inStream = new JarInputStream(new FileInputStream(jarFile));
while (true) {
ZipEntry entry = inStream.getNextEntry();
if (entry == null) {
break; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
String filename = entry.getName();
if (entry.isDirectory()) {
writeDirectory(filename, jarFile);
} else if (acceptResource(filename, false)) {
byte[] bytes = FileUtil.readAsByteArray(inStream);
writeResource(filename, bytes, jarFile);
}
inStream.closeEntry();
}
} finally {
if (inStream != null) {
inStream.close();
}
}
}
private void copyResourcesFromDirectory(File dir) throws IOException {
if (!COPY_INPATH_DIR_RESOURCES) {
return;
}
File[] files = FileUtil.listFiles(dir, new FileFilter() {
public boolean accept(File f) {
boolean accept = !(f.isDirectory() || f.getName().endsWith(".class"));
return accept;
}
});
for (int i = 0; i < files.length; i++) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | String filename = files[i].getAbsolutePath().substring(dir.getAbsolutePath().length() + 1);
copyResourcesFromFile(files[i], filename, dir);
}
}
private void copyResourcesFromFile(File f, String filename, File src) throws IOException {
if (!acceptResource(filename, true)) {
return;
}
FileInputStream fis = null;
try {
fis = new FileInputStream(f);
byte[] bytes = FileUtil.readAsByteArray(fis);
writeResource(filename, bytes, src);
} catch (FileNotFoundException fnfe) {
} finally {
if (fis != null) {
fis.close();
}
}
}
/**
* Add a directory entry to the output zip file. Don't do anything if not writing out to a zip file. A directory entry is one
* whose filename ends with '/'
*
* @param directory the directory path |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | * @param srcloc the src of the directory entry, for use when creating a warning message
* @throws IOException if something goes wrong creating the new zip entry
*/
private void writeDirectory(String directory, File srcloc) throws IOException {
if (state.hasResource(directory)) {
IMessage msg = new Message("duplicate resource: '" + directory + "'", IMessage.WARNING, null, new SourceLocation(
srcloc, 0));
handler.handleMessage(msg);
return;
}
if (zos != null) {
ZipEntry newEntry = new ZipEntry(directory);
zos.putNextEntry(newEntry);
zos.closeEntry();
state.recordResource(directory, srcloc);
}
}
private void writeResource(String filename, byte[] content, File srcLocation) throws IOException {
if (state.hasResource(filename)) {
IMessage msg = new Message("duplicate resource: '" + filename + "'", IMessage.WARNING, null, new SourceLocation(
srcLocation, 0));
handler.handleMessage(msg);
return;
}
if (filename.equals(buildConfig.getOutxmlName())) {
ignoreOutxml = true;
IMessage msg = new Message("-outxml/-outxmlfile option ignored because resource already exists: '" + filename + "'",
IMessage.WARNING, null, new SourceLocation(srcLocation, 0));
handler.handleMessage(msg); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
if (zos != null) {
ZipEntry newEntry = new ZipEntry(filename);
zos.putNextEntry(newEntry);
zos.write(content);
zos.closeEntry();
} else {
File destDir = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
destDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForResource(srcLocation);
}
try {
File outputLocation = new File(destDir, filename);
OutputStream fos = FileUtil.makeOutputStream(outputLocation);
fos.write(content);
fos.close();
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputLocation.getPath(),
CompilationResultDestinationManager.FILETYPE_RESOURCE);
}
} catch (FileNotFoundException fnfe) {
IMessage msg = new Message("unable to copy resource to output folder: '" + filename + "' - reason: "
+ fnfe.getMessage(), IMessage.ERROR, null, new SourceLocation(srcLocation, 0));
handler.handleMessage(msg);
}
}
state.recordResource(filename, srcLocation);
}
/*
* If we are writing to an output directory copy the manifest but only if we already have one |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | */
private void writeManifest() throws IOException {
Manifest manifest = getWeaver().getManifest(false);
if (manifest != null && zos == null) {
File outputDir = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation();
}
if (outputDir == null) {
return;
}
File outputLocation = new File(outputDir, MANIFEST_NAME);
OutputStream fos = FileUtil.makeOutputStream(outputLocation);
manifest.write(fos);
fos.close();
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputLocation.getPath(),
CompilationResultDestinationManager.FILETYPE_RESOURCE);
}
}
}
private boolean acceptResource(String resourceName, boolean fromFile) {
if ((resourceName.startsWith("CVS/")) || (resourceName.indexOf("/CVS/") != -1) || (resourceName.endsWith("/CVS"))
|| (resourceName.endsWith(".class")) || (resourceName.startsWith(".svn/"))
|| (resourceName.indexOf("/.svn/") != -1) || (resourceName.endsWith("/.svn")) ||
(resourceName.toUpperCase().equals(MANIFEST_NAME) && (!fromFile || zos != null))) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | return false;
} else {
return true;
}
}
private void writeOutxmlFile() throws IOException {
if (ignoreOutxml) {
return;
}
String filename = buildConfig.getOutxmlName();
Map<File, List<String>> outputDirsAndAspects = findOutputDirsForAspects();
Set<Map.Entry<File, List<String>>> outputDirs = outputDirsAndAspects.entrySet();
for (Iterator<Map.Entry<File, List<String>>> iterator = outputDirs.iterator(); iterator.hasNext();) {
Map.Entry<File, List<String>> entry = iterator.next();
File outputDir = entry.getKey();
List<String> aspects = entry.getValue();
ByteArrayOutputStream baos = getOutxmlContents(aspects);
if (zos != null) {
ZipEntry newEntry = new ZipEntry(filename);
zos.putNextEntry(newEntry);
zos.write(baos.toByteArray());
zos.closeEntry();
} else {
File outputFile = new File(outputDir, filename);
OutputStream fos = FileUtil.makeOutputStream(outputFile);
fos.write(baos.toByteArray());
fos.close();
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outputFile.getPath(), |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | CompilationResultDestinationManager.FILETYPE_RESOURCE);
}
}
}
}
private ByteArrayOutputStream getOutxmlContents(List aspectNames) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos);
ps.println("<aspectj>");
ps.println("<aspects>");
if (aspectNames != null) {
for (Iterator i = aspectNames.iterator(); i.hasNext();) {
String name = (String) i.next();
ps.println("<aspect name=\"" + name + "\"/>");
}
}
ps.println("</aspects>");
ps.println("</aspectj>");
ps.println();
ps.close();
return baos;
}
/**
* Returns a map where the keys are File objects corresponding to all the output directories and the values are a list of
* aspects which are sent to that ouptut directory
*/
private Map<File, List<String>> findOutputDirsForAspects() {
Map<File, List<String>> outputDirsToAspects = new HashMap<File, List<String>>();
Map<String, char[]> aspectNamesToFileNames = state.getAspectNamesToFileNameMap();
if (buildConfig.getCompilationResultDestinationManager() == null |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | || buildConfig.getCompilationResultDestinationManager().getAllOutputLocations().size() == 1) {
File outputDir = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation();
}
List<String> aspectNames = new ArrayList<String>();
if (aspectNamesToFileNames != null) {
Set<String> keys = aspectNamesToFileNames.keySet();
for (String name : keys) {
aspectNames.add(name);
}
}
outputDirsToAspects.put(outputDir, aspectNames);
} else {
List outputDirs = buildConfig.getCompilationResultDestinationManager().getAllOutputLocations();
for (Iterator iterator = outputDirs.iterator(); iterator.hasNext();) {
File outputDir = (File) iterator.next();
outputDirsToAspects.put(outputDir, new ArrayList<String>());
}
if (aspectNamesToFileNames != null) {
Set<Map.Entry<String, char[]>> entrySet = aspectNamesToFileNames.entrySet();
for (Iterator<Map.Entry<String, char[]>> iterator = entrySet.iterator(); iterator.hasNext();) {
Map.Entry<String, char[]> entry = iterator.next();
String aspectName = entry.getKey();
char[] fileName = entry.getValue();
File outputDir = buildConfig.getCompilationResultDestinationManager().getOutputLocationForClass(
new File(new String(fileName)));
if (!outputDirsToAspects.containsKey(outputDir)) {
outputDirsToAspects.put(outputDir, new ArrayList<String>()); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
((List) outputDirsToAspects.get(outputDir)).add(aspectName);
}
}
}
return outputDirsToAspects;
}
/**
* Responsible for managing the ASM model between builds. Contains the policy for maintaining the persistance of elements in the
* model.
* |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | * This code is driven before each 'fresh' (batch) build to create a new model.
*/
private void setupModel(AjBuildConfig config) {
if (!(config.isEmacsSymMode() || config.isGenerateModelMode())) {
return;
}
CompilationResultDestinationManager crdm = config.getCompilationResultDestinationManager();
AsmManager structureModel = AsmManager.createNewStructureModel(crdm == null ? Collections.EMPTY_MAP : crdm.getInpathMap());
IHierarchy model = structureModel.getHierarchy();
String rootLabel = "<root>";
IProgramElement.Kind kind = IProgramElement.Kind.FILE_JAVA;
if (buildConfig.getConfigFile() != null) {
rootLabel = buildConfig.getConfigFile().getName();
model.setConfigFile(buildConfig.getConfigFile().getAbsolutePath());
kind = IProgramElement.Kind.FILE_LST;
}
model.setRoot(new ProgramElement(structureModel, rootLabel, kind, new ArrayList()));
model.setFileMap(new HashMap<String, IProgramElement>());
state.setStructureModel(structureModel);
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | public void setCustomMungerFactory(Object o) {
customMungerFactory = (CustomMungerFactory) o;
}
public Object getCustomMungerFactory() {
return customMungerFactory;
}
private void initBcelWorld(IMessageHandler handler) throws IOException {
List cp = buildConfig.getFullClasspath();
BcelWorld bcelWorld = new BcelWorld(cp, handler, null);
bcelWorld.setBehaveInJava5Way(buildConfig.getBehaveInJava5Way());
bcelWorld.setTiming(buildConfig.isTiming(), false);
bcelWorld.setAddSerialVerUID(buildConfig.isAddSerialVerUID()); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | bcelWorld.setXmlConfigured(buildConfig.isXmlConfigured());
bcelWorld.setXmlFiles(buildConfig.getXmlFiles());
bcelWorld.performExtraConfiguration(buildConfig.getXconfigurationInfo());
bcelWorld.setTargetAspectjRuntimeLevel(buildConfig.getTargetAspectjRuntimeLevel());
bcelWorld.setOptionalJoinpoints(buildConfig.getXJoinpoints());
bcelWorld.setXnoInline(buildConfig.isXnoInline());
bcelWorld.setXlazyTjp(buildConfig.isXlazyTjp());
bcelWorld.setXHasMemberSupportEnabled(buildConfig.isXHasMemberEnabled());
bcelWorld.setPinpointMode(buildConfig.isXdevPinpoint());
bcelWorld.setErrorAndWarningThreshold(buildConfig.getOptions().errorThreshold.isSet(24), buildConfig.getOptions().warningThreshold.isSet(24));
BcelWeaver bcelWeaver = new BcelWeaver(bcelWorld);
bcelWeaver.setCustomMungerFactory(customMungerFactory);
state.setWorld(bcelWorld);
state.setWeaver(bcelWeaver);
state.clearBinarySourceFiles();
if (buildConfig.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)) {
bcelWorld.getLint().loadDefaultProperties();
} else {
bcelWorld.getLint().setAll(buildConfig.getLintMode());
}
if (buildConfig.getLintSpecFile() != null) {
bcelWorld.getLint().setFromProperties(buildConfig.getLintSpecFile());
}
for (Iterator i = buildConfig.getAspectpath().iterator(); i.hasNext();) {
File f = (File) i.next();
if (!f.exists()) {
IMessage message = new Message("invalid aspectpath entry: " + f.getName(), null, true);
handler.handleMessage(message);
} else {
bcelWeaver.addLibraryJarFile(f); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
}
File outputDir = buildConfig.getOutputDir();
if (outputDir == null && buildConfig.getCompilationResultDestinationManager() != null) {
outputDir = buildConfig.getCompilationResultDestinationManager().getDefaultOutputLocation();
}
for (File inJar : buildConfig.getInJars()) {
List<UnwovenClassFile> unwovenClasses = bcelWeaver.addJarFile(inJar, outputDir, false);
state.recordBinarySource(inJar.getPath(), unwovenClasses);
}
for (File inPathElement : buildConfig.getInpath()) {
if (!inPathElement.isDirectory()) {
List<UnwovenClassFile> unwovenClasses = bcelWeaver.addJarFile(inPathElement, outputDir, true);
state.recordBinarySource(inPathElement.getPath(), unwovenClasses);
} else {
File[] binSrcs = FileUtil.listFiles(inPathElement, binarySourceFilter);
for (int j = 0; j < binSrcs.length; j++) {
UnwovenClassFile ucf = bcelWeaver.addClassFile(binSrcs[j], inPathElement, outputDir);
List<UnwovenClassFile> ucfl = new ArrayList<UnwovenClassFile>();
ucfl.add(ucf);
state.recordBinarySource(binSrcs[j].getPath(), ucfl); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
}
}
bcelWeaver.setReweavableMode(buildConfig.isXNotReweavable());
ResolvedType joinPoint = bcelWorld.resolve("org.aspectj.lang.JoinPoint");
if (joinPoint.isMissing()) {
IMessage message = new Message(
"classpath error: unable to find org.aspectj.lang.JoinPoint (check that aspectjrt.jar is in your classpath)",
null, true);
handler.handleMessage(message);
}
}
public World getWorld() {
return getBcelWorld();
}
public FileSystem getLibraryAccess(String[] classpaths, String[] filenames) {
String defaultEncoding = buildConfig.getOptions().defaultEncoding;
if ("".equals(defaultEncoding)) {
defaultEncoding = null;
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | return new FileSystem(classpaths, filenames, defaultEncoding, ClasspathLocation.BINARY);
}
public IProblemFactory getProblemFactory() {
return new DefaultProblemFactory(Locale.getDefault());
}
/*
* Build the set of compilation source units
*/
public CompilationUnit[] getCompilationUnits(String[] filenames) {
int fileCount = filenames.length;
CompilationUnit[] units = new CompilationUnit[fileCount];
String defaultEncoding = buildConfig.getOptions().defaultEncoding;
if ("".equals(defaultEncoding)) {
defaultEncoding = null;
}
for (int i = 0; i < fileCount; i++) {
units[i] = new CompilationUnit(null, filenames[i], defaultEncoding);
}
return units;
}
public String extractDestinationPathFromSourceFile(CompilationResult result) {
ICompilationUnit compilationUnit = result.compilationUnit;
if (compilationUnit != null) {
char[] fileName = compilationUnit.getFileName();
int lastIndex = CharOperation.lastIndexOf(java.io.File.separatorChar, fileName);
if (lastIndex == -1) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | return System.getProperty("user.dir");
}
return new String(CharOperation.subarray(fileName, 0, lastIndex));
}
return System.getProperty("user.dir");
}
public void performCompilation(Collection<File> files) {
if (progressListener != null) {
compiledCount = 0;
sourceFileCount = files.size();
progressListener.setText("compiling source files");
}
String[] filenames = new String[files.size()];
int idx = 0;
for (Iterator<File> fIterator = files.iterator(); fIterator.hasNext();) {
File f = fIterator.next();
filenames[idx++] = f.getPath();
}
environment = state.getNameEnvironment();
boolean environmentNeedsRebuilding = false;
if (buildConfig.getChanged() != AjBuildConfig.NO_CHANGES) {
environmentNeedsRebuilding = true;
}
if (environment == null || environmentNeedsRebuilding) {
List<String> cps = buildConfig.getFullClasspath();
Dump.saveFullClasspath(cps);
String[] classpaths = new String[cps.size()];
for (int i = 0; i < cps.size(); i++) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | classpaths[i] = cps.get(i);
}
environment = new StatefulNameEnvironment(getLibraryAccess(classpaths, filenames), state.getClassNameToFileMap(), state);
state.setNameEnvironment(environment);
} else {
((StatefulNameEnvironment) environment).update(state.getClassNameToFileMap(), state.deltaAddedClasses);
state.deltaAddedClasses.clear();
}
org.aspectj.ajdt.internal.compiler.CompilerAdapter.setCompilerAdapterFactory(this);
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler compiler = new org.aspectj.org.eclipse.jdt.internal.compiler.Compiler(
environment, DefaultErrorHandlingPolicies.proceedWithAllProblems(), buildConfig.getOptions().getMap(),
getBatchRequestor(), getProblemFactory());
compiler.options.produceReferenceInfo = true;
try {
compiler.compile(getCompilationUnits(filenames));
} catch (OperationCanceledException oce) {
handler.handleMessage(new Message("build cancelled:" + oce.getMessage(), IMessage.WARNING, null, null));
}
org.aspectj.ajdt.internal.compiler.CompilerAdapter.setCompilerAdapterFactory(null);
AnonymousClassPublisher.aspectOf().setAnonymousClassCreationListener(null);
environment.cleanup();
}
public void cleanupEnvironment() {
if (environment != null) {
environment.cleanup();
environment = null;
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | }
/*
* Answer the component to which will be handed back compilation results from the compiler
*/
public IIntermediateResultsRequestor getInterimResultRequestor() {
return new IIntermediateResultsRequestor() {
public void acceptResult(InterimCompilationResult result) {
if (progressListener != null) {
compiledCount++;
progressListener.setProgress((compiledCount / 2.0) / sourceFileCount);
progressListener.setText("compiled: " + result.fileName());
}
state.noteResult(result);
if (progressListener != null && progressListener.isCancelledRequested()) {
throw new AbortCompilation(true, new OperationCanceledException("Compilation cancelled as requested"));
}
}
};
}
public ICompilerRequestor getBatchRequestor() {
return new ICompilerRequestor() {
public void acceptResult(CompilationResult unitResult) {
boolean hasErrors = unitResult.hasErrors();
if (!hasErrors || proceedOnError()) {
Collection<ClassFile> classFiles = unitResult.compiledTypes.values();
boolean shouldAddAspectName = (buildConfig.getOutxmlName() != null);
for (Iterator<ClassFile> iter = classFiles.iterator(); iter.hasNext();) {
ClassFile classFile = iter.next(); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | String filename = new String(classFile.fileName());
String classname = filename.replace('/', '.');
filename = filename.replace('/', File.separatorChar) + ".class";
try {
if (buildConfig.getOutputJar() == null) {
String outfile = writeDirectoryEntry(unitResult, classFile, filename);
getWorld().classWriteEvent(classFile.getCompoundName());
if (environmentSupportsIncrementalCompilation) {
if (!classname.endsWith("$ajcMightHaveAspect")) {
ResolvedType type = getBcelWorld().resolve(classname);
if (type.isAspect()) {
state.recordAspectClassFile(outfile);
}
}
}
} else {
writeZipEntry(classFile, filename);
}
if (shouldAddAspectName && !classname.endsWith("$ajcMightHaveAspect")) {
addAspectName(classname, unitResult.getFileName());
}
} catch (IOException ex) {
IMessage message = EclipseAdapterUtils.makeErrorMessage(new String(unitResult.fileName),
CANT_WRITE_RESULT, ex);
handler.handleMessage(message);
}
}
state.noteNewResult(unitResult);
unitResult.compiledTypes.clear();
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | if (unitResult.hasProblems() || unitResult.hasTasks()) {
IProblem[] problems = unitResult.getAllProblems();
for (int i = 0; i < problems.length; i++) {
IMessage message = EclipseAdapterUtils.makeMessage(unitResult.compilationUnit, problems[i], getBcelWorld(),
progressListener);
handler.handleMessage(message);
}
}
}
private String writeDirectoryEntry(CompilationResult unitResult, ClassFile classFile, String filename)
throws IOException {
File destinationPath = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
destinationPath = buildConfig.getCompilationResultDestinationManager().getOutputLocationForClass(
new File(new String(unitResult.fileName)));
}
String outFile;
if (destinationPath == null) {
outFile = new File(filename).getName();
outFile = new File(extractDestinationPathFromSourceFile(unitResult), outFile).getPath();
} else {
outFile = new File(destinationPath, filename).getPath();
}
try {
BufferedOutputStream os = FileUtil.makeOutputStream(new File(outFile));
os.write(classFile.getBytes());
os.close();
} catch (FileNotFoundException fnfe) {
IMessage msg = new Message("unable to write out class file: '" + filename + "' - reason: " + fnfe.getMessage(),
IMessage.ERROR, null, new SourceLocation(new File(outFile), 0)); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | handler.handleMessage(msg);
}
if (buildConfig.getCompilationResultDestinationManager() != null) {
buildConfig.getCompilationResultDestinationManager().reportFileWrite(outFile,
CompilationResultDestinationManager.FILETYPE_CLASS);
}
return outFile;
}
private void writeZipEntry(ClassFile classFile, String name) throws IOException {
name = name.replace(File.separatorChar, '/');
ZipEntry newEntry = new ZipEntry(name);
zos.putNextEntry(newEntry);
zos.write(classFile.getBytes());
zos.closeEntry();
}
private void addAspectName(String name, char[] fileContainingAspect) {
BcelWorld world = getBcelWorld();
ResolvedType type = world.resolve(name);
if (type.isAspect()) {
if (state.getAspectNamesToFileNameMap() == null) {
state.initializeAspectNamesToFileNameMap();
}
if (!state.getAspectNamesToFileNameMap().containsKey(name)) {
state.getAspectNamesToFileNameMap().put(name, fileContainingAspect);
}
}
}
};
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | protected boolean proceedOnError() {
return buildConfig.getProceedOnError();
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | private void setBuildConfig(AjBuildConfig buildConfig) {
this.buildConfig = buildConfig;
if (!this.environmentSupportsIncrementalCompilation) {
this.environmentSupportsIncrementalCompilation = (buildConfig.isIncrementalMode() || buildConfig
.isIncrementalFileMode());
}
handler.reset();
}
String makeClasspathString(AjBuildConfig buildConfig) {
if (buildConfig == null || buildConfig.getFullClasspath() == null) {
return "";
}
StringBuffer buf = new StringBuffer();
boolean first = true;
for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext();) {
if (first) {
first = false;
} else {
buf.append(File.pathSeparator);
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | buf.append(it.next().toString());
}
return buf.toString();
}
/**
* This will return null if aspectjrt.jar is present and has the correct version. Otherwise it will return a string message
* indicating the problem.
*/
private String checkRtJar(AjBuildConfig buildConfig) {
if (Version.text.equals(Version.DEVELOPMENT)) {
return null;
}
if (buildConfig == null || buildConfig.getFullClasspath() == null) {
return "no classpath specified";
}
String ret = null;
for (Iterator it = buildConfig.getFullClasspath().iterator(); it.hasNext();) {
File p = new File((String) it.next());
if (p.isFile() && p.getName().startsWith("aspectjrt") && p.getName().endsWith(".jar")) {
try {
String version = null;
Manifest manifest = new JarFile(p).getManifest();
if (manifest == null) {
ret = "no manifest found in " + p.getAbsolutePath() + ", expected " + Version.text;
continue;
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | Attributes attr = manifest.getAttributes("org/aspectj/lang/");
if (null != attr) {
version = attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
if (null != version) {
version = version.trim();
}
}
if (Version.DEVELOPMENT.equals(version)) {
return null;
} else if (!Version.text.equals(version)) {
ret = "bad version number found in " + p.getAbsolutePath() + " expected " + Version.text + " found "
+ version;
continue;
}
} catch (IOException ioe) {
ret = "bad jar file found in " + p.getAbsolutePath() + " error: " + ioe;
}
return null;
} else if (p.isFile() && p.getName().indexOf("org.aspectj.runtime") != -1) {
return null;
} else {
}
}
if (ret != null) { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | return ret;
}
return "couldn't find aspectjrt.jar on classpath, checked: " + makeClasspathString(buildConfig);
}
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("AjBuildManager(");
buf.append(")");
return buf.toString();
}
/**
* Returns null if there is no structure model
*/
public AsmManager getStructureModel() {
return (state == null ? null : state.getStructureModel());
}
public IProgressListener getProgressListener() {
return progressListener;
}
public void setProgressListener(IProgressListener progressListener) {
this.progressListener = progressListener;
}
/*
* (non-Javadoc)
*
* @see org.aspectj.ajdt.internal.compiler.AjCompiler.IOutputClassFileNameProvider#getOutputClassFileName(char[]) |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | */
public String getOutputClassFileName(char[] eclipseClassFileName, CompilationResult result) {
String filename = new String(eclipseClassFileName);
filename = filename.replace('/', File.separatorChar) + ".class";
File destinationPath = buildConfig.getOutputDir();
if (buildConfig.getCompilationResultDestinationManager() != null) {
File f = new File(new String(result.getFileName()));
destinationPath = buildConfig.getCompilationResultDestinationManager().getOutputLocationForClass(f);
}
String outFile;
if (destinationPath == null) {
outFile = new File(filename).getName();
outFile = new File(extractDestinationPathFromSourceFile(result), outFile).getPath();
} else {
outFile = new File(destinationPath, filename).getPath();
}
return outFile;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.jdt.internal.compiler.ICompilerAdapterFactory#getAdapter(org.eclipse.jdt.internal.compiler.Compiler)
*/
public ICompilerAdapter getAdapter(org.aspectj.org.eclipse.jdt.internal.compiler.Compiler forCompiler) {
populateCompilerOptionsFromLintSettings(forCompiler);
AjProblemReporter pr = new AjProblemReporter(DefaultErrorHandlingPolicies.proceedWithAllProblems(), forCompiler.options,
getProblemFactory());
forCompiler.problemReporter = pr;
AjLookupEnvironment le = new AjLookupEnvironment(forCompiler, forCompiler.options, pr, environment); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | EclipseFactory factory = new EclipseFactory(le, this);
le.factory = factory;
pr.factory = factory;
forCompiler.lookupEnvironment = le;
forCompiler.parser = new Parser(pr, forCompiler.options.parseLiteralExpressionsAsConstants);
if (getBcelWorld().shouldPipelineCompilation()) {
IMessage message = MessageUtil.info("Pipelining compilation");
handler.handleMessage(message);
return new AjPipeliningCompilerAdapter(forCompiler, batchCompile, getBcelWorld(), getWeaver(), factory,
getInterimResultRequestor(), progressListener,
this,
this,
state.getBinarySourceMap(), buildConfig.isTerminateAfterCompilation(), buildConfig.getProceedOnError(),
buildConfig.isNoAtAspectJAnnotationProcessing(), buildConfig.isMakeReflectable(), state);
} else {
return new AjCompilerAdapter(forCompiler, batchCompile, getBcelWorld(), getWeaver(), factory,
getInterimResultRequestor(), progressListener,
this,
this,
state.getBinarySourceMap(), buildConfig.isTerminateAfterCompilation(), buildConfig.getProceedOnError(),
buildConfig.isNoAtAspectJAnnotationProcessing(), buildConfig.isMakeReflectable(), state);
}
}
/**
* Some AspectJ lint options need to be known about in the compiler. This is how we pass them over...
*
* @param forCompiler
*/
private void populateCompilerOptionsFromLintSettings(org.aspectj.org.eclipse.jdt.internal.compiler.Compiler forCompiler) {
BcelWorld world = this.state.getBcelWorld(); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | IMessage.Kind swallowedExceptionKind = world.getLint().swallowedExceptionInCatchBlock.getKind();
Map optionsMap = new HashMap();
optionsMap.put(CompilerOptions.OPTION_ReportSwallowedExceptionInCatchBlock, swallowedExceptionKind == null ? "ignore"
: swallowedExceptionKind.toString());
forCompiler.options.set(optionsMap);
}
/*
* (non-Javadoc)
*
* @see org.aspectj.ajdt.internal.compiler.IBinarySourceProvider#getBinarySourcesForThisWeave()
*/
public Map getBinarySourcesForThisWeave() {
return binarySourcesForTheNextCompile;
}
public static AsmHierarchyBuilder getAsmHierarchyBuilder() {
return asmHierarchyBuilder;
}
/**
* Override the the default hierarchy builder.
*/
public static void setAsmHierarchyBuilder(AsmHierarchyBuilder newBuilder) {
asmHierarchyBuilder = newBuilder;
}
public AjState getState() {
return state;
}
public void setState(AjState buildState) {
state = buildState;
}
private static class AjBuildContexFormatter implements ContextFormatter { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java | public String formatEntry(int phaseId, Object data) {
StringBuffer sb = new StringBuffer();
if (phaseId == CompilationAndWeavingContext.BATCH_BUILD) {
sb.append("batch building ");
} else {
sb.append("incrementally building ");
}
AjBuildConfig config = (AjBuildConfig) data;
List classpath = config.getClasspath();
sb.append("with classpath: ");
for (Iterator iter = classpath.iterator(); iter.hasNext();) {
sb.append(iter.next().toString());
sb.append(File.pathSeparator);
}
return sb.toString();
}
}
public boolean wasFullBuild() {
return wasFullBuild;
}
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | /* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.weaver;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.weaver.tools.Trace;
import org.aspectj.weaver.tools.TraceFactory;
public class Lint { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | Map<String, Lint.Kind> kinds = new HashMap<String, Lint.Kind>();
World world;
public final Kind invalidAbsoluteTypeName = new Kind("invalidAbsoluteTypeName", "no match for this type name: {0}");
public final Kind invalidWildcardTypeName = new Kind("invalidWildcardTypeName", "no match for this type pattern: {0}");
public final Kind unresolvableMember = new Kind("unresolvableMember", "can not resolve this member: {0}");
public final Kind typeNotExposedToWeaver = new Kind("typeNotExposedToWeaver",
"this affected type is not exposed to the weaver: {0}");
public final Kind shadowNotInStructure = new Kind("shadowNotInStructure",
"the shadow for this join point is not exposed in the structure model: {0}");
public final Kind unmatchedSuperTypeInCall = new Kind("unmatchedSuperTypeInCall",
"does not match because declaring type is {0}, if match desired use target({1})");
public final Kind unmatchedTargetKind = new Kind("unmatchedTargetKind", "does not match because annotation {0} has @Target{1}");
public final Kind canNotImplementLazyTjp = new Kind("canNotImplementLazyTjp",
"can not implement lazyTjp on this joinpoint {0} because around advice is used");
public final Kind multipleAdviceStoppingLazyTjp = new Kind("multipleAdviceStoppingLazyTjp",
"can not implement lazyTjp at joinpoint {0} because of advice conflicts, see secondary locations to find conflicting advice");
public final Kind needsSerialVersionUIDField = new Kind("needsSerialVersionUIDField",
"serialVersionUID of type {0} needs to be set because of {1}"); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | public final Kind serialVersionUIDBroken = new Kind("brokeSerialVersionCompatibility",
"serialVersionUID of type {0} is broken because of added field {1}");
public final Kind noInterfaceCtorJoinpoint = new Kind("noInterfaceCtorJoinpoint",
"no interface constructor-execution join point - use {0}+ for implementing classes");
public final Kind noJoinpointsForBridgeMethods = new Kind(
"noJoinpointsForBridgeMethods",
"pointcut did not match on the method call to a bridge method. Bridge methods are generated by the compiler and have no join points");
public final Kind enumAsTargetForDecpIgnored = new Kind("enumAsTargetForDecpIgnored",
"enum type {0} matches a declare parents type pattern but is being ignored");
public final Kind annotationAsTargetForDecpIgnored = new Kind("annotationAsTargetForDecpIgnored",
"annotation type {0} matches a declare parents type pattern but is being ignored");
public final Kind cantMatchArrayTypeOnVarargs = new Kind("cantMatchArrayTypeOnVarargs",
"an array type as the last parameter in a signature does not match on the varargs declared method: {0}");
public final Kind adviceDidNotMatch = new Kind("adviceDidNotMatch", "advice defined in {0} has not been applied");
public final Kind invalidTargetForAnnotation = new Kind("invalidTargetForAnnotation",
"{0} is not a valid target for annotation {1}, this annotation can only be applied to {2}");
public final Kind elementAlreadyAnnotated = new Kind("elementAlreadyAnnotated",
"{0} - already has an annotation of type {1}, cannot add a second instance");
public final Kind runtimeExceptionNotSoftened = new Kind("runtimeExceptionNotSoftened",
"{0} will not be softened as it is already a RuntimeException");
public final Kind uncheckedArgument = new Kind("uncheckedArgument",
"unchecked match of {0} with {1} when argument is an instance of {2} at join point {3}");
public final Kind uncheckedAdviceConversion = new Kind("uncheckedAdviceConversion",
"unchecked conversion when advice applied at shadow {0}, expected {1} but advice uses {2}");
public final Kind noGuardForLazyTjp = new Kind("noGuardForLazyTjp",
"can not build thisJoinPoint lazily for this advice since it has no suitable guard");
public final Kind noExplicitConstructorCall = new Kind("noExplicitConstructorCall",
"inter-type constructor does not contain explicit constructor call: field initializers in the target type will not be executed");
public final Kind aspectExcludedByConfiguration = new Kind("aspectExcludedByConfiguration",
"aspect {0} exluded for class loader {1}"); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | public final Kind unorderedAdviceAtShadow = new Kind("unorderedAdviceAtShadow",
"at this shadow {0} no precedence is specified between advice applying from aspect {1} and aspect {2}");
public final Kind swallowedExceptionInCatchBlock = new Kind("swallowedExceptionInCatchBlock",
"exception swallowed in catch block");
public final Kind calculatingSerialVersionUID = new Kind("calculatingSerialVersionUID",
"calculated SerialVersionUID for type {0} to be {1}");
public final Kind nonReweavableTypeEncountered = new Kind("nonReweavableTypeEncountered",
"class '{0}' is already woven and has not been built in reweavable mode");
public final Kind cantFindType = new Kind("cantFindType", "{0}");
public final Kind cantFindTypeAffectingJoinPointMatch = new Kind("cantFindTypeAffectingJPMatch", "{0}");
public final Kind advisingSynchronizedMethods = new Kind("advisingSynchronizedMethods",
"advice matching the synchronized method shadow ''{0}'' will be executed outside the lock rather than inside (compiler limitation)");
public final Kind mustWeaveXmlDefinedAspects = new Kind(
"mustWeaveXmlDefinedAspects",
"XML Defined aspects must be woven in cases where cflow pointcuts are involved. Currently the include/exclude patterns exclude ''{0}''");
public final Kind cannotAdviseJoinpointInInterfaceWithAroundAdvice = new Kind(
"cannotAdviseJoinpointInInterfaceWithAroundAdvice",
"The joinpoint ''{0}'' cannot be advised and is being skipped as the compiler implementation will lead to creation of methods with bodies in an interface (compiler limitation)");
/**
* Indicates an aspect could not be found when attempting reweaving.
*/
public final Kind missingAspectForReweaving = new Kind("missingAspectForReweaving",
"aspect {0} cannot be found when reweaving {1}");
private static Trace trace = TraceFactory.getTraceFactory().getTrace(Lint.class);
public Lint(World world) {
if (trace.isTraceEnabled()) {
trace.enter("<init>", this, world);
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | this.world = world;
if (trace.isTraceEnabled()) {
trace.exit("<init>");
}
}
public void setAll(String messageKind) {
if (trace.isTraceEnabled()) {
trace.enter("setAll", this, messageKind);
}
setAll(getMessageKind(messageKind));
if (trace.isTraceEnabled()) {
trace.exit("setAll");
}
}
private void setAll(IMessage.Kind messageKind) {
for (Kind kind : kinds.values()) {
kind.setKind(messageKind);
}
}
public void setFromProperties(File file) {
if (trace.isTraceEnabled()) {
trace.enter("setFromProperties", this, file);
}
InputStream s = null;
try {
s = new FileInputStream(file);
setFromProperties(s);
} catch (IOException ioe) {
MessageUtil.error(world.getMessageHandler(),
WeaverMessages.format(WeaverMessages.XLINT_LOAD_ERROR, file.getPath(), ioe.getMessage())); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | } finally {
if (s != null) {
try {
s.close();
} catch (IOException e) {
}
}
}
if (trace.isTraceEnabled()) {
trace.exit("setFromProperties");
}
}
public void loadDefaultProperties() {
InputStream s = getClass().getResourceAsStream("XlintDefault.properties");
if (s == null) {
MessageUtil.warn(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINTDEFAULT_LOAD_ERROR));
return;
}
try {
setFromProperties(s);
} catch (IOException ioe) {
MessageUtil.error(world.getMessageHandler(),
WeaverMessages.format(WeaverMessages.XLINTDEFAULT_LOAD_PROBLEM, ioe.getMessage()));
} finally {
try {
s.close();
} catch (IOException ioe) {
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | }
}
private void setFromProperties(InputStream s) throws IOException {
Properties p = new Properties();
p.load(s);
setFromProperties(p);
}
@SuppressWarnings("rawtypes")
public void setFromProperties(Properties properties) {
for (Iterator i = properties.entrySet().iterator(); i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
Kind kind = kinds.get(entry.getKey());
if (kind == null) {
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_KEY_ERROR, entry.getKey()));
} else {
kind.setKind(getMessageKind((String) entry.getValue()));
}
}
}
public Collection<Kind> allKinds() {
return kinds.values();
}
public Kind getLintKind(String name) {
return kinds.get(name);
}
public void suppressKinds(Collection<Kind> lintKind) {
if (lintKind.isEmpty()) {
return;
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | for (Kind k : lintKind) {
k.setSuppressed(true);
}
}
public void clearAllSuppressions() {
for (Kind k : kinds.values()) {
k.setSuppressed(false);
}
}
public void clearSuppressions(Collection<Lint.Kind> lintKinds) {
for (Kind k : lintKinds) {
k.setSuppressed(false);
}
}
private IMessage.Kind getMessageKind(String v) {
if (v.equals("ignore")) {
return null;
} else if (v.equals("warning")) {
return IMessage.WARNING;
} else if (v.equals("error")) {
return IMessage.ERROR;
}
MessageUtil.error(world.getMessageHandler(), WeaverMessages.format(WeaverMessages.XLINT_VALUE_ERROR, v));
return null;
}
public Kind fromKey(String lintkey) {
return kinds.get(lintkey);
}
public class Kind { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | private final String name;
private final String message;
private IMessage.Kind kind = IMessage.WARNING;
private boolean isSupressed = false;
public Kind(String name, String message) {
this.name = name;
this.message = message;
kinds.put(this.name, this);
}
public void setSuppressed(boolean shouldBeSuppressed) {
this.isSupressed = shouldBeSuppressed;
}
public boolean isEnabled() {
return (kind != null) && !isSupressed();
}
private boolean isSupressed() { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | org.aspectj.matcher/src/org/aspectj/weaver/Lint.java | return isSupressed && (kind != IMessage.ERROR);
}
public String getName() {
return name;
}
public IMessage.Kind getKind() {
return kind;
}
public void setKind(IMessage.Kind kind) {
this.kind = kind;
}
public void signal(String info, ISourceLocation location) {
if (kind == null) {
return;
}
String text = MessageFormat.format(message, new Object[] { info });
text += " [Xlint:" + name + "]";
world.getMessageHandler().handleMessage(new LintMessage(text, kind, location, null, getLintKind(name)));
}
public void signal(String[] infos, ISourceLocation location, ISourceLocation[] extraLocations) {
if (kind == null) {
return;
}
String text = MessageFormat.format(message, (Object[]) infos);
text += " [Xlint:" + name + "]";
world.getMessageHandler().handleMessage(new LintMessage(text, kind, location, extraLocations, getLintKind(name)));
}
}
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | /* *******************************************************************
* Copyright (c) 2004 IBM Corporation
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adrian Colyer,
* ******************************************************************/
package org.aspectj.testing;
import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import org.aspectj.tools.ajc.AjcTestCase;
import org.aspectj.tools.ajc.CompilationResult;
/**
* @author colyer
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class CompileSpec implements ITestStep { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | private List expected = new ArrayList();
private String files;
private boolean includeClassesDir;
private String aspectpath;
private String classpath;
private String inpath;
private String sourceroots;
private String outjar;
private String outxml;
private String xlintfile;
private String options;
private String baseDir;
private String extdirs;
private AjcTest myTest;
public CompileSpec() { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | }
public void execute(AjcTestCase inTestCase) {
File base = new File(baseDir);
String[] args = buildArgs();
CompilationResult result = inTestCase.ajc(base,args);
AjcTestCase.MessageSpec messageSpec = buildMessageSpec();
String failMessage = "test \"" + myTest.getTitle() + "\" failed";
inTestCase.assertMessages(result,failMessage,messageSpec);
inTestCase.setShouldEmptySandbox(false);
}
public void addExpectedMessage(ExpectedMessageSpec message) {
expected.add(message);
}
public void setBaseDir(String dir) {
this.baseDir = dir;
}
protected String getBaseDir() { return baseDir; }
public void setTest(AjcTest t) {
this.myTest = t;
if (options != null && (options.indexOf("-1.5") != -1)) {
myTest.setVm("1.5");
}
}
protected AjcTest getTest() { return myTest; }
/** |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | * @return Returns the aspectpath.
*/
public String getAspectpath() {
return aspectpath;
}
/**
* @param aspectpath The aspectpath to set.
*/
public void setAspectpath(String aspectpath) {
this.aspectpath = aspectpath.replace(',',File.pathSeparatorChar);
}
/**
* @return Returns the classpath.
*/
public String getClasspath() {
return classpath;
}
/**
* @param classpath The classpath to set.
*/
public void setClasspath(String classpath) {
this.classpath = classpath.replace(',',File.pathSeparatorChar);
}
/**
* @return Returns the files.
*/
public String getFiles() {
return files;
}
/** |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | * @param files The files to set.
*/
public void setFiles(String files) {
this.files = files;
}
/**
* @return Returns the includeClassesDir.
*/
public boolean isIncludeClassesDir() {
return includeClassesDir;
}
/**
* @param includeClassesDir The includeClassesDir to set.
*/
public void setIncludeClassesDir(boolean includeClassesDir) {
this.includeClassesDir = includeClassesDir;
}
/**
* @return Returns the inpath.
*/
public String getInpath() {
return inpath;
}
/**
* @param inpath The inpath to set.
*/
public void setInpath(String inpath) {
this.inpath = inpath.replace(',',File.pathSeparatorChar).replace(';',File.pathSeparatorChar);
}
/** |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | * @return Returns the options.
*/
public String getOptions() {
return options;
}
/**
* @param options The options to set.
*/
public void setOptions(String options) {
int i = options.indexOf("!eclipse");
if (i != -1) {
this.options = options.substring(0,i);
this.options += options.substring(i + "!eclipse".length());
} else {
this.options = options;
}
}
/**
* @return Returns the outjar.
*/
public String getOutjar() {
return outjar;
}
/**
* @param outjar The outjar to set.
*/
public void setOutjar(String outjar) {
this.outjar = outjar;
}
/** |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | * @return Returns the outxml.
*/
public String getOutxmlfile() {
return outxml;
}
/**
* @param outxml The the of the aop.xml file to generate
*/
public void setOutxmlfile(String outxml) {
this.outxml = outxml;
}
/**
* @return Returns the sourceroots.
*/
public String getSourceroots() {
return sourceroots;
}
/**
* @param sourceroots The sourceroots to set.
*/
public void setSourceroots(String sourceroots) {
this.sourceroots = sourceroots;
}
/**
* @return Returns the xlintfile.
*/
public String getXlintfile() {
return xlintfile;
}
/** |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | * @param xlintfile The xlintfile to set.
*/
public void setXlintfile(String xlintfile) {
this.xlintfile = xlintfile;
}
public String getExtdirs() { return extdirs;}
public void setExtdirs(String extdirs) { this.extdirs = extdirs; }
protected String[] buildArgs() {
StringBuffer args = new StringBuffer();
if (getAspectpath() != null) {
args.append("-aspectpath ");
args.append(getAspectpath());
args.append(" ");
}
if (getSourceroots() != null) {
args.append("-sourceroots ");
args.append(getSourceroots());
args.append(" ");
}
if (getOutjar() != null) {
args.append("-outjar ");
args.append(getOutjar());
args.append(" ");
}
if (getOutxmlfile() != null) {
args.append("-outxmlfile ");
args.append(getOutxmlfile()); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | args.append(" ");
}
if (getOptions() != null) {
StringTokenizer strTok = new StringTokenizer(getOptions(),",");
while (strTok.hasMoreTokens()) {
args.append(strTok.nextToken());
args.append(" ");
}
}
if (getClasspath() != null) {
args.append("-classpath ");
args.append(getClasspath());
args.append(" ");
}
if (getXlintfile() != null) {
args.append("-Xlintfile ");
args.append(getXlintfile());
args.append(" ");
}
if (getExtdirs() != null) {
args.append("-extdirs ");
args.append(getExtdirs());
args.append(" ");
}
List fileList = new ArrayList();
List jarList = new ArrayList();
String files = getFiles();
if (files == null) files = "";
StringTokenizer strTok = new StringTokenizer(files,","); |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | while (strTok.hasMoreTokens()) {
final String file = strTok.nextToken();
if (file.endsWith(".jar")) {
jarList.add(file);
} else {
fileList.add(file);
}
}
if ((getInpath() != null) || !jarList.isEmpty()) {
args.append("-inpath ");
if (getInpath() != null) args.append(getInpath());
for (Iterator iter = jarList.iterator(); iter.hasNext();) {
String jar = (String) iter.next();
args.append(File.pathSeparator);
args.append(jar);
}
args.append(" ");
}
for (Iterator iter = fileList.iterator(); iter.hasNext();) {
String file = (String) iter.next();
args.append(file);
args.append(" ");
}
String argumentString = args.toString();
strTok = new StringTokenizer(argumentString," ");
String[] ret = new String[strTok.countTokens()];
for (int i = 0; i < ret.length; i++) {
ret[i] = strTok.nextToken();
}
return ret; |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | testing/newsrc/org/aspectj/testing/CompileSpec.java | }
protected AjcTestCase.MessageSpec buildMessageSpec() {
List infos = null;
List warnings = new ArrayList();
List errors = new ArrayList();
List fails = new ArrayList();
List weaveInfos = new ArrayList();
for (Iterator iter = expected.iterator(); iter.hasNext();) {
ExpectedMessageSpec exMsg = (ExpectedMessageSpec) iter.next();
String kind = exMsg.getKind();
if (kind.equals("info")) {
if (infos == null) infos = new ArrayList();
infos.add(exMsg.toMessage());
} else if (kind.equals("warning")) {
warnings.add(exMsg.toMessage());
} else if (kind.equals("error")) {
errors.add(exMsg.toMessage());
} else if (kind.equals("fail")) {
fails.add(exMsg.toMessage());
} else if (kind.equals("abort")) {
fails.add(exMsg.toMessage());
} else if (kind.equals("weave")) {
weaveInfos.add(exMsg.toMessage());
}
}
return new AjcTestCase.MessageSpec(infos,warnings,errors,fails,weaveInfos);
}
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | /*******************************************************************************
* Copyright (c) 2013 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc174;
import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
/**
* @author Andy Clement
*/
public class Ajc174Tests extends org.aspectj.testing.XMLBasedAjcTestCase { |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | public void testAnnotatedItd_418129() throws Exception {
runTest("annotated itd");
}
public void testAnnotatedItd_418129_2() throws Exception {
runTest("annotated itd 2");
}
public void testAnnotatedItd_418129_3() throws Exception {
runTest("annotated itd 3");
}
public void testAnnotatedItd_418129_4() throws Exception {
runTest("annotated itd 4");
}
public void testSuperItdCtor_413378() throws Exception {
runTest("super itd ctor");
}
public void testCLExclusion_pr368046_1_noskippedloaders() {
runTest("classloader exclusion - 1");
} |
419,279 | Bug 419279 ajc option to change -Xlint level per-message without Xlintfile | The -Xlintfile option is not a great fit for controlling message across multiple build projects, specifically in my case from the pluginManagement section of a maven parent pom. The problem is that you need a local file to configure the per-message output levels (ignore/warning/error) when you really want to specify it in the build script or in a shared file. As an alternative to -Xlintfile, it would be handy to be able to change an Xlint warning level per message using command line options. For example: ajc -Xlint:adviceDidNotMatch=ignore would override the XlintDefault.properties file for the adviceDidNotMatch message. With Regards Rob | resolved fixed | b2cd5fa | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T19:44:23Z" | "2013-10-11T19:33:20Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | public void testCLExclusion_pr368046_1_syspropset() {
try {
System.setProperty("aj.weaving.loadersToSkip", "foo");
runTest("classloader exclusion - 2");
} finally {
System.setProperty("aj.weaving.loadersToSkip", "");
}
}
public void testCLExclusion_pr368046_1_again_noskippedloaders() {
runTest("classloader exclusion - 3");
}
public void testCLExclusion_pr368046_2_usingaopxml() {
runTest("classloader exclusion - 4");
}
public void testCLExclusion_pr368046_2_usingaopxmlReal() {
runTest("classloader exclusion - 5");
}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc174Tests.class);
}
@Override
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc174/ajc174.xml");
}
} |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | /* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.weaver;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import org.aspectj.bridge.ISourceLocation;
import org.aspectj.weaver.patterns.DeclareErrorOrWarning;
import org.aspectj.weaver.patterns.PerClause;
import org.aspectj.weaver.patterns.Pointcut;
/**
* Representation of a shadow munger for a declare error or warning declaration.
*
* @author Andy Clement
*/
public class Checker extends ShadowMunger { |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | private boolean isError;
private String message;
private volatile int hashCode = -1;
@SuppressWarnings("unused")
private Checker() {
} |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | /**
* Create a Checker for a declare error or declare warning.
*
* @param deow the declare error or declare warning for which to create the checker munger
*/
public Checker(DeclareErrorOrWarning deow) {
super(deow.getPointcut(), deow.getStart(), deow.getEnd(), deow.getSourceContext(), ShadowMungerDeow);
this.message = deow.getMessage();
this.isError = deow.isError();
}
/**
* Only used when filling in a parameterized Checker
*/
private Checker(Pointcut pointcut, int start, int end, ISourceContext context, String message, boolean isError) {
super(pointcut, start, end, context, ShadowMungerDeow);
this.message = message;
this.isError = isError;
}
public boolean isError() {
return isError;
}
public String getMessage(Shadow shadow) {
return format(this.message, shadow);
}
@Override
public void specializeOn(Shadow shadow) {
throw new IllegalStateException("Cannot call specializeOn(...) for a Checker");
}
@Override
public boolean implementOn(Shadow shadow) { |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | throw new IllegalStateException("Cannot call implementOn(...) for a Checker");
}
/**
* Determine if the Checker matches at a shadow. If it does then we can immediately report the message. Currently, there can
* never be a non-statically determinable match.
*
* @param shadow the shadow which to match against
* @param world the world through which to access message handlers
*/
@Override
public boolean match(Shadow shadow, World world) {
if (super.match(shadow, world)) {
world.reportCheckerMatch(this, shadow);
}
return false;
}
public int compareTo(Object other) {
return 0;
}
@Override
public boolean mustCheckExceptions() {
return true;
}
@Override
public Collection<ResolvedType> getThrownExceptions() {
return Collections.emptyList();
}
@Override |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | public boolean equals(Object other) {
if (!(other instanceof Checker)) {
return false;
}
Checker o = (Checker) other;
return o.isError == isError && ((o.pointcut == null) ? (pointcut == null) : o.pointcut.equals(pointcut));
}
@Override
public int hashCode() {
if (hashCode == -1) {
int result = 17;
result = 37 * result + (isError ? 1 : 0);
result = 37 * result + ((pointcut == null) ? 0 : pointcut.hashCode());
hashCode = result;
}
return hashCode;
}
/**
* Parameterize the Checker by parameterizing the pointcut
*/
@Override
public ShadowMunger parameterizeWith(ResolvedType declaringType, Map<String, UnresolvedType> typeVariableMap) {
Checker ret = new Checker(this.pointcut.parameterizeWith(typeVariableMap, declaringType.getWorld()), this.start, this.end,
this.sourceContext, this.message, this.isError);
return ret;
}
/**
* Concretize this Checker by concretizing the pointcut
*/
@Override |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | public ShadowMunger concretize(ResolvedType theAspect, World world, PerClause clause) {
this.pointcut = this.pointcut.concretize(theAspect, getDeclaringType(), 0, this);
this.hashCode = -1;
return this;
}
@Override
public ResolvedType getConcreteAspect() {
return getDeclaringType();
}
private int nextCurly(String string, int pos) {
do {
int curlyIndex = string.indexOf('{', pos);
if (curlyIndex == -1) {
return -1;
}
if (curlyIndex == 0) {
return 0; |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | }
if (string.charAt(curlyIndex - 1) != '\\') {
return curlyIndex;
}
pos = curlyIndex + 1;
} while (pos < string.length());
return -1;
}
private String format(String msg, Shadow shadow) {
int pos = 0;
int curlyIndex = nextCurly(msg, 0);
if (curlyIndex == -1) {
if (msg.indexOf('{') != -1) {
return msg.replace("\\{", "{");
} else {
return msg;
}
}
StringBuffer ret = new StringBuffer();
while (curlyIndex >= 0) {
if (curlyIndex > 0) {
ret.append(msg.substring(pos, curlyIndex).replace("\\{", "{"));
}
int endCurly = msg.indexOf('}', curlyIndex);
if (endCurly == -1) {
ret.append('{');
pos = curlyIndex + 1;
} else { |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | ret.append(getValue(msg.substring(curlyIndex + 1, endCurly), shadow));
}
pos = endCurly + 1;
curlyIndex = nextCurly(msg, pos);
}
ret.append(msg.substring(pos, msg.length()));
return ret.toString();
}
/**
* @param buf the buffer in which to insert the substitution
* @param shadow shadow from which to draw context info
* @param c the substitution character
*/
private String getValue(String key, Shadow shadow) {
if (key.equalsIgnoreCase("joinpoint")) {
return shadow.toString();
} else if (key.equalsIgnoreCase("joinpoint.kind")) {
return shadow.getKind().getName();
} else if (key.equalsIgnoreCase("joinpoint.signature")) {
return shadow.getSignature().toString();
} else if (key.equalsIgnoreCase("joinpoint.signature.declaringtype")) {
return shadow.getSignature().getDeclaringType().toString();
} else if (key.equalsIgnoreCase("joinpoint.signature.name")) {
return shadow.getSignature().getName();
} else if (key.equalsIgnoreCase("joinpoint.sourcelocation.sourcefile")) {
ISourceLocation loc = shadow.getSourceLocation();
if ((loc != null) && (loc.getSourceFile() != null)) {
return loc.getSourceFile().toString();
} else {
return "UNKNOWN"; |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | org.aspectj.matcher/src/org/aspectj/weaver/Checker.java | }
} else if (key.equalsIgnoreCase("joinpoint.sourcelocation.line")) {
ISourceLocation loc = shadow.getSourceLocation();
if (loc != null) {
return Integer.toString(loc.getLine());
} else {
return "-1";
}
} else if (key.equalsIgnoreCase("advice.aspecttype")) {
return getDeclaringType().getName();
} else if (key.equalsIgnoreCase("advice.sourcelocation.line")) {
ISourceLocation loc = getSourceLocation();
if ((loc != null) && (loc.getSourceFile() != null)) {
return Integer.toString(loc.getLine());
} else {
return "-1";
}
} else if (key.equalsIgnoreCase("advice.sourcelocation.sourcefile")) {
ISourceLocation loc = getSourceLocation();
if ((loc != null) && (loc.getSourceFile() != null)) {
return loc.getSourceFile().toString();
} else {
return "UNKNOWN";
}
} else {
return "UNKNOWN_KEY{" + key + "}";
}
}
} |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | /*******************************************************************************
* Copyright (c) 2013 Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement - initial API and implementation
*******************************************************************************/
package org.aspectj.systemtest.ajc174;
import java.io.File;
import junit.framework.Test;
import org.aspectj.testing.XMLBasedAjcTestCase;
/**
* @author Andy Clement
*/
public class Ajc174Tests extends org.aspectj.testing.XMLBasedAjcTestCase { |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | public void testMoreConfigurableLint_419279() throws Exception {
runTest("more configurable lint");
}
public void testAnnotatedItd_418129() throws Exception {
runTest("annotated itd");
}
public void testAnnotatedItd_418129_2() throws Exception {
runTest("annotated itd 2");
}
public void testAnnotatedItd_418129_3() throws Exception {
runTest("annotated itd 3");
}
public void testAnnotatedItd_418129_4() throws Exception {
runTest("annotated itd 4");
}
public void testSuperItdCtor_413378() throws Exception {
runTest("super itd ctor");
}
public void testCLExclusion_pr368046_1_noskippedloaders() {
runTest("classloader exclusion - 1");
} |
420,210 | Bug 420210 Support additional message insert keys in declare error/warning | It would be good to be able to insert the enclosing class name or enclosing member for a joinpoint. | resolved fixed | 9319e34 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-10-23T20:16:20Z" | "2013-10-23T20:26:40Z" | tests/src/org/aspectj/systemtest/ajc174/Ajc174Tests.java | public void testCLExclusion_pr368046_1_syspropset() {
try {
System.setProperty("aj.weaving.loadersToSkip", "foo");
runTest("classloader exclusion - 2");
} finally {
System.setProperty("aj.weaving.loadersToSkip", "");
}
}
public void testCLExclusion_pr368046_1_again_noskippedloaders() {
runTest("classloader exclusion - 3");
}
public void testCLExclusion_pr368046_2_usingaopxml() {
runTest("classloader exclusion - 4");
}
public void testCLExclusion_pr368046_2_usingaopxmlReal() {
runTest("classloader exclusion - 5");
}
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc174Tests.class);
}
@Override
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc174/ajc174.xml");
}
} |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | /* *******************************************************************
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http:www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* PARC initial implementation
* Andy Clement overhauled
* ******************************************************************/
package org.aspectj.ajdt.internal.core.builder;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.SoftReference;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable; |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.aspectj.ajdt.internal.compiler.CompilationResultDestinationManager;
import org.aspectj.ajdt.internal.compiler.InterimCompilationResult;
import org.aspectj.ajdt.internal.core.builder.AjBuildConfig.BinarySourceFile;
import org.aspectj.apache.bcel.classfile.ClassParser;
import org.aspectj.asm.AsmManager;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.Message;
import org.aspectj.bridge.SourceLocation;
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
import org.aspectj.org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryField;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryNestedType;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryType;
import org.aspectj.org.eclipse.jdt.internal.compiler.env.INameEnvironment;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
import org.aspectj.org.eclipse.jdt.internal.core.builder.ReferenceCollection;
import org.aspectj.org.eclipse.jdt.internal.core.builder.StringSet;
import org.aspectj.util.FileUtil;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.CompressingDataOutputStream;
import org.aspectj.weaver.ReferenceType; |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | import org.aspectj.weaver.ReferenceTypeDelegate;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.bcel.BcelWeaver;
import org.aspectj.weaver.bcel.BcelWorld;
import org.aspectj.weaver.bcel.TypeDelegateResolver;
import org.aspectj.weaver.bcel.UnwovenClassFile;
/**
* Maintains state needed for incremental compilation
*/
public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateResolver {
public static boolean CHECK_STATE_FIRST = true;
public static IStateListener stateListener = null;
public static boolean FORCE_INCREMENTAL_DURING_TESTING = false;
static int PATHID_CLASSPATH = 0;
static int PATHID_ASPECTPATH = 1;
static int PATHID_INPATH = 2;
private static int CLASS_FILE_NO_CHANGES = 0;
private static int CLASS_FILE_CHANGED_THAT_NEEDS_INCREMENTAL_BUILD = 1;
private static int CLASS_FILE_CHANGED_THAT_NEEDS_FULL_BUILD = 2;
private static final char[][] EMPTY_CHAR_ARRAY = new char[0][];
/**
* When looking at changes on the classpath, this set accumulates files in our state instance that affected by those changes.
* Then if we can do an incremental build - these must be compiled.
*/
private final Set<File> affectedFiles = new HashSet<File>(); |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | private StringSet qualifiedStrings = new StringSet(3);
private StringSet simpleStrings = new StringSet(3);
private Set<File> addedFiles;
private Set<File> deletedFiles;
private Set<BinarySourceFile> addedBinaryFiles;
private Set<BinarySourceFile> deletedBinaryFiles;
public final Set<String> deltaAddedClasses = new HashSet<String>();
private final AjBuildManager buildManager;
private INameEnvironment nameEnvironment;
private boolean couldBeSubsequentIncrementalBuild = false;
private boolean batchBuildRequiredThisTime = false;
private AjBuildConfig buildConfig;
private long lastSuccessfulFullBuildTime = -1;
private final Hashtable<String, Long> structuralChangesSinceLastFullBuild = new Hashtable<String, Long>();
private long lastSuccessfulBuildTime = -1;
private long currentBuildTime = -1;
private AsmManager structureModel;
/**
* For a given source file, records the ClassFiles (which contain a fully qualified name and a file name) that were created when
* the source file was compiled. Populated in noteResult and used in addDependentsOf(File)
*/
private final Map<File, List<ClassFile>> fullyQualifiedTypeNamesResultingFromCompilationUnit = new HashMap<File, List<ClassFile>>();
/**
* Source files defining aspects Populated in noteResult and used in processDeletedFiles |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | */
private final Set<File> sourceFilesDefiningAspects = new HashSet<File>();
/**
* Populated in noteResult to record the set of types that should be recompiled if the given file is modified or deleted.
* Referred to during addAffectedSourceFiles when calculating incremental compilation set.
*/
private final Map<File, ReferenceCollection> references = new HashMap<File, ReferenceCollection>();
/**
* Holds UnwovenClassFiles (byte[]s) originating from the given file source. This could be a jar file, a directory, or an
* individual .class file. This is an *expensive* map. It is cleared immediately following a batch build, and the cheaper
* inputClassFilesBySource map is kept for processing of any subsequent incremental builds.
*
* Populated during AjBuildManager.initBcelWorld().
*
* Passed into AjCompiler adapter as the set of binary input files to reweave if the weaver determines a full weave is required.
*
* Cleared during initBcelWorld prior to repopulation.
*
* Used when a file is deleted during incremental compilation to delete all of the class files in the output directory that
* resulted from the weaving of File.
*
* Used during getBinaryFilesToCompile when compiling incrementally to determine which files should be recompiled if a given
* input file has changed.
*
*/
private Map<String, List<UnwovenClassFile>> binarySourceFiles = new HashMap<String, List<UnwovenClassFile>>();
/**
* Initially a duplicate of the information held in binarySourceFiles, with the key difference that the values are ClassFiles
* (type name, File) not UnwovenClassFiles (which also have all the byte code in them). After a batch build, binarySourceFiles
* is cleared, leaving just this much lighter weight map to use in processing subsequent incremental builds. |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | */
private final Map<String, List<ClassFile>> inputClassFilesBySource = new HashMap<String, List<ClassFile>>();
/**
* A list of the .class files created by this state that contain aspects.
*/
private final List<String> aspectClassFiles = new ArrayList<String>();
/**
* Holds structure information on types as they were at the end of the last build. It would be nice to get rid of this too, but
* can't see an easy way to do that right now.
*/
private final Map<String, CompactTypeStructureRepresentation> resolvedTypeStructuresFromLastBuild = new HashMap<String, CompactTypeStructureRepresentation>();
/**
* Populated in noteResult to record the set of UnwovenClassFiles (intermediate results) that originated from compilation of the
* class with the given fully-qualified name.
*
* Used in removeAllResultsOfLastBuild to remove .class files from output directory.
*
* Passed into StatefulNameEnvironment during incremental compilation to support findType lookups.
*/
private final Map<String, File> classesFromName = new HashMap<String, File>();
/**
* Populated by AjBuildManager to record the aspects with the file name in which they're contained. This is later used when
* writing the outxml file in AjBuildManager. Need to record the file name because want to write an outxml file for each of the
* output directories and in order to ask the OutputLocationManager for the output location for a given aspect we need the file
* in which it is contained.
*/
private Map<String, char[]> aspectsFromFileNames;
private Set<File> compiledSourceFiles = new HashSet<File>();
private final Map<String, File> resources = new HashMap<String, File>();
SoftHashMapfileToClassNameMap = new SoftHashMap(); |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | private BcelWeaver weaver;
private BcelWorld world;
public AjState(AjBuildManager buildManager) {
this.buildManager = buildManager;
}
public void setCouldBeSubsequentIncrementalBuild(boolean yesThereCould) {
this.couldBeSubsequentIncrementalBuild = yesThereCould;
}
void successfulCompile(AjBuildConfig config, boolean wasFullBuild) {
buildConfig = config;
lastSuccessfulBuildTime = currentBuildTime;
if (stateListener != null) {
stateListener.buildSuccessful(wasFullBuild);
}
if (wasFullBuild) {
lastSuccessfulFullBuildTime = currentBuildTime;
}
}
/**
* Returns false if a batch build is needed.
*/
public boolean prepareForNextBuild(AjBuildConfig newBuildConfig) {
currentBuildTime = System.currentTimeMillis();
if (!maybeIncremental()) {
if (listenerDefined()) {
getListener().recordDecision(
"Preparing for build: not going to be incremental because either not in AJDT or incremental deactivated");
} |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | return false;
}
if (this.batchBuildRequiredThisTime) {
this.batchBuildRequiredThisTime = false;
if (listenerDefined()) {
getListener().recordDecision(
"Preparing for build: not going to be incremental this time because batch build explicitly forced");
}
return false;
}
if (lastSuccessfulBuildTime == -1 || buildConfig == null) {
structuralChangesSinceLastFullBuild.clear();
if (listenerDefined()) {
getListener().recordDecision(
"Preparing for build: not going to be incremental because no successful previous full build");
}
return false;
}
if (newBuildConfig.getOutputJar() != null) {
structuralChangesSinceLastFullBuild.clear();
if (listenerDefined()) {
getListener().recordDecision("Preparing for build: not going to be incremental because outjar being used");
}
return false;
}
affectedFiles.clear();
if (pathChange(buildConfig, newBuildConfig)) { |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | removeAllResultsOfLastBuild();
if (stateListener != null) {
stateListener.pathChangeDetected();
}
structuralChangesSinceLastFullBuild.clear();
if (listenerDefined()) {
getListener()
.recordDecision(
"Preparing for build: not going to be incremental because path change detected (one of classpath/aspectpath/inpath/injars)");
}
return false;
}
if (simpleStrings.elementSize > 20) {
simpleStrings = new StringSet(3);
} else {
simpleStrings.clear();
}
if (qualifiedStrings.elementSize > 20) {
qualifiedStrings = new StringSet(3);
} else {
qualifiedStrings.clear();
}
if ((newBuildConfig.getChanged() & PROJECTSOURCEFILES_CHANGED) == 0) {
addedFiles = Collections.emptySet();
deletedFiles = Collections.emptySet(); |
423,257 | Bug 423257 LTW - java.lang.VerifyError: Bad return type with generics and local variables | null | resolved fixed | dd88d21 | AspectJ | https://github.com/eclipse/org.aspectj | eclipse/org.aspectj | java | null | null | null | "2013-12-06T18:33:48Z" | "2013-12-04T23:33:20Z" | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java | } else {
Set<File> oldFiles = new HashSet<File>(buildConfig.getFiles());
Set<File> newFiles = new HashSet<File>(newBuildConfig.getFiles());
addedFiles = new HashSet<File>(newFiles);
addedFiles.removeAll(oldFiles);
deletedFiles = new HashSet<File>(oldFiles);
deletedFiles.removeAll(newFiles);
}
Set<BinarySourceFile> oldBinaryFiles = new HashSet<BinarySourceFile>(buildConfig.getBinaryFiles());
Set<BinarySourceFile> newBinaryFiles = new HashSet<BinarySourceFile>(newBuildConfig.getBinaryFiles());
addedBinaryFiles = new HashSet<BinarySourceFile>(newBinaryFiles);
addedBinaryFiles.removeAll(oldBinaryFiles);
deletedBinaryFiles = new HashSet<BinarySourceFile>(oldBinaryFiles);
deletedBinaryFiles.removeAll(newBinaryFiles);
boolean couldStillBeIncremental = processDeletedFiles(deletedFiles);
if (!couldStillBeIncremental) {
if (listenerDefined()) {
getListener().recordDecision("Preparing for build: not going to be incremental because an aspect was deleted");
}
return false;
}
if (listenerDefined()) {
getListener().recordDecision("Preparing for build: planning to be an incremental build");
}
return true;
}
/**
* Checks if any of the files in the set passed in contains an aspect declaration. If one is found then we start the process of
* batch building, i.e. we remove all the results of the last build, call any registered listener to tell them whats happened
* and return false. |
Subsets and Splits