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
timestamp[us, tz=UTC] | report_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 23
187
| chunk_content
stringlengths 1
22k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
assertOptionEquals( "report method with cons name",
options,
CompilerOptions.OPTION_ReportMethodWithConstructorName,
CompilerOptions.WARNING);
assertOptionEquals( "report deprecation",
options,
CompilerOptions.OPTION_ReportDeprecation,
CompilerOptions.WARNING);
assertOptionEquals( "report hidden catch block",
options,
CompilerOptions.OPTION_ReportHiddenCatchBlock,
CompilerOptions.WARNING);
assertOptionEquals( "report unused local",
options,
CompilerOptions.OPTION_ReportUnusedLocal,
CompilerOptions.WARNING);
assertOptionEquals( "report unused param",
options,
CompilerOptions.OPTION_ReportUnusedParameter,
CompilerOptions.WARNING);
assertOptionEquals( "report synthectic access",
options,
CompilerOptions.OPTION_ReportSyntheticAccessEmulation,
CompilerOptions.WARNING);
assertOptionEquals( "report non-externalized string literal",
options,
CompilerOptions.OPTION_ReportNonExternalizedStringLiteral,
CompilerOptions.WARNING);
assertOptionEquals( "report assert identifer",
options,
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
CompilerOptions.OPTION_ReportAssertIdentifier,
CompilerOptions.WARNING);
}
public void testNoDebugOptions() {
buildOptions.setDebugLevel( null );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
Map options = buildConfig.getOptions().getMap();
assertOptionEquals( "debug source",
options,
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug lines",
options,
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug vars",
options,
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
}
public void testEmptyDebugOptions() {
buildOptions.setDebugLevel( new HashSet() );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
Map options = buildConfig.getOptions().getMap();
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
assertOptionEquals( "debug source",
options,
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug lines",
options,
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug vars",
options,
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
}
public void testDebugAll() {
HashSet debugOpts = new HashSet();
debugOpts.add( BuildOptionsAdapter.DEBUG_ALL );
buildOptions.setDebugLevel( debugOpts );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
Map options = buildConfig.getOptions().getMap();
assertOptionEquals( "debug source",
options,
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug lines",
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
options,
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug vars",
options,
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
}
public void testDebugSet() {
HashSet debugOpts = new HashSet();
debugOpts.add( BuildOptionsAdapter.DEBUG_SOURCE );
debugOpts.add( BuildOptionsAdapter.DEBUG_VARS );
buildOptions.setDebugLevel( debugOpts );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
Map options = buildConfig.getOptions().getMap();
assertOptionEquals( "debug source",
options,
CompilerOptions.OPTION_SourceFileAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug lines",
options,
CompilerOptions.OPTION_LineNumberAttribute,
CompilerOptions.GENERATE);
assertOptionEquals( "debug vars",
options,
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
CompilerOptions.OPTION_LocalVariableAttribute,
CompilerOptions.GENERATE);
}
public void testNoImport() {
buildOptions.setNoImportError( true );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
}
public void testPreserveAllLocals() {
buildOptions.setPreserveAllLocals( true );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
Map options = buildConfig.getOptions().getMap();
String preserve = (String) options.get( CompilerOptions.OPTION_PreserveUnusedLocal );
assertEquals( "preserve unused", CompilerOptions.PRESERVE, preserve );
}
public void testNonStandardOptions() {
buildOptions.setNonStandardOptions( "-XterminateAfterCompilation" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
assertTrue( "XterminateAfterCompilation", buildConfig.isTerminateAfterCompilation() );
buildOptions.setNonStandardOptions( "-XserializableAspects" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue( "XserializableAspects", buildConfig.isXserializableAspects() );
buildOptions.setNonStandardOptions( "-XnoInline" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue( "XnoInline", buildConfig.isXnoInline());
buildOptions.setNonStandardOptions( "-Xlint" );
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertEquals( "Xlint", AjBuildConfig.AJLINT_DEFAULT,
buildConfig.getLintMode());
buildOptions.setNonStandardOptions( "-Xlint:error" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertEquals( "Xlint", AjBuildConfig.AJLINT_ERROR,
buildConfig.getLintMode());
buildOptions.setNonStandardOptions( "-Xlint -XnoInline -XserializableAspects" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
assertEquals( "Xlint", AjBuildConfig.AJLINT_DEFAULT,
buildConfig.getLintMode());
assertTrue( "XnoInline", buildConfig.isXnoInline());
assertTrue( "XserializableAspects", buildConfig.isXserializableAspects() );
}
public void testSourceRoots() {
Set roots = new HashSet();
projectProperties.setSourceRoots( roots );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List configRoots = buildConfig.getSourceRoots();
assertTrue( "no source dirs", configRoots.isEmpty() );
File f = new File( AjdeTests.testDataPath("examples/figures/figures-coverage" ));
roots.add( f );
buildConfig = compilerAdapter.genBuildConfig( configFile );
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
assertTrue(configFile + " failed", null != buildConfig);
List configRoots2 = buildConfig.getSourceRoots();
assertTrue( "one source dir", configRoots2.size() == 1 );
assertTrue( "source dir", configRoots2.contains(f) );
File f2 = new File( AjdeTests.testDataPath("examples/figures/figures-demo"));
roots.add( f2 );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List configRoots3 = buildConfig.getSourceRoots();
assertTrue( "two source dirs", configRoots3.size() == 2 );
assertTrue( "source dir 1", configRoots3.contains(f) );
assertTrue( "source dir 2", configRoots3.contains(f2) );
}
public void testInJars() {
Set jars = new HashSet();
projectProperties.setInJars( jars );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List inJars = buildConfig.getInJars();
assertTrue( "no in jars", inJars.isEmpty() );
File f = new File( "jarone.jar" );
jars.add( f );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List inJars2 = buildConfig.getInJars();
assertTrue( "one in jar", inJars2.size() == 1 );
assertTrue( "in jar", inJars2.contains(f) );
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
File f2 = new File( "jartwo.jar" );
jars.add( f2 );
buildConfig = compilerAdapter.genBuildConfig( configFile );
List inJars3 = buildConfig.getInJars();
assertTrue( "two in jars", inJars3.size() == 2 );
assertTrue( "in jar 1", inJars3.contains(f) );
assertTrue( "in jar 2", inJars3.contains(f2) );
}
public void testAspectPath() {
Set aspects = new HashSet();
projectProperties.setAspectPath( aspects );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List aPath = buildConfig.getAspectpath();
assertTrue( "no aspect path", aPath.isEmpty() );
File f = new File( "jarone.jar" );
aspects.add( f );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
List aPath2 = buildConfig.getAspectpath();
assertEquals("aspectpath", 1, aPath2.size());
assertTrue( "1 aspectpath", aPath2.contains(f) );
File f2 = new File( "jartwo.jar" );
aspects.add( f2 );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
List aPath3 = buildConfig.getAspectpath();
assertTrue( "two jars in path", aPath3.size() == 2 );
assertTrue( "1 aspectpath", aPath3.contains(f) );
assertTrue( "2 aspectpath", aPath3.contains(f2) );
}
public void testOutJar() {
String outJar = "mybuild.jar";
projectProperties.setOutJar( outJar );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
assertNotNull("output jar", buildConfig.getOutputJar());
assertEquals( "out jar", outJar, buildConfig.getOutputJar().toString() );
}
public void testXHasMember() {
buildOptions.setNonStandardOptions("-XhasMember");
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
assertTrue( "XhasMember", buildConfig.isXHasMemberEnabled() );
}
protected void setUp() throws Exception {
preferencesAdapter = new UserPreferencesStore(false);
buildOptions = new AjcBuildOptions(preferencesAdapter);
compilerAdapter = new CompilerAdapter();
projectProperties = new NullIdeProperties( "" );
taskListManager = new NullIdeTaskListManager();
ErrorHandler handler = new NullIdeErrorHandler();
try {
Ajde.init(
|
164,288 |
Bug 164288 Can no longer compile JDK 1.5 projects with apsectj for JDeveloper
|
I am working with AspectJ 1.5.2 in JDeveloper and have found that it is not possible to convince the compiler to use JDK 5 constructs. It appears that there is a method on AjcBuildOptions called getJavaOptionsMap() which is currently implemented to return null in all cases. In CompilerAdapter.configureBuildOptions areound line 358 the code tried to access this object to access whether to use JDK 5 constructs or not. Since the return value is always null the project is never properly configured. I notice that the only other implementation of the root interface is CoreBuildOption which appears to directly return a structure from the eclipse class JavaProject. It would appear that this interface is breaking the rules on abstraction, is this the correct read on the situation? If so the solution would either be to implement a CoreBuildOption class to correctly work with the ADJE project adapter class or alter the code in Compiler adapter to correct use the properties in project adapter. I think that the latter is probably the best as BuildOption assumes a depedency on Eclipse which shouldn't be there. We do currently have customer, one in nato, who are currently having to work around this issue so it would be good to get it resolve for 1.5.3 if possible But I know I am a bit late for that now do to a lost email.
|
resolved fixed
|
c54fa62
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-17T13:45:52Z | 2006-11-13T09:26:40Z |
ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
|
null,
taskListManager,
null,
projectProperties,
buildOptions,
null,
null,
handler);
} catch (Throwable t) {
String s = "Unable to initialize AJDE "
+ LangUtil.renderException(t);
assertTrue(s, false);
}
}
protected void tearDown() throws Exception {
super.tearDown();
preferencesAdapter = null;
buildOptions = null;
compilerAdapter = null;
projectProperties = null;
taskListManager = null;
}
private void assertOptionEquals( String reason, Map options, String optionName, String value) {
String mapValue = (String) options.get(optionName);
assertEquals( reason, value, mapValue );
}
}
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
/*******************************************************************************
* Copyright (c) 2005 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://eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alexandre Vasseur initial implementation
*******************************************************************************/
package org.aspectj.weaver.loadtime;
import org.aspectj.apache.bcel.Constants;
import org.aspectj.apache.bcel.classfile.JavaClass;
import org.aspectj.apache.bcel.generic.InstructionConstants;
import org.aspectj.apache.bcel.generic.InstructionList;
import org.aspectj.apache.bcel.generic.ObjectType;
import org.aspectj.apache.bcel.generic.Type;
import org.aspectj.apache.bcel.generic.annotation.AnnotationGen;
import org.aspectj.apache.bcel.generic.annotation.ElementNameValuePairGen;
import org.aspectj.apache.bcel.generic.annotation.ElementValueGen;
import org.aspectj.apache.bcel.generic.annotation.SimpleElementValueGen;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.Message;
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
import org.aspectj.weaver.AnnotationX;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.World;
import org.aspectj.weaver.bcel.BcelPerClauseAspectAdder;
import org.aspectj.weaver.bcel.BcelWorld;
import org.aspectj.weaver.bcel.LazyClassGen;
import org.aspectj.weaver.bcel.LazyMethodGen;
import org.aspectj.weaver.loadtime.definition.Definition;
import org.aspectj.weaver.patterns.PerClause;
import org.aspectj.weaver.patterns.PerSingleton;
import java.lang.reflect.Modifier;
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.Map;
/**
* Generates bytecode for concrete-aspect
* <p/>
* The concrete aspect is @AspectJ code generated. As it is build during aop.xml definitions registration
* we perform the type munging for perclause ie aspectOf artifact directly, instead of waiting for it
* to go thru the weaver (that we are in the middle of configuring).
*
* @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
*/
public class ConcreteAspectCodeGen {
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
private final static String[] EMPTY_STRINGS = new String[0];
private final static Type[] EMPTY_TYPES = new Type[0];
/**
* Concrete aspect definition we build for
*/
private final Definition.ConcreteAspect m_concreteAspect;
/**
* World for which we build for
*/
private final World m_world;
/**
* Set to true when all is checks are verified
*/
private boolean m_isValid = false;
/**
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
* The parent aspect, not concretized
*/
private ResolvedType m_parent;
/**
* Aspect perClause, used for direct munging of aspectOf artifacts
*/
private PerClause m_perClause;
/**
* Create a new compiler for a concrete aspect
*
* @param concreteAspect
* @param world
*/
ConcreteAspectCodeGen(Definition.ConcreteAspect concreteAspect, World world) {
m_concreteAspect = concreteAspect;
m_world = world;
}
/**
* Checks that concrete aspect is valid
*
* @return true if ok, false otherwise
*/
public boolean validate() {
if (!(m_world instanceof BcelWorld)) {
reportError("Internal error: world must be of type BcelWorld");
return false;
}
ResolvedType current = m_world.resolve(m_concreteAspect.name, true);
if (!current.isMissing()) {
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
reportError("Attempt to concretize but chosen aspect name already defined: " + stringify());
return false;
}
if (m_concreteAspect.extend == null && m_concreteAspect.precedence != null) {
if (m_concreteAspect.pointcuts.isEmpty()) {
m_isValid = true;
m_perClause = new PerSingleton();
m_parent = null;
return true;
} else {
reportError("Attempt to use nested pointcuts without extends clause: "+stringify());
return false;
}
}
m_parent = m_world.resolve(m_concreteAspect.extend, true);
if (m_parent.isMissing()) {
String fixedName = m_concreteAspect.extend;
int hasDot = fixedName.lastIndexOf('.');
while (hasDot > 0) {
char[] fixedNameChars = fixedName.toCharArray();
fixedNameChars[hasDot] = '$';
fixedName = new String(fixedNameChars);
hasDot = fixedName.lastIndexOf('.');
m_parent = m_world.resolve(UnresolvedType.forName(fixedName), true);
if (!m_parent.isMissing()) {
break;
}
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
}
}
if (m_parent.isMissing()) {
reportError("Cannot find m_parent aspect for: " + stringify());
return false;
}
if (!m_parent.isAbstract()) {
reportError("Attempt to concretize a non-abstract aspect: " + stringify());
return false;
}
if (!m_parent.isAspect()) {
reportError("Attempt to concretize a non aspect: " + stringify());
return false;
}
List elligibleAbstractions = new ArrayList();
Collection abstractMethods = getOutstandingAbstractMethods(m_parent);
for (Iterator iter = abstractMethods.iterator(); iter.hasNext();) {
ResolvedMember method = (ResolvedMember) iter.next();
if ("()V".equals(method.getSignature())) {
String n = method.getName();
if (n.startsWith("ajc$pointcut")) {
n = n.substring(14);
n = n.substring(0,n.indexOf("$"));
elligibleAbstractions.add(n);
} else if (hasPointcutAnnotation(method)) {
elligibleAbstractions.add(method.getName());
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
} else {
reportError("Abstract method '" + method.toString() + "' cannot be concretized in XML: " + stringify());
return false;
}
} else {
if (method.getName().startsWith("ajc$pointcut") || hasPointcutAnnotation(method)) {
reportError("Abstract method '" + method.toString() + "' cannot be concretized as a pointcut (illegal signature, must have no arguments, must return void): " + stringify());
return false;
} else {
reportError("Abstract method '" + method.toString() + "' cannot be concretized in XML: " + stringify());
return false;
}
}
}
List pointcutNames = new ArrayList();
for (Iterator it = m_concreteAspect.pointcuts.iterator(); it.hasNext();) {
Definition.Pointcut abstractPc = (Definition.Pointcut) it.next();
pointcutNames.add(abstractPc.name);
}
for (Iterator it = elligibleAbstractions.iterator(); it.hasNext();) {
String elligiblePc = (String) it.next();
if (!pointcutNames.contains(elligiblePc)) {
reportError("Abstract pointcut '" + elligiblePc + "' not configured: " + stringify());
return false;
}
}
m_perClause = m_parent.getPerClause();
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
m_isValid = true;
return m_isValid;
}
private Collection getOutstandingAbstractMethods(ResolvedType type) {
Map collector = new HashMap();
getOutstandingAbstractMethodsHelper(type,collector);
return collector.values();
}
private void getOutstandingAbstractMethodsHelper(ResolvedType type,Map collector) {
if (type==null) return;
if (type!=null && !type.equals(ResolvedType.OBJECT)) {
if (type.getSuperclass()!=null)
getOutstandingAbstractMethodsHelper(type.getSuperclass(),collector);
}
ResolvedMember[] rms = type.getDeclaredMethods();
if (rms!=null) {
for (int i = 0; i < rms.length; i++) {
ResolvedMember member = rms[i];
String key = member.getName()+member.getSignature();
if (member.isAbstract()) {
collector.put(key,member);
} else {
collector.remove(key);
}
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
}
}
}
/**
* Rebuild the XML snip that defines this concrete aspect, for log error purpose
*
* @return string repr.
*/
private String stringify() {
StringBuffer sb = new StringBuffer("<concrete-aspect name='");
sb.append(m_concreteAspect.name);
sb.append("' extends='");
sb.append(m_concreteAspect.extend);
sb.append("'/> in aop.xml");
return sb.toString();
}
private boolean hasPointcutAnnotation(ResolvedMember member) {
AnnotationX[] as = member.getAnnotations();
if (as==null || as.length==0) return false;
for (int i = 0; i < as.length; i++) {
if (as[i].getTypeSignature().equals("Lorg/aspectj/lang/annotation/Pointcut;")) {
return true;
}
}
return false;
}
public String getClassName () {
return m_concreteAspect.name;
}
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
/**
* Build the bytecode for the concrete aspect
*
* @return concrete aspect bytecode
*/
public byte[] getBytes() {
if (!m_isValid) {
throw new RuntimeException("Must validate first");
}
LazyClassGen cg = new LazyClassGen(
m_concreteAspect.name.replace('.', '/'),
(m_parent==null)?"java/lang/Object":m_parent.getName().replace('.', '/'),
null,
Modifier.PUBLIC + Constants.ACC_SUPER,
EMPTY_STRINGS,
m_world
);
AnnotationGen ag = new AnnotationGen(
new ObjectType("org/aspectj/lang/annotation/Aspect"),
Collections.EMPTY_LIST,
true,
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
cg.getConstantPoolGen()
);
cg.addAnnotation(ag.getAnnotation());
if (m_concreteAspect.precedence != null) {
SimpleElementValueGen svg = new SimpleElementValueGen(
ElementValueGen.STRING,
cg.getConstantPoolGen(),
m_concreteAspect.precedence
);
List elems = new ArrayList();
elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPoolGen()));
AnnotationGen agprec = new AnnotationGen(
new ObjectType("org/aspectj/lang/annotation/DeclarePrecedence"),
elems,
true,
cg.getConstantPoolGen()
);
cg.addAnnotation(agprec.getAnnotation());
}
LazyMethodGen init = new LazyMethodGen(
Modifier.PUBLIC,
Type.VOID,
"<init>",
EMPTY_TYPES,
EMPTY_STRINGS,
cg
);
InstructionList cbody = init.getBody();
cbody.append(InstructionConstants.ALOAD_0);
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
cbody.append(cg.getFactory().createInvoke(
(m_parent==null)?"java/lang/Object":m_parent.getName().replace('.', '/'),
"<init>",
Type.VOID,
EMPTY_TYPES,
Constants.INVOKESPECIAL
));
cbody.append(InstructionConstants.RETURN);
cg.addMethodGen(init);
for (Iterator it = m_concreteAspect.pointcuts.iterator(); it.hasNext();) {
Definition.Pointcut abstractPc = (Definition.Pointcut) it.next();
LazyMethodGen mg = new LazyMethodGen(
Modifier.PUBLIC,
Type.VOID,
abstractPc.name,
EMPTY_TYPES,
EMPTY_STRINGS,
cg
);
SimpleElementValueGen svg = new SimpleElementValueGen(
ElementValueGen.STRING,
cg.getConstantPoolGen(),
abstractPc.expression
);
List elems = new ArrayList();
elems.add(new ElementNameValuePairGen("value", svg, cg.getConstantPoolGen()));
AnnotationGen mag = new AnnotationGen(
new ObjectType("org/aspectj/lang/annotation/Pointcut"),
elems,
true,
|
165,148 |
Bug 165148 [ltw] Unnecessary exceptions during concretization of aspects in aop.xml
|
Due to the mechanism used in ConcreteAspectCodeGen I see a lot of unnecessary exceptions created. The problem is rather than looking up a type to confirm it doesn't exist before defining it, the code uses a resolve() to check if it exists and resolve attempts to build it if it isnt there. Because the classloader will never find an aop.xml defined type (the class doesn't exist anywhere on the classpath), a spurious exception is created and sometimes traced (if collecting a trace). I'm going to change the code to do a lookup, that is all that is really necessary.
|
resolved fixed
|
e8d2556
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2006-11-20T13:20:41Z | 2006-11-20T13:40:00Z |
loadtime/src/org/aspectj/weaver/loadtime/ConcreteAspectCodeGen.java
|
cg.getConstantPoolGen()
);
AnnotationX max = new AnnotationX(mag.getAnnotation(), m_world);
mg.addAnnotation(max);
InstructionList body = mg.getBody();
body.append(InstructionConstants.RETURN);
cg.addMethodGen(mg);
}
BcelPerClauseAspectAdder perClauseMunger = new BcelPerClauseAspectAdder(
ResolvedType.forName(m_concreteAspect.name).resolve(m_world),
m_perClause.getKind()
);
perClauseMunger.forceMunge(cg, false);
JavaClass jc = cg.getJavaClass((BcelWorld) m_world);
((BcelWorld) m_world).addSourceObjectType(jc);
return jc.getBytes();
}
/**
* Error reporting
*
* @param message
*/
private void reportError(String message) {
m_world.getMessageHandler().handleMessage(new Message(message, IMessage.ERROR, null, null));
}
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
/* *******************************************************************
* Copyright (c) 2001-2001 Xerox Corporation,
* 2002 Palo Alto Research Center, Incorporated (PARC)
* 2003-2004 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:
* Xerox/PARC initial implementation
* Wes Isberg 2003-2004 changes
* ******************************************************************/
package org.aspectj.tools.ant.taskdefs;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Location;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Copy;
import org.apache.tools.ant.taskdefs.Delete;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.Expand;
import org.apache.tools.ant.taskdefs.Javac;
import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.taskdefs.Mkdir;
import org.apache.tools.ant.taskdefs.PumpStreamHandler;
import org.apache.tools.ant.taskdefs.Zip;
import org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PatternSet;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
import org.apache.tools.ant.types.Reference;
import org.apache.tools.ant.types.ZipFileSet;
import org.apache.tools.ant.util.TaskLogger;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessageHandler;
import org.aspectj.bridge.IMessageHolder;
import org.aspectj.bridge.MessageHandler;
import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.tools.ajc.Main;
import org.aspectj.util.FileUtil;
import org.aspectj.util.LangUtil;
/**
* This runs the AspectJ 1.1 compiler,
* supporting all the command-line options.
* In 1.1.1, ajc copies resources from input jars,
* but you can copy resources from the source directories
* using sourceRootCopyFilter.
* When not forking, things will be copied as needed
* for each iterative compile,
* but when forking things are only copied at the
* completion of a successful compile.
* <p>
* See the development environment guide for
* usage documentation.
*
* @since AspectJ 1.1, Ant 1.5
*/
public class AjcTask extends MatchingTask {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
/*
* This task mainly converts ant specification for ajc,
* verbosely ignoring improper input.
* It also has some special features for non-obvious clients:
* (1) Javac compiler adapter supported in
* <code>setupAjc(AjcTask, Javac, File)</code>
* and
* <code>readArguments(String[])</code>;
* (2) testing is supported by
* (a) permitting the same specification to be re-run
* with added flags (settings once made cannot be
* removed); and
* (b) permitting recycling the task with
* <code>reset()</code> (untested).
*
* The parts that do more than convert ant specs are
* (a) code for forking;
* (b) code for copying resources.
*
* If you maintain/upgrade this task, keep in mind:
* (1) changes to the semantics of ajc (new options, new
* values permitted, etc.) will have to be reflected here.
* (2) the clients:
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
* the iajc ant script, Javac compiler adapter,
* maven clients of iajc, and testing code.
*/
/**
* This method extracts javac arguments to ajc,
* and add arguments to make ajc behave more like javac
* in copying resources.
* <p>
* Pass ajc-specific options using compilerarg sub-element:
* <pre>
* <javac srcdir="src">
* <compilerarg compiler="..." line="-argfile src/args.lst"/>
* <javac>
* </pre>
* Some javac arguments are not supported in this component (yet):
* <pre>
* String memoryInitialSize;
* boolean includeAntRuntime = true;
* boolean includeJavaRuntime = false;
* </pre>
* Other javac arguments are not supported in ajc 1.1:
* <pre>
* boolean optimize;
* String forkedExecutable;
* FacadeTaskHelper facade;
* boolean depend;
* String debugLevel;
* Path compileSourcepath;
* </pre>
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
* @param javac the Javac command to implement (not null)
* @param ajc the AjcTask to adapt (not null)
* @param destDir the File class destination directory (may be null)
* @return null if no error, or String error otherwise
*/
public String setupAjc(Javac javac) {
if (null == javac) {
return "null javac";
}
AjcTask ajc = this;
ajc.setProject(javac.getProject());
ajc.setLocation(javac.getLocation());
ajc.setTaskName("javac-iajc");
ajc.setDebug(javac.getDebug());
ajc.setDeprecation(javac.getDeprecation());
ajc.setFailonerror(javac.getFailonerror());
final boolean fork = javac.isForkedJavac();
ajc.setFork(fork);
if (fork) {
ajc.setMaxmem(javac.getMemoryMaximumSize());
}
ajc.setNowarn(javac.getNowarn());
ajc.setListFileArgs(javac.getListfiles());
ajc.setVerbose(javac.getVerbose());
ajc.setTarget(javac.getTarget());
ajc.setSource(javac.getSource());
ajc.setEncoding(javac.getEncoding());
File javacDestDir = javac.getDestdir();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (null != javacDestDir) {
ajc.setDestdir(javacDestDir);
ajc.setSourceRootCopyFilter("**/CVS/*,**/*.java,**/*.aj");
}
ajc.setBootclasspath(javac.getBootclasspath());
ajc.setExtdirs(javac.getExtdirs());
ajc.setClasspath(javac.getClasspath());
ajc.addFiles(javac.getFileList());
ajc.readArguments(javac.getCurrentCompilerArgs());
return null;
}
/**
* Find aspectjtools.jar on the task or system classpath.
* Accept <code>aspectj{-}tools{...}.jar</code>
* mainly to support build systems using maven-style
* re-naming
* (e.g., <code>aspectj-tools-1.1.0.jar</code>.
* Note that we search the task classpath first,
* though an entry on the system classpath would be loaded first,
* because it seems more correct as the more specific one.
* @return readable File for aspectjtools.jar, or null if not found.
*/
public static File findAspectjtoolsJar() {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
File result = null;
ClassLoader loader = AjcTask.class.getClassLoader();
if (loader instanceof AntClassLoader) {
AntClassLoader taskLoader = (AntClassLoader) loader;
String cp = taskLoader.getClasspath();
String[] cps = LangUtil.splitClasspath(cp);
for (int i = 0; (i < cps.length) && (null == result); i++) {
result = isAspectjtoolsjar(cps[i]);
}
}
if (null == result) {
final Path classpath = Path.systemClasspath;
final String[] paths = classpath.list();
for (int i = 0; (i < paths.length) && (null == result); i++) {
result = isAspectjtoolsjar(paths[i]);
}
}
return (null == result? null : result.getAbsoluteFile());
}
private static File isAspectjtoolsjar(String path) {
if (null == path) {
return null;
}
final String prefix = "aspectj";
final String infix = "tools";
final String altInfix = "-tools";
final String suffix = ".jar";
final int prefixLength = 7;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
final int minLength = 16;
if (!path.endsWith(suffix)) {
return null;
}
int loc = path.lastIndexOf(prefix);
if ((-1 != loc) && ((loc + minLength) <= path.length())) {
String rest = path.substring(loc+prefixLength);
if (-1 != rest.indexOf(File.pathSeparator)) {
return null;
}
if (rest.startsWith(infix)
|| rest.startsWith(altInfix)) {
File result = new File(path);
if (result.canRead() && result.isFile()) {
return result;
}
}
}
return null;
}
/**
* Maximum length (in chars) of command line
* before converting to an argfile when forking
*/
private static final int MAX_COMMANDLINE = 4096;
private static final File DEFAULT_DESTDIR = new File(".") {
public String toString() {
return "(no destination dir specified)";
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
};
private static final String USAGE_SUBSTRING = "AspectJ-specific options";
private static final List VALID_XOPTIONS;
private static final List VALID_WARNINGS;
private static final List VALID_DEBUG;
/**
* -Xlint variants (error, warning, ignore)
* @see org.aspectj.weaver.Lint
*/
private static final List VALID_XLINT;
public static final String COMMAND_EDITOR_NAME
= AjcTask.class.getName() + ".COMMAND_EDITOR";
static final String[] TARGET_INPUTS = new String []
{ "1.1", "1.2", "1.3", "1.4", "1.5" };
static final String[] SOURCE_INPUTS = new String []
{ "1.3", "1.4", "1.5" };
static final String[] COMPLIANCE_INPUTS = new String []
{ "-1.3", "-1.4", "-1.5" };
private static final ICommandEditor COMMAND_EDITOR;
static {
String[] xs = new String[]
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
{ "serializableAspects", "incrementalFile", "lazyTjp",
"reweavable", "reweavable:compress", "notReweavable", "noInline",
"terminateAfterCompilation","hasMember",
"ajruntimetarget:1.2", "ajruntimetarget:1.5",
"addSerialVersionUID"
};
VALID_XOPTIONS = Collections.unmodifiableList(Arrays.asList(xs));
xs = new String[]
{"constructorName", "packageDefaultMethod", "deprecation",
"maskedCatchBlocks", "unusedLocals", "unusedArguments",
"unusedImports", "syntheticAccess", "assertIdentifier", "none" };
VALID_WARNINGS = Collections.unmodifiableList(Arrays.asList(xs));
xs = new String[] {"none", "lines", "vars", "source" };
VALID_DEBUG = Collections.unmodifiableList(Arrays.asList(xs));
xs = new String[] { "error", "warning", "ignore"};
VALID_XLINT = Collections.unmodifiableList(Arrays.asList(xs));
ICommandEditor editor = null;
try {
String editorClassName = System.getProperty(COMMAND_EDITOR_NAME);
if (null != editorClassName) {
ClassLoader cl = AjcTask.class.getClassLoader();
Class editorClass = cl.loadClass(editorClassName);
editor = (ICommandEditor) editorClass.newInstance();
}
} catch (Throwable t) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
System.err.println("Warning: unable to load command editor");
t.printStackTrace(System.err);
}
COMMAND_EDITOR = editor;
}
private boolean verbose;
private boolean listFileArgs;
private boolean failonerror;
private boolean fork;
private String maxMem;
private TaskLogger logger;
protected GuardedCommand cmd;
private Path srcdir;
private Path injars;
private Path inpath;
private Path classpath;
private Path bootclasspath;
private Path forkclasspath;
private Path extdirs;
private Path aspectpath;
private Path argfiles;
private List ignored;
private Path sourceRoots;
private File xweaveDir;
private String xdoneSignal;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
private List adapterFiles;
private String[] adapterArguments;
private IMessageHolder messageHolder;
private ICommandEditor commandEditor;
private boolean copyInjars;
private boolean copyInpath;
private String sourceRootCopyFilter;
private String inpathDirCopyFilter;
private File destDir;
private File outjar;
private boolean outjarFixedup;
/**
* When possibly copying resources to the output jar,
* pass ajc a fake output jar to copy from,
* so we don't change the modification time of the output jar
* when copying injars/inpath into the actual outjar.
*/
private File tmpOutjar;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
private boolean executing;
private Main main;
private boolean executingInOtherVM;
private boolean inIncrementalMode;
private boolean inIncrementalFileMode;
private boolean logCommand;
private CommandlineJava javaCmd = new CommandlineJava();
public AjcTask() {
reset();
}
public void reset() {
adapterArguments = null;
adapterFiles = new ArrayList();
argfiles = null;
executing = false;
aspectpath = null;
bootclasspath = null;
classpath = null;
cmd = new GuardedCommand();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
copyInjars = false;
copyInpath = false;
destDir = DEFAULT_DESTDIR;
executing = false;
executingInOtherVM = false;
extdirs = null;
failonerror = true;
forkclasspath = null;
inIncrementalMode = false;
inIncrementalFileMode = false;
ignored = new ArrayList();
injars = null;
inpath = null;
listFileArgs = false;
maxMem = null;
messageHolder = null;
outjar = null;
sourceRootCopyFilter = null;
inpathDirCopyFilter = null;
sourceRoots = null;
srcdir = null;
tmpOutjar = null;
verbose = false;
xweaveDir = null;
xdoneSignal = null;
logCommand = false;
javaCmd = new CommandlineJava();
}
protected void ignore(String ignored) {
this.ignored.add(ignored + " at " + getLocation());
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
protected String validCommaList(String list, List valid, String label) {
return validCommaList(list, valid, label, valid.size());
}
protected String validCommaList(String list, List valid, String label, int max) {
StringBuffer result = new StringBuffer();
StringTokenizer st = new StringTokenizer(list, ",");
int num = 0;
while (st.hasMoreTokens()) {
String token = st.nextToken().trim();
num++;
if (num > max) {
ignore("too many entries for -"
+ label
+ ": "
+ token);
break;
}
if (!valid.contains(token)) {
ignore("bad commaList entry for -"
+ label
+ ": "
+ token);
} else {
if (0 < result.length()) {
result.append(",");
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
result.append(token);
}
}
return (0 == result.length() ? null : result.toString());
}
public void setIncremental(boolean incremental) {
cmd.addFlag("-incremental", incremental);
inIncrementalMode = incremental;
}
public void setLogCommand(boolean logCommand) {
this.logCommand = logCommand;
}
public void setHelp(boolean help) {
cmd.addFlag("-help", help);
}
public void setVersion(boolean version) {
cmd.addFlag("-version", version);
}
public void setXTerminateAfterCompilation(boolean b) {
cmd.addFlag("-XterminateAfterCompilation", b);
}
public void setXReweavable(boolean reweavable) {
cmd.addFlag("-Xreweavable",reweavable);
}
public void setXJoinpoints(String optionalJoinpoints) {
cmd.addFlag("-Xjoinpoints:"+optionalJoinpoints,true);
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
public void setXNoWeave(boolean b) {
if (logger!=null) logger.warning("the noweave option is no longer required and is being ignored");
}
public void setNoWeave(boolean b) {
if (logger!=null) logger.warning("the noweave option is no longer required and is being ignored");
}
public void setXNotReweavable(boolean notReweavable) {
cmd.addFlag("-XnotReweavable",notReweavable);
}
public void setXaddSerialVersionUID(boolean addUID) {
cmd.addFlag("-XaddSerialVersionUID",addUID);
}
public void setXNoInline(boolean noInline) {
cmd.addFlag("-XnoInline",noInline);
}
public void setShowWeaveInfo(boolean showweaveinfo) {
cmd.addFlag("-showWeaveInfo",showweaveinfo);
}
public void setNowarn(boolean nowarn) {
cmd.addFlag("-nowarn", nowarn);
}
public void setDeprecation(boolean deprecation) {
cmd.addFlag("-deprecation", deprecation);
}
public void setWarn(String warnings) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
warnings = validCommaList(warnings, VALID_WARNINGS, "warn");
cmd.addFlag("-warn:" + warnings, (null != warnings));
}
public void setDebug(boolean debug) {
cmd.addFlag("-g", debug);
}
public void setDebugLevel(String level) {
level = validCommaList(level, VALID_DEBUG, "g");
cmd.addFlag("-g:" + level, (null != level));
}
public void setEmacssym(boolean emacssym) {
cmd.addFlag("-emacssym", emacssym);
}
public void setCrossrefs(boolean on) {
cmd.addFlag("-crossrefs", on);
}
/**
* -Xlint - set default level of -Xlint messages to warning
* (same as </code>-Xlint:warning</code>)
*/
public void setXlintwarnings(boolean xlintwarnings) {
cmd.addFlag("-Xlint", xlintwarnings);
}
/** -Xlint:{error|warning|info} - set default level for -Xlint messages
* @param xlint the String with one of error, warning, ignored
*/
public void setXlint(String xlint) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
xlint = validCommaList(xlint, VALID_XLINT, "Xlint", 1);
cmd.addFlag("-Xlint:" + xlint, (null != xlint));
}
/**
* -Xlintfile {lint.properties} - enable or disable specific forms
* of -Xlint messages based on a lint properties file
* (default is
* <code>org/aspectj/weaver/XLintDefault.properties</code>)
* @param xlintFile the File with lint properties
*/
public void setXlintfile(File xlintFile) {
cmd.addFlagged("-Xlintfile", xlintFile.getAbsolutePath());
}
public void setPreserveAllLocals(boolean preserveAllLocals) {
cmd.addFlag("-preserveAllLocals", preserveAllLocals);
}
public void setNoImportError(boolean noImportError) {
cmd.addFlag("-warn:-unusedImport", noImportError);
}
public void setEncoding(String encoding) {
cmd.addFlagged("-encoding", encoding);
}
public void setLog(File file) {
cmd.addFlagged("-log", file.getAbsolutePath());
}
public void setProceedOnError(boolean proceedOnError) {
cmd.addFlag("-proceedOnError", proceedOnError);
}
public void setVerbose(boolean verbose) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
cmd.addFlag("-verbose", verbose);
this.verbose = verbose;
}
public void setListFileArgs(boolean listFileArgs) {
this.listFileArgs = listFileArgs;
}
public void setReferenceInfo(boolean referenceInfo) {
cmd.addFlag("-referenceInfo", referenceInfo);
}
public void setTime(boolean time) {
cmd.addFlag("-time", time);
}
public void setNoExit(boolean noExit) {
cmd.addFlag("-noExit", noExit);
}
public void setFailonerror(boolean failonerror) {
this.failonerror = failonerror;
}
/**
* @return true if fork was set
*/
public boolean isForked() {
return fork;
}
public void setFork(boolean fork) {
this.fork = fork;
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
public void setMaxmem(String maxMem) {
this.maxMem = maxMem;
}
public Commandline.Argument createJvmarg() {
return this.javaCmd.createVmArgument();
}
public void setTagFile(File file) {
inIncrementalMode = true;
cmd.addFlagged(Main.CommandController.TAG_FILE_OPTION,
file.getAbsolutePath());
inIncrementalFileMode = true;
}
public void setOutjar(File file) {
if (DEFAULT_DESTDIR != destDir) {
String e = "specifying both output jar ("
+ file
+ ") and destination dir ("
+ destDir
+ ")";
throw new BuildException(e);
}
outjar = file;
outjarFixedup = false;
tmpOutjar = null;
}
public void setOutxml(boolean outxml) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
cmd.addFlag("-outxml",outxml);
}
public void setOutxmlfile(String name) {
cmd.addFlagged("-outxmlfile", name);
}
public void setDestdir(File dir) {
if (null != outjar) {
String e = "specifying both output jar ("
+ outjar
+ ") and destination dir ("
+ dir
+ ")";
throw new BuildException(e);
}
cmd.addFlagged("-d", dir.getAbsolutePath());
destDir = dir;
}
/**
* @param input a String in TARGET_INPUTS
*/
public void setTarget(String input) {
String ignore = cmd.addOption("-target", TARGET_INPUTS, input);
if (null != ignore) {
ignore(ignore);
}
}
/**
* Language compliance level.
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
* If not set explicitly, eclipse default holds.
* @param input a String in COMPLIANCE_INPUTS
*/
public void setCompliance(String input) {
String ignore = cmd.addOption(null, COMPLIANCE_INPUTS, input);
if (null != ignore) {
ignore(ignore);
}
}
/**
* Source compliance level.
* If not set explicitly, eclipse default holds.
* @param input a String in SOURCE_INPUTS
*/
public void setSource(String input) {
String ignore = cmd.addOption("-source", SOURCE_INPUTS, input);
if (null != ignore) {
ignore(ignore);
}
}
/**
* Flag to copy all non-.class contents of injars
* to outjar after compile completes.
* Requires both injars and outjar.
* @param doCopy
*/
public void setCopyInjars(boolean doCopy){
ignore("copyInJars");
log("copyInjars not required since 1.1.1.\n", Project.MSG_WARN);
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
/**
* Option to copy all files from
* all source root directories
* except those specified here.
* If this is specified and sourceroots are specified,
* then this will copy all files except
* those specified in the filter pattern.
* Requires sourceroots.
*
* @param filter a String acceptable as an excludes
* filter for an Ant Zip fileset.
*/
public void setSourceRootCopyFilter(String filter){
this.sourceRootCopyFilter = filter;
}
/**
* Option to copy all files from
* all inpath directories
* except the files specified here.
* If this is specified and inpath directories are specified,
* then this will copy all files except
* those specified in the filter pattern.
* Requires inpath.
* If the input does not contain "**\/*.class", then
* this prepends it, to avoid overwriting woven classes
* with unwoven input.
* @param filter a String acceptable as an excludes
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
* filter for an Ant Zip fileset.
*/
public void setInpathDirCopyFilter(String filter){
if (null != filter) {
if (-1 == filter.indexOf("**/*.class")) {
filter = "**/*.class," + filter;
}
}
this.inpathDirCopyFilter = filter;
}
public void setX(String input) {
StringTokenizer tokens = new StringTokenizer(input, ",", false);
while (tokens.hasMoreTokens()) {
String token = tokens.nextToken().trim();
if (1 < token.length()) {
if (VALID_XOPTIONS.contains(token) || token.indexOf("set:")==0 ||
token.indexOf("joinpoints:")==0) {
cmd.addFlag("-X" + token, true);
} else {
ignore("-X" + token);
}
}
}
}
public void setXDoneSignal(String doneSignal) {
this.xdoneSignal = doneSignal;
}
public void setMessageHolder(IMessageHolder holder) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
this.messageHolder = holder;
}
/**
* Setup custom message handling.
* @param className the String fully-qualified-name of a class
* reachable from this object's class loader,
* implementing IMessageHolder, and
* having a public no-argument constructor.
* @throws BuildException if unable to create instance of className
*/
public void setMessageHolderClass(String className) {
try {
Class mclass = Class.forName(className);
IMessageHolder holder = (IMessageHolder) mclass.newInstance();
setMessageHolder(holder);
} catch (Throwable t) {
String m = "unable to instantiate message holder: " + className;
throw new BuildException(m, t);
}
}
public void setCommandEditor(ICommandEditor editor) {
this.commandEditor = editor;
}
/**
* Setup command-line filter.
* To do this staticly, define the environment variable
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
* <code>org.aspectj.tools.ant.taskdefs.AjcTask.COMMAND_EDITOR</code>
* with the <code>className</code> parameter.
* @param className the String fully-qualified-name of a class
* reachable from this object's class loader,
* implementing ICommandEditor, and
* having a public no-argument constructor.
* @throws BuildException if unable to create instance of className
*/
public void setCommandEditorClass(String className) {
try {
Class mclass = Class.forName(className);
setCommandEditor((ICommandEditor) mclass.newInstance());
} catch (Throwable t) {
String m = "unable to instantiate command editor: " + className;
throw new BuildException(m, t);
}
}
/**
* Add path elements to source path and return result.
* Elements are added even if they do not exist.
* @param source the Path to add to - may be null
* @param toAdd the Path to add - may be null
* @return the (never-null) Path that results
*/
protected Path incPath(Path source, Path toAdd) {
if (null == source) {
source = new Path(project);
}
if (null != toAdd) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
source.append(toAdd);
}
return source;
}
public void setSourcerootsref(Reference ref) {
createSourceRoots().setRefid(ref);
}
public void setSourceRoots(Path roots) {
sourceRoots = incPath(sourceRoots, roots);
}
public Path createSourceRoots() {
if (sourceRoots == null) {
sourceRoots = new Path(project);
}
return sourceRoots.createPath();
}
public void setXWeaveDir(File file) {
if ((null != file) && file.isDirectory()
&& file.canRead()) {
xweaveDir = file;
}
}
public void setInjarsref(Reference ref) {
createInjars().setRefid(ref);
}
public void setInpathref(Reference ref) {
createInpath().setRefid(ref);
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
public void setInjars(Path path) {
injars = incPath(injars, path);
}
public void setInpath(Path path) {
inpath = incPath(inpath,path);
}
public Path createInjars() {
if (injars == null) {
injars = new Path(project);
}
return injars.createPath();
}
public Path createInpath() {
if (inpath == null) {
inpath = new Path(project);
}
return inpath.createPath();
}
public void setClasspath(Path path) {
classpath = incPath(classpath, path);
}
public void setClasspathref(Reference classpathref) {
createClasspath().setRefid(classpathref);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
public Path createClasspath() {
if (classpath == null) {
classpath = new Path(project);
}
return classpath.createPath();
}
public void setBootclasspath(Path path) {
bootclasspath = incPath(bootclasspath, path);
}
public void setBootclasspathref(Reference bootclasspathref) {
createBootclasspath().setRefid(bootclasspathref);
}
public Path createBootclasspath() {
if (bootclasspath == null) {
bootclasspath = new Path(project);
}
return bootclasspath.createPath();
}
public void setForkclasspath(Path path) {
forkclasspath = incPath(forkclasspath, path);
}
public void setForkclasspathref(Reference forkclasspathref) {
createForkclasspath().setRefid(forkclasspathref);
}
public Path createForkclasspath() {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (forkclasspath == null) {
forkclasspath = new Path(project);
}
return forkclasspath.createPath();
}
public void setExtdirs(Path path) {
extdirs = incPath(extdirs, path);
}
public void setExtdirsref(Reference ref) {
createExtdirs().setRefid(ref);
}
public Path createExtdirs() {
if (extdirs == null) {
extdirs = new Path(project);
}
return extdirs.createPath();
}
public void setAspectpathref(Reference ref) {
createAspectpath().setRefid(ref);
}
public void setAspectpath(Path path) {
aspectpath = incPath(aspectpath, path);
}
public Path createAspectpath() {
if (aspectpath == null) {
aspectpath = new Path(project);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
return aspectpath.createPath();
}
public void setSrcDir(Path path) {
srcdir = incPath(srcdir, path);
}
public Path createSrc() {
return createSrcdir();
}
public Path createSrcdir() {
if (srcdir == null) {
srcdir = new Path(project);
}
return srcdir.createPath();
}
public boolean isInIncrementalMode() {
return inIncrementalMode;
}
public boolean isInIncrementalFileMode() {
return inIncrementalFileMode;
}
public void setArgfilesref(Reference ref) {
createArgfiles().setRefid(ref);
}
public void setArgfiles(Path path) {
argfiles = incPath(argfiles, path);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
public Path createArgfiles() {
if (argfiles == null) {
argfiles = new Path(project);
}
return argfiles.createPath();
}
/**
* Compile using ajc per settings.
* @exception BuildException if the compilation has problems
* or if there were compiler errors and failonerror is true.
*/
public void execute() throws BuildException {
this.logger = new TaskLogger(this);
if (executing) {
throw new IllegalStateException("already executing");
} else {
executing = true;
}
setupOptions();
verifyOptions();
try {
String[] args = makeCommand();
if (logCommand) {
log("ajc " + Arrays.asList(args));
} else {
logVerbose("ajc " + Arrays.asList(args));
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (!fork) {
executeInSameVM(args);
} else {
executeInOtherVM(args);
}
} catch (BuildException e) {
throw e;
} catch (Throwable x) {
this.logger.error(Main.renderExceptionForUser(x));
throw new BuildException("IGNORE -- See "
+ LangUtil.unqualifiedClassName(x)
+ " rendered to ant logger");
} finally {
executing = false;
if (null != tmpOutjar) {
tmpOutjar.delete();
}
}
}
/**
* Halt processing.
* This tells main in the same vm to quit.
* It fails when running in forked mode.
* @return true if not in forked mode
* and main has quit or been told to quit
*/
public boolean quit() {
if (executingInOtherVM) {
return false;
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
Main me = main;
if (null != me) {
me.quit();
}
return true;
}
String[] makeCommand() {
ArrayList result = new ArrayList();
if (0 < ignored.size()) {
for (Iterator iter = ignored.iterator(); iter.hasNext();) {
logVerbose("ignored: " + iter.next());
}
}
if ((null != outjar) && !outjarFixedup) {
if (copyInjars || copyInpath || (null != sourceRootCopyFilter)
|| (null != inpathDirCopyFilter)) {
String path = outjar.getAbsolutePath();
int len = FileUtil.zipSuffixLength(path);
path = path.substring(0, path.length()-len) + ".tmp.jar";
tmpOutjar = new File(path);
}
if (null == tmpOutjar) {
cmd.addFlagged("-outjar", outjar.getAbsolutePath());
} else {
cmd.addFlagged("-outjar", tmpOutjar.getAbsolutePath());
}
outjarFixedup = true;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
result.addAll(cmd.extractArguments());
addListArgs(result);
String[] command = (String[]) result.toArray(new String[0]);
if (null != commandEditor) {
command = commandEditor.editCommand(command);
} else if (null != COMMAND_EDITOR) {
command = COMMAND_EDITOR.editCommand(command);
}
return command;
}
/**
* Create any pseudo-options required to implement
* some of the macro options
* @throws BuildException if options conflict
*/
protected void setupOptions() {
if (null != xweaveDir) {
if (DEFAULT_DESTDIR != destDir) {
throw new BuildException("weaveDir forces destdir");
}
if (null != outjar) {
throw new BuildException("weaveDir forces outjar");
}
if (null != injars) {
throw new BuildException("weaveDir incompatible with injars now");
}
if (null != inpath) {
throw new BuildException("weaveDir incompatible with inpath now");
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
File injar = zipDirectory(xweaveDir);
setInjars(new Path(getProject(), injar.getAbsolutePath()));
setDestdir(xweaveDir);
}
}
protected File zipDirectory(File dir) {
File tempDir = new File(".");
try {
tempDir = File.createTempFile("AjcTest", ".tmp");
tempDir.mkdirs();
tempDir.deleteOnExit();
} catch (IOException e) {
}
String filename = "AjcTask-"
+ System.currentTimeMillis()
+ ".zip";
File result = new File(filename);
Zip zip = new Zip();
zip.setProject(getProject());
zip.setDestFile(result);
zip.setTaskName(getTaskName() + " - zip");
FileSet fileset = new FileSet();
fileset.setDir(dir);
zip.addFileset(fileset);
zip.execute();
Delete delete = new Delete();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
delete.setProject(getProject());
delete.setTaskName(getTaskName() + " - delete");
delete.setDir(dir);
delete.execute();
Mkdir mkdir = new Mkdir();
mkdir.setProject(getProject());
mkdir.setTaskName(getTaskName() + " - mkdir");
mkdir.setDir(dir);
mkdir.execute();
return result;
}
/**
* @throw BuildException if options conflict
*/
protected void verifyOptions() {
StringBuffer sb = new StringBuffer();
if (fork && isInIncrementalMode() && !isInIncrementalFileMode()) {
sb.append("can fork incremental only using tag file.\n");
}
if (((null != inpathDirCopyFilter) || (null != sourceRootCopyFilter))
&& (null == outjar) && (DEFAULT_DESTDIR == destDir)) {
final String REQ = " requires dest dir or output jar.\n";
if (null == inpathDirCopyFilter) {
sb.append("sourceRootCopyFilter");
} else if (null == sourceRootCopyFilter) {
sb.append("inpathDirCopyFilter");
} else {
sb.append("sourceRootCopyFilter and inpathDirCopyFilter");
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
sb.append(REQ);
}
if (0 < sb.length()) {
throw new BuildException(sb.toString());
}
}
/**
* Run the compile in the same VM by
* loading the compiler (Main),
* setting up any message holders,
* doing the compile,
* and converting abort/failure and error messages
* to BuildException, as appropriate.
* @throws BuildException if abort or failure messages
* or if errors and failonerror.
*
*/
protected void executeInSameVM(String[] args) {
if (null != maxMem) {
log("maxMem ignored unless forked: " + maxMem, Project.MSG_WARN);
}
IMessageHolder holder = messageHolder;
int numPreviousErrors;
if (null == holder) {
MessageHandler mhandler = new MessageHandler(true);
final IMessageHandler delegate;
delegate = new AntMessageHandler(this.logger,this.verbose, false);
mhandler.setInterceptor(delegate);
holder = mhandler;
numPreviousErrors = 0;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
} else {
numPreviousErrors = holder.numMessages(IMessage.ERROR, true);
}
{
Main newmain = new Main();
newmain.setHolder(holder);
newmain.setCompletionRunner(new Runnable() {
public void run() {
doCompletionTasks();
}
});
if (null != main) {
MessageUtil.fail(holder, "still running prior main");
return;
}
main = newmain;
}
main.runMain(args, false);
if (failonerror) {
int errs = holder.numMessages(IMessage.ERROR, false);
errs -= numPreviousErrors;
if (0 < errs) {
String m = errs + " errors";
MessageUtil.print(System.err, holder, "", MessageUtil.MESSAGE_ALL, MessageUtil.PICK_ERROR, true);
throw new BuildException(m);
}
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
{
IMessage[] fails = holder.getMessages(IMessage.FAIL, true);
if (!LangUtil.isEmpty(fails)) {
StringBuffer sb = new StringBuffer();
String prefix = "fail due to ";
int numThrown = 0;
for (int i = 0; i < fails.length; i++) {
String message = fails[i].getMessage();
if (LangUtil.isEmpty(message)) {
message = "<no message>";
} else if (-1 != message.indexOf(USAGE_SUBSTRING)) {
continue;
}
Throwable t = fails[i].getThrown();
if (null != t) {
numThrown++;
sb.append(prefix);
sb.append(LangUtil.unqualifiedClassName(t.getClass()));
String thrownMessage = t.getMessage();
if (!LangUtil.isEmpty(thrownMessage)) {
sb.append(" \"" + thrownMessage + "\"");
}
}
sb.append("\"" + message + "\"");
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
prefix = ", ";
}
if (0 < sb.length()) {
sb.append(" (" + numThrown + " exceptions)");
throw new BuildException(sb.toString());
}
}
}
}
/**
* Execute in a separate VM.
* Differences from normal same-VM execution:
* <ul>
* <li>ignores any message holder {class} set</li>
* <li>No resource-copying between interative runs</li>
* <li>failonerror fails when process interface fails
* to return negative values</li>
* </ul>
* @param args String[] of the complete compiler command to execute
*
* @see DefaultCompilerAdapter#executeExternalCompile(String[], int)
* @throws BuildException if ajc aborts (negative value)
* or if failonerror and there were compile errors.
*/
protected void executeInOtherVM(String[] args) {
javaCmd.setClassname(org.aspectj.tools.ajc.Main.class.getName());
final Path vmClasspath = javaCmd.createClasspath(getProject());
{
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
File aspectjtools = null;
int vmClasspathSize = vmClasspath.size();
if ((null != forkclasspath)
&& (0 != forkclasspath.size())) {
vmClasspath.addExisting(forkclasspath);
} else {
aspectjtools = findAspectjtoolsJar();
if (null != aspectjtools) {
vmClasspath.createPathElement().setLocation(aspectjtools);
}
}
int newVmClasspathSize = vmClasspath.size();
if (vmClasspathSize == newVmClasspathSize) {
String m = "unable to find aspectjtools to fork - ";
if (null != aspectjtools) {
m += "tried " + aspectjtools.toString();
} else if (null != forkclasspath) {
m += "tried " + forkclasspath.toString();
} else {
m += "define forkclasspath or put aspectjtools on classpath";
}
throw new BuildException(m);
}
}
if (null != maxMem) {
javaCmd.setMaxmemory(maxMem);
}
File tempFile = null;
int numArgs = args.length;
args = GuardedCommand.limitTo(args, MAX_COMMANDLINE, getLocation());
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (args.length != numArgs) {
tempFile = new File(args[1]);
}
try {
boolean setMessageHolderOnForking = (this.messageHolder != null);
String[] javaArgs = javaCmd.getCommandline();
String[] both = new String[javaArgs.length + args.length + (setMessageHolderOnForking ? 2 : 0)];
System.arraycopy(javaArgs,0,both,0,javaArgs.length);
System.arraycopy(args,0,both,javaArgs.length,args.length);
if (setMessageHolderOnForking) {
both[both.length - 2] = "-messageHolder";
both[both.length - 1] = this.messageHolder.getClass().getName();
}
if (both[0].endsWith("java.exe")) {
String path = both[0];
path = path.substring(0, path.length()-4);
path = path + "w.exe";
File javaw = new File(path);
if (javaw.canRead() && javaw.isFile()) {
both[0] = path;
}
}
logVerbose("forking " + Arrays.asList(both));
int result = execInOtherVM(both);
if (0 > result) {
throw new BuildException("failure[" + result + "] running ajc");
} else if (failonerror && (0 < result)) {
throw new BuildException("compile errors: " + result);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
doCompletionTasks();
} finally {
if (null != tempFile) {
tempFile.delete();
}
}
}
/**
* Execute in another process using the same JDK
* and the base directory of the project. XXX correct?
* @param args
* @return
*/
protected int execInOtherVM(String[] args) {
try {
Project project = getProject();
PumpStreamHandler handler = new LogStreamHandler(this,
verbose ? Project.MSG_VERBOSE : Project.MSG_INFO,
Project.MSG_WARN);
Execute exe = new Execute(handler);
exe.setAntRun(project);
exe.setWorkingDirectory(project.getBaseDir());
exe.setCommandline(args);
try {
if (executingInOtherVM) {
String s = "already running in other vm?";
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
throw new BuildException(s, location);
}
executingInOtherVM = true;
exe.execute();
} finally {
executingInOtherVM = false;
}
return exe.getExitValue();
} catch (IOException e) {
String m = "Error executing command " + Arrays.asList(args);
throw new BuildException(m, e, location);
}
}
protected static void addFlaggedPath(String flag, Path path, List list) {
if (!LangUtil.isEmpty(flag)
&& ((null != path) && (0 < path.size()))) {
list.add(flag);
list.add(path.toString());
}
}
/**
* Add to list any path or plural arguments.
*/
protected void addListArgs(List list) throws BuildException {
addFlaggedPath("-classpath", classpath, list);
addFlaggedPath("-bootclasspath", bootclasspath, list);
addFlaggedPath("-extdirs", extdirs, list);
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
addFlaggedPath("-aspectpath", aspectpath, list);
addFlaggedPath("-injars", injars, list);
addFlaggedPath("-inpath", inpath, list);
addFlaggedPath("-sourceroots", sourceRoots, list);
if (argfiles != null) {
String[] files = argfiles.list();
for (int i = 0; i < files.length; i++) {
File argfile = project.resolveFile(files[i]);
if (check(argfile, files[i], false, location)) {
list.add("-argfile");
list.add(argfile.getAbsolutePath());
}
}
}
if (srcdir != null) {
String[] dirs = srcdir.list();
for (int i = 0; i < dirs.length; i++) {
File dir = project.resolveFile(dirs[i]);
check(dir, dirs[i], true, location);
String[] files = getDirectoryScanner(dir).getIncludedFiles();
for (int j = 0; j < files.length; j++) {
File file = new File(dir, files[j]);
if (FileUtil.hasSourceSuffix(file)) {
list.add(file.getAbsolutePath());
}
}
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
if (0 < adapterFiles.size()) {
for (Iterator iter = adapterFiles.iterator(); iter.hasNext();) {
File file = (File) iter.next();
if (file.canRead() && FileUtil.hasSourceSuffix(file)) {
list.add(file.getAbsolutePath());
} else {
this.logger.warning("skipping file: " + file);
}
}
}
}
/**
* Throw BuildException unless file is valid.
* @param file the File to check
* @param name the symbolic name to print on error
* @param isDir if true, verify file is a directory
* @param loc the Location used to create sensible BuildException
* @return
* @throws BuildException unless file valid
*/
protected final boolean check(File file, String name,
boolean isDir, Location loc) {
loc = loc != null ? loc : location;
if (file == null) {
throw new BuildException(name + " is null!", loc);
}
if (!file.exists()) {
throw new BuildException(file + " doesn't exist!", loc);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (isDir ^ file.isDirectory()) {
String e = file + " should" + (isDir ? "" : "n't") +
" be a directory!";
throw new BuildException(e, loc);
}
return true;
}
/**
* Called when compile or incremental compile is completing,
* this completes the output jar or directory
* by copying resources if requested.
* Note: this is a callback run synchronously by the compiler.
* That means exceptions thrown here are caught by Main.run(..)
* and passed to the message handler.
*/
protected void doCompletionTasks() {
if (!executing) {
throw new IllegalStateException("should be executing");
}
if (null != outjar) {
completeOutjar();
} else {
completeDestdir();
}
if (null != xdoneSignal) {
MessageUtil.info(messageHolder, xdoneSignal);
}
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
/**
* Complete the destination directory
* by copying resources from the source root directories
* (if the filter is specified)
* and non-.class files from the input jars
* (if XCopyInjars is enabled).
*/
private void completeDestdir() {
if (!copyInjars && (null == sourceRootCopyFilter)
&& (null == inpathDirCopyFilter)) {
return;
} else if ((destDir == DEFAULT_DESTDIR)
|| !destDir.canWrite()) {
String s = "unable to copy resources to destDir: " + destDir;
throw new BuildException(s);
}
final Project project = getProject();
if (copyInjars) {
if (null != inpath) {
log("copyInjars does not support inpath.\n", Project.MSG_WARN);
}
String taskName = getTaskName() + " - unzip";
String[] paths = injars.list();
if (!LangUtil.isEmpty(paths)) {
PatternSet patternSet = new PatternSet();
patternSet.setProject(project);
patternSet.setIncludes("**/*");
patternSet.setExcludes("**/*.class");
for (int i = 0; i < paths.length; i++) {
Expand unzip = new Expand();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
unzip.setProject(project);
unzip.setTaskName(taskName);
unzip.setDest(destDir);
unzip.setSrc(new File(paths[i]));
unzip.addPatternset(patternSet);
unzip.execute();
}
}
}
if ((null != sourceRootCopyFilter) && (null != sourceRoots)) {
String[] paths = sourceRoots.list();
if (!LangUtil.isEmpty(paths)) {
Copy copy = new Copy();
copy.setProject(project);
copy.setTodir(destDir);
for (int i = 0; i < paths.length; i++) {
FileSet fileSet = new FileSet();
fileSet.setDir(new File(paths[i]));
fileSet.setIncludes("**/*");
fileSet.setExcludes(sourceRootCopyFilter);
copy.addFileset(fileSet);
}
copy.execute();
}
}
if ((null != inpathDirCopyFilter) && (null != inpath)) {
String[] paths = inpath.list();
if (!LangUtil.isEmpty(paths)) {
Copy copy = new Copy();
copy.setProject(project);
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
copy.setTodir(destDir);
boolean gotDir = false;
for (int i = 0; i < paths.length; i++) {
File inpathDir = new File(paths[i]);
if (inpathDir.isDirectory() && inpathDir.canRead()) {
if (!gotDir) {
gotDir = true;
}
FileSet fileSet = new FileSet();
fileSet.setDir(inpathDir);
fileSet.setIncludes("**/*");
fileSet.setExcludes(inpathDirCopyFilter);
copy.addFileset(fileSet);
}
}
if (gotDir) {
copy.execute();
}
}
}
}
/**
* Complete the output jar
* by copying resources from the source root directories
* if the filter is specified.
* and non-.class files from the input jars if enabled.
*/
private void completeOutjar() {
if (((null == tmpOutjar) || !tmpOutjar.canRead())
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
|| (!copyInjars && (null == sourceRootCopyFilter)
&& (null == inpathDirCopyFilter))) {
return;
}
Zip zip = new Zip();
Project project = getProject();
zip.setProject(project);
zip.setTaskName(getTaskName() + " - zip");
zip.setDestFile(outjar);
ZipFileSet zipfileset = new ZipFileSet();
zipfileset.setProject(project);
zipfileset.setSrc(tmpOutjar);
zipfileset.setIncludes("**/*.class");
zip.addZipfileset(zipfileset);
if (copyInjars) {
String[] paths = injars.list();
if (!LangUtil.isEmpty(paths)) {
for (int i = 0; i < paths.length; i++) {
File jarFile = new File(paths[i]);
zipfileset = new ZipFileSet();
zipfileset.setProject(project);
zipfileset.setSrc(jarFile);
zipfileset.setIncludes("**/*");
zipfileset.setExcludes("**/*.class");
zip.addZipfileset(zipfileset);
}
}
}
if ((null != sourceRootCopyFilter) && (null != sourceRoots)) {
String[] paths = sourceRoots.list();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
if (!LangUtil.isEmpty(paths)) {
for (int i = 0; i < paths.length; i++) {
File srcRoot = new File(paths[i]);
FileSet fileset = new FileSet();
fileset.setProject(project);
fileset.setDir(srcRoot);
fileset.setIncludes("**/*");
fileset.setExcludes(sourceRootCopyFilter);
zip.addFileset(fileset);
}
}
}
if ((null != inpathDirCopyFilter) && (null != inpath)) {
String[] paths = inpath.list();
if (!LangUtil.isEmpty(paths)) {
for (int i = 0; i < paths.length; i++) {
File inpathDir = new File(paths[i]);
if (inpathDir.isDirectory() && inpathDir.canRead()) {
FileSet fileset = new FileSet();
fileset.setProject(project);
fileset.setDir(inpathDir);
fileset.setIncludes("**/*");
fileset.setExcludes(inpathDirCopyFilter);
zip.addFileset(fileset);
}
}
}
}
zip.execute();
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
/**
* Add specified source files.
*/
void addFiles(File[] paths) {
for (int i = 0; i < paths.length; i++) {
addFile(paths[i]);
}
}
/**
* Add specified source file.
*/
void addFile(File path) {
if (null != path) {
adapterFiles.add(path);
}
}
/**
* Read arguments in as if from a command line,
* mainly to support compiler adapter compilerarg subelement.
*
* @param args the String[] of arguments to read
*/
public void readArguments(String[] args) {
if ((null == args) || (0 == args.length)) {
return;
}
class Args {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
final String[] args;
int index = 0;
Args(String[] args) {
this.args = args;
}
boolean hasNext() {
return index < args.length;
}
String next() {
String err = null;
if (!hasNext()) {
err = "need arg for flag " + args[args.length-1];
} else {
String s = args[index++];
if (null == s) {
err = "null value";
} else {
s = s.trim();
if (0 == s.trim().length()) {
err = "no value";
} else {
return s;
}
}
}
err += " at [" + index + "] of " + Arrays.asList(args);
throw new BuildException(err);
}
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
Args in = new Args(args);
String flag;
while (in.hasNext()) {
flag = in.next();
if ("-1.3".equals(flag)) {
setCompliance(flag);
} else if ("-1.4".equals(flag)) {
setCompliance(flag);
} else if ("-1.5".equals(flag)) {
setCompliance("1.5");
} else if ("-argfile".equals(flag)) {
setArgfiles(new Path(project, in.next()));
} else if ("-aspectpath".equals(flag)) {
setAspectpath(new Path(project, in.next()));
} else if ("-classpath".equals(flag)) {
setClasspath(new Path(project, in.next()));
} else if ("-extdirs".equals(flag)) {
setExtdirs(new Path(project, in.next()));
} else if ("-Xcopyinjars".equals(flag)) {
setCopyInjars(true);
} else if ("-g".equals(flag)) {
setDebug(true);
} else if (flag.startsWith("-g:")) {
setDebugLevel(flag.substring(2));
} else if ("-deprecation".equals(flag)) {
setDeprecation(true);
} else if ("-d".equals(flag)) {
setDestdir(new File(in.next()));
} else if ("-crossrefs".equals(flag)) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
setCrossrefs(true);
} else if ("-emacssym".equals(flag)) {
setEmacssym(true);
} else if ("-encoding".equals(flag)) {
setEncoding(in.next());
} else if ("-Xfailonerror".equals(flag)) {
setFailonerror(true);
} else if ("-fork".equals(flag)) {
setFork(true);
} else if ("-forkclasspath".equals(flag)) {
setForkclasspath(new Path(project, in.next()));
} else if ("-help".equals(flag)) {
setHelp(true);
} else if ("-incremental".equals(flag)) {
setIncremental(true);
} else if ("-injars".equals(flag)) {
setInjars(new Path(project, in.next()));
} else if ("-inpath".equals(flag)) {
setInpath(new Path(project,in.next()));
} else if ("-Xlistfileargs".equals(flag)) {
setListFileArgs(true);
} else if ("-Xmaxmem".equals(flag)) {
setMaxmem(in.next());
} else if ("-Xmessageholderclass".equals(flag)) {
setMessageHolderClass(in.next());
} else if ("-noexit".equals(flag)) {
setNoExit(true);
} else if ("-noimport".equals(flag)) {
setNoExit(true);
} else if ("-noExit".equals(flag)) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
setNoExit(true);
} else if ("-noImportError".equals(flag)) {
setNoImportError(true);
} else if ("-noWarn".equals(flag)) {
setNowarn(true);
} else if ("-noexit".equals(flag)) {
setNoExit(true);
} else if ("-outjar".equals(flag)) {
setOutjar(new File(in.next()));
} else if ("-outxml".equals(flag)) {
setOutxml(true);
} else if ("-outxmlfile".equals(flag)) {
setOutxmlfile(in.next());
} else if ("-preserveAllLocals".equals(flag)) {
setPreserveAllLocals(true);
} else if ("-proceedOnError".equals(flag)) {
setProceedOnError(true);
} else if ("-referenceInfo".equals(flag)) {
setReferenceInfo(true);
} else if ("-source".equals(flag)) {
setSource(in.next());
} else if ("-Xsourcerootcopyfilter".equals(flag)) {
setSourceRootCopyFilter(in.next());
} else if ("-sourceroots".equals(flag)) {
setSourceRoots(new Path(project, in.next()));
} else if ("-Xsrcdir".equals(flag)) {
setSrcDir(new Path(project, in.next()));
} else if ("-Xtagfile".equals(flag)) {
setTagFile(new File(in.next()));
} else if ("-target".equals(flag)) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
setTarget(in.next());
} else if ("-time".equals(flag)) {
setTime(true);
} else if ("-time".equals(flag)) {
setTime(true);
} else if ("-verbose".equals(flag)) {
setVerbose(true);
} else if ("-showWeaveInfo".equals(flag)) {
setShowWeaveInfo(true);
} else if ("-version".equals(flag)) {
setVersion(true);
} else if ("-warn".equals(flag)) {
setWarn(in.next());
} else if (flag.startsWith("-warn:")) {
setWarn(flag.substring(6));
} else if ("-Xlint".equals(flag)) {
setXlintwarnings(true);
} else if (flag.startsWith("-Xlint:")) {
setXlint(flag.substring(7));
} else if ("-Xlintfile".equals(flag)) {
setXlintfile(new File(in.next()));
} else if ("-XterminateAfterCompilation".equals(flag)) {
setXTerminateAfterCompilation(true);
} else if ("-Xreweavable".equals(flag)) {
setXReweavable(true);
} else if ("-XnotReweavable".equals(flag)) {
setXNotReweavable(true);
} else if (flag.startsWith("@")) {
File file = new File(flag.substring(1));
if (file.canRead()) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
setArgfiles(new Path(project, file.getPath()));
} else {
ignore(flag);
}
} else {
File file = new File(flag);
if (file.isFile()
&& file.canRead()
&& FileUtil.hasSourceSuffix(file)) {
addFile(file);
} else {
ignore(flag);
}
}
}
}
protected void logVerbose(String text) {
if (this.verbose) {
this.logger.info(text);
} else {
this.logger.verbose(text);
}
}
/**
* Commandline wrapper that
* only permits addition of non-empty values
* and converts to argfile form if necessary.
*/
public static class GuardedCommand {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
Commandline command;
static boolean isEmpty(String s) {
return ((null == s) || (0 == s.trim().length()));
}
GuardedCommand() {
command = new Commandline();
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
void addFlag(String flag, boolean doAdd) {
if (doAdd && !isEmpty(flag)) {
command.createArgument().setValue(flag);
}
}
String addOption(String prefix, String[] validOptions, String input) {
if (isEmpty(input)) {
return null;
}
for (int i = 0; i < validOptions.length; i++) {
if (input.equals(validOptions[i])) {
if (isEmpty(prefix)) {
addFlag(input, true);
} else {
addFlagged(prefix, input);
}
return null;
}
}
return (null == prefix ? input : prefix + " " + input);
}
void addFlagged(String flag, String argument) {
if (!isEmpty(flag) && !isEmpty(argument)) {
command.addArguments(new String[] {flag, argument});
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
}
List extractArguments() {
ArrayList result = new ArrayList();
String[] cmds = command.getArguments();
if (!LangUtil.isEmpty(cmds)) {
result.addAll(Arrays.asList(cmds));
}
return result;
}
/**
* Adjust args for size if necessary by creating
* an argument file, which should be deleted by the client
* after the compiler run has completed.
* @param max the int maximum length of the command line (in char)
* @return the temp File for the arguments (if generated),
* for deletion when done.
* @throws IllegalArgumentException if max is negative
*/
static String[] limitTo(String[] args, int max,
Location location) {
if (max < 0) {
throw new IllegalArgumentException("negative max: " + max);
}
int size = 0;
for (int i = 0; (i < args.length) && (size < max); i++) {
size += 1 + (null == args[i] ? 0 : args[i].length());
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
}
if (size <= max) {
return args;
}
File tmpFile = null;
PrintWriter out = null;
try {
String userDirName = System.getProperty("user.dir");
File userDir = new File(userDirName);
tmpFile = File.createTempFile("argfile", "", userDir);
out = new PrintWriter(new FileWriter(tmpFile));
for (int i = 0; i < args.length; i++) {
out.println(args[i]);
}
out.flush();
return new String[] {"-argfile", tmpFile.getAbsolutePath()};
} catch (IOException e) {
throw new BuildException("Error creating temporary file",
e, location);
} finally {
if (out != null) {
try {out.close();} catch (Throwable t) {}
}
}
}
}
private static class AntMessageHandler implements IMessageHandler {
private TaskLogger logger;
private final boolean taskLevelVerbose;
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
private final boolean handledMessage;
public AntMessageHandler(TaskLogger logger, boolean taskVerbose, boolean handledMessage) {
this.logger = logger;
this.taskLevelVerbose = taskVerbose;
this.handledMessage = handledMessage;
}
/* (non-Javadoc)
* @see org.aspectj.bridge.IMessageHandler#handleMessage(org.aspectj.bridge.IMessage)
*/
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();
String messageText = message.toString();
if (messageKind == IMessage.ABORT) {
this.logger.error(messageText);
} else if (messageKind == IMessage.DEBUG) {
this.logger.debug(messageText);
} else if (messageKind == IMessage.ERROR) {
this.logger.error(messageText);
} else if (messageKind == IMessage.FAIL){
this.logger.error(messageText);
} else if (messageKind == IMessage.INFO) {
if (this.taskLevelVerbose) {
this.logger.info(messageText);
}
else {
this.logger.verbose(messageText);
}
} else if (messageKind == IMessage.WARNING) {
|
170,102 |
Bug 170102 iajc Ant task doesn't support all warn options
|
The iajc Ant task currently supports only a few of the options provided by the ajc compiler. It would be nice if it could support them all so that builds done using the Ant task generate the same errors/warnings as the ones done within the Eclipse IDE.
|
resolved fixed
|
5336603
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-01-11T08:43:18Z | 2007-01-10T17:26:40Z |
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
|
this.logger.warning(messageText);
} else if (messageKind == IMessage.WEAVEINFO) {
this.logger.info(messageText);
} else if (messageKind == IMessage.TASKTAG) {
} else {
throw new BuildException("Unknown message kind from AspectJ compiler: " + messageKind.toString());
}
return handledMessage;
}
/* (non-Javadoc)
* @see org.aspectj.bridge.IMessageHandler#isIgnoring(org.aspectj.bridge.IMessage.Kind)
*/
public boolean isIgnoring(Kind kind) {
return false;
}
/* (non-Javadoc)
* @see org.aspectj.bridge.IMessageHandler#dontIgnore(org.aspectj.bridge.IMessage.Kind)
*/
public void dontIgnore(Kind kind) {
}
/* (non-Javadoc)
* @see org.aspectj.bridge.IMessageHandler#ignore(org.aspectj.bridge.IMessage.Kind)
*/
public void ignore(Kind kind) {
}
}
}
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.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
*
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
* Contributors:
* PARC initial implementation
* ******************************************************************/
package org.aspectj.ajdt.internal.compiler.problem;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.List;
import org.aspectj.ajdt.internal.compiler.ast.AspectDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.PointcutDeclaration;
import org.aspectj.ajdt.internal.compiler.ast.Proceed;
import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.compiler.lookup.InterTypeMethodBinding;
import org.aspectj.ajdt.internal.compiler.lookup.PrivilegedFieldBinding;
import org.aspectj.bridge.context.CompilationAndWeavingContext;
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.CompilationResult;
import org.aspectj.org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
import org.aspectj.org.eclipse.jdt.internal.compiler.IProblemFactory;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Argument;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
import org.aspectj.org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TagBits;
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
import org.aspectj.util.FuzzyBoolean;
import org.aspectj.weaver.AjcMemberMaker;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.ResolvedMember;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.Shadow;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.patterns.DeclareAnnotation;
import org.aspectj.weaver.patterns.DeclareParents;
import org.aspectj.weaver.patterns.DeclareSoft;
import org.aspectj.weaver.patterns.TypePattern;
/**
* Extends problem reporter to support compiler-side implementation of declare soft.
* Also overrides error reporting for the need to implement abstract methods to
* account for inter-type declarations and pointcut declarations. This second
* job might be better done directly in the SourceTypeBinding/ClassScope classes.
*
* @author Jim Hugunin
*/
public class AjProblemReporter extends ProblemReporter {
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
private static final boolean DUMP_STACK = false;
public EclipseFactory factory;
public AjProblemReporter(
IErrorHandlingPolicy policy,
CompilerOptions options,
IProblemFactory problemFactory) {
super(policy, options, problemFactory);
}
public void unhandledException(
TypeBinding exceptionType,
ASTNode location)
{
if (!factory.getWorld().getDeclareSoft().isEmpty()) {
Shadow callSite = factory.makeShadow(location, referenceContext);
Shadow enclosingExec = factory.makeShadow(referenceContext);
if ((callSite == null) && (enclosingExec.getKind() == Shadow.ConstructorExecution)
&& (location instanceof ExplicitConstructorCall)) {
super.unhandledException(exceptionType, location);
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
return;
}
for (Iterator i = factory.getWorld().getDeclareSoft().iterator(); i.hasNext(); ) {
DeclareSoft d = (DeclareSoft)i.next();
ResolvedType throwException = factory.fromEclipse((ReferenceBinding)exceptionType);
FuzzyBoolean isExceptionTypeOrSubtype =
d.getException().matchesInstanceof(throwException);
if (!isExceptionTypeOrSubtype.alwaysTrue() ) continue;
if (callSite != null) {
FuzzyBoolean match = d.getPointcut().match(callSite);
if (match.alwaysTrue()) {
return;
} else if (!match.alwaysFalse()) {
}
}
if (enclosingExec != null) {
FuzzyBoolean match = d.getPointcut().match(enclosingExec);
if (match.alwaysTrue()) {
return;
} else if (!match.alwaysFalse()) {
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
}
}
}
}
if (location instanceof Proceed) {
return;
}
super.unhandledException(exceptionType, location);
}
private boolean isPointcutDeclaration(MethodBinding binding) {
return CharOperation.prefixEquals(PointcutDeclaration.mangledPrefix, binding.selector);
}
private boolean isIntertypeDeclaration(MethodBinding binding) {
return (binding instanceof InterTypeMethodBinding);
}
public void abstractMethodCannotBeOverridden(
SourceTypeBinding type,
MethodBinding concreteMethod)
{
if (isPointcutDeclaration(concreteMethod)) {
return;
}
super.abstractMethodCannotBeOverridden(type, concreteMethod);
}
public void inheritedMethodReducesVisibility(SourceTypeBinding type, MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
ResolvedType onTypeX = null;
if (!type.isAnonymousType()) {
onTypeX = factory.fromEclipse(type);
} else {
onTypeX = factory.fromEclipse(type.superclass());
}
for (Iterator i = onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();
if (!Modifier.isAbstract(sig.getModifiers())) {
if (ResolvedType
.matches(
AjcMemberMaker.interMethod(
sig,
m.getAspectType(),
sig.getDeclaringType().resolve(factory.getWorld()).isInterface()),
factory.makeResolvedMember(concreteMethod))) {
return;
}
}
}
super.inheritedMethodReducesVisibility(type,concreteMethod,abstractMethods);
}
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
public void staticAndInstanceConflict(MethodBinding currentMethod, MethodBinding inheritedMethod) {
if (currentMethod instanceof InterTypeMethodBinding) return;
if (inheritedMethod instanceof InterTypeMethodBinding) return;
super.staticAndInstanceConflict(currentMethod, inheritedMethod);
}
public void abstractMethodMustBeImplemented(
SourceTypeBinding type,
MethodBinding abstractMethod)
{
if (isPointcutDeclaration(abstractMethod)) return;
if (isIntertypeDeclaration(abstractMethod)) return;
if (CharOperation.prefixEquals("ajc$interField".toCharArray(), abstractMethod.selector)) {
return;
}
ResolvedType onTypeX = null;
if (!type.isAnonymousType()) {
onTypeX = factory.fromEclipse(type);
} else {
|
171,667 |
Bug 171667 When ordering a Clean with Build Automatico I receive the error below.
|
When executing an Clean Project in Eclipse with Automatic Building I receive the error below. line from the top stack, e.g. "SomeFile.jara:243" java.lang.NullPointerException at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:380) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:153) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDe ... pter.java:107) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NullPointerException thrown: null
|
resolved fixed
|
4177bed
|
AspectJ
|
https://github.com/eclipse/org.aspectj
|
eclipse/org.aspectj
|
java
| null | null | null | 2007-02-16T10:02:27Z | 2007-01-25T15:46:40Z |
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/problem/AjProblemReporter.java
|
onTypeX = factory.fromEclipse(type.superclass());
}
for (Iterator i = onTypeX.getInterTypeMungersIncludingSupers().iterator(); i.hasNext(); ) {
ConcreteTypeMunger m = (ConcreteTypeMunger)i.next();
ResolvedMember sig = m.getSignature();
if (!Modifier.isAbstract(sig.getModifiers())) {
if (ResolvedType
.matches(
AjcMemberMaker.interMethod(
sig,
m.getAspectType(),
sig.getDeclaringType().resolve(factory.getWorld()).isInterface()),
factory.makeResolvedMember(abstractMethod))) {
return;
}
}
}
super.abstractMethodMustBeImplemented(type, abstractMethod);
}
/* (non-Javadoc)
* @see org.aspectj.org.eclipse.jdt.internal.compiler.problem.ProblemReporter#disallowedTargetForAnnotation(org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation)
*/
public void disallowedTargetForAnnotation(Annotation annotation) {
if (annotation.recipient instanceof MethodBinding) {
MethodBinding binding = (MethodBinding) annotation.recipient;
String name = new String(binding.selector);
if (name.startsWith("ajc$")) {
long metaTagBits = annotation.resolvedType.getAnnotationTagBits();
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.