[jboss-cvs] JBossAS SVN: r94367 - in projects/microcontainer/branches/Branch_2_0/dependency: src/main and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Oct 5 09:45:57 EDT 2009
Author: kabir.khan at jboss.com
Date: 2009-10-05 09:45:56 -0400 (Mon, 05 Oct 2009)
New Revision: 94367
Added:
projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/
projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/
projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml
Removed:
projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/
projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml
Modified:
projects/microcontainer/branches/Branch_2_0/dependency/pom.xml
projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/StateStatistics.java
Log:
findbugs fixes and exclude file
Modified: projects/microcontainer/branches/Branch_2_0/dependency/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/pom.xml 2009-10-05 12:58:28 UTC (rev 94366)
+++ projects/microcontainer/branches/Branch_2_0/dependency/pom.xml 2009-10-05 13:45:56 UTC (rev 94367)
@@ -38,6 +38,16 @@
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.0.1</version>
+ <configuration>
+ <!-- No way to get resource directory using properties http://jira.codehaus.org/browse/MNG-3638 -->
+ <excludeFilterFile>${project.build.sourceDirectory}/../resources/findbugs/exclude.xml</excludeFilterFile>
+ <debug>true</debug>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified: projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java 2009-10-05 12:58:28 UTC (rev 94366)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java 2009-10-05 13:45:56 UTC (rev 94367)
@@ -104,7 +104,7 @@
private boolean collectStats = false;
/** The install stats */
- private StateStatistics installStats = null;
+ private volatile StateStatistics installStats = null;
/**
* Create an abstract controller
@@ -252,9 +252,12 @@
public String listStateTimes(boolean details)
{
- if (installStats == null)
- return "No statistics available";
- return installStats.listTimes(details);
+ synchronized (this)
+ {
+ if (installStats == null)
+ return "No statistics available";
+ return installStats.listTimes(details);
+ }
}
public void addState(ControllerState state, ControllerState before)
@@ -586,7 +589,7 @@
{
Map<ControllerState, ControllerContextAction> map = createAliasActions();
ControllerContextActions actions = new AbstractControllerContextActions(map);
- AliasControllerContext context = new InnerAliasControllerContext(alias, original, actions);
+ AliasControllerContext context = new InnerAliasControllerContext(alias, getId(), original, actions);
preAliasInstall(context);
install(context);
// is alias in error
@@ -1886,11 +1889,11 @@
// --- alias dependency
- private class InnerAliasControllerContext extends AbstractAliasControllerContext
+ private static class InnerAliasControllerContext extends AbstractAliasControllerContext
{
- private InnerAliasControllerContext(Object alias, Object original, ControllerContextActions actions)
+ private InnerAliasControllerContext(Object alias, String id, Object original, ControllerContextActions actions)
{
- super(alias, getId(), original, actions);
+ super(alias, id, original, actions);
}
}
Modified: projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/StateStatistics.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/StateStatistics.java 2009-10-05 12:58:28 UTC (rev 94366)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/main/java/org/jboss/dependency/plugins/StateStatistics.java 2009-10-05 13:45:56 UTC (rev 94367)
@@ -62,7 +62,7 @@
* @param details whether to show details
* @return the times
*/
- public String listTimes(boolean details)
+ public synchronized String listTimes(boolean details)
{
List<StateStatistic> stats = new ArrayList<StateStatistic>(states.values());
Collections.sort(stats);
Copied: projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources (from rev 94346, projects/kernel/trunk/dependency/src/main/resources)
Copied: projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs (from rev 94346, projects/kernel/trunk/dependency/src/main/resources/findbugs)
Deleted: projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml
===================================================================
--- projects/kernel/trunk/dependency/src/main/resources/findbugs/exclude.xml 2009-10-05 09:58:07 UTC (rev 94346)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml 2009-10-05 13:45:56 UTC (rev 94367)
@@ -1,33 +0,0 @@
-<FindBugsFilter>
- <!-- The non-serializable Map field it complains about is a Collections.singletonMap which is serializable -->
- <Match>
- <Class name="org.jboss.dependency.plugins.graph.ScopeKeySearchInfo"/>
- <Bug pattern="SE_BAD_FIELD"/>
- </Match>
- <!-- The underlyingController field uninitialised in the constructor is intended to be set by a setter -->
- <Match>
- <Class name="org.jboss.dependency.plugins.ScopedController"/>
- <Field name="underlyingController"/>
- <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
- </Match>
- <!-- Ignore dead local variable storage in the tests -->
- <Match>
- <Class name="~org\.jboss\.test\.dependency\.controller\.test.*"/>
- <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
- </Match>
- <!-- Has an explicit equals method, the hash code method is implemented via JBossObject + getHashCode() -->
- <Match>
- <Class name="org.jboss.dependency.spi.Cardinality"/>
- <Bug pattern="HE_EQUALS_NO_HASHCODE" />
- </Match>
- <!-- Has an explicit equals method, the hash code method is implemented via JBossObject + getHashCode() -->
- <Match>
- <Class name="org.jboss.dependency.spi.ControllerState"/>
- <Bug pattern="HE_EQUALS_NO_HASHCODE" />
- </Match>
- <!-- We have a compareTo method, but no equals() - not relevant in this case -->
- <Match>
- <Class name="org.jboss.dependency.plugins.BasicStatistic"/>
- <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
- </Match>
-</FindBugsFilter>
\ No newline at end of file
Copied: projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml (from rev 94346, projects/kernel/trunk/dependency/src/main/resources/findbugs/exclude.xml)
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml (rev 0)
+++ projects/microcontainer/branches/Branch_2_0/dependency/src/main/resources/findbugs/exclude.xml 2009-10-05 13:45:56 UTC (rev 94367)
@@ -0,0 +1,33 @@
+<FindBugsFilter>
+ <!-- The non-serializable Map field it complains about is a Collections.singletonMap which is serializable -->
+ <Match>
+ <Class name="org.jboss.dependency.plugins.graph.ScopeKeySearchInfo"/>
+ <Bug pattern="SE_BAD_FIELD"/>
+ </Match>
+ <!-- The underlyingController field uninitialised in the constructor is intended to be set by a setter -->
+ <Match>
+ <Class name="org.jboss.dependency.plugins.ScopedController"/>
+ <Field name="underlyingController"/>
+ <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
+ </Match>
+ <!-- Ignore dead local variable storage in the tests -->
+ <Match>
+ <Class name="~org\.jboss\.test\.dependency\.controller\.test.*"/>
+ <Bug pattern="DLS_DEAD_LOCAL_STORE"/>
+ </Match>
+ <!-- Has an explicit equals method, the hash code method is implemented via JBossObject + getHashCode() -->
+ <Match>
+ <Class name="org.jboss.dependency.spi.Cardinality"/>
+ <Bug pattern="HE_EQUALS_NO_HASHCODE" />
+ </Match>
+ <!-- Has an explicit equals method, the hash code method is implemented via JBossObject + getHashCode() -->
+ <Match>
+ <Class name="org.jboss.dependency.spi.ControllerState"/>
+ <Bug pattern="HE_EQUALS_NO_HASHCODE" />
+ </Match>
+ <!-- We have a compareTo method, but no equals() - not relevant in this case -->
+ <Match>
+ <Class name="org.jboss.dependency.plugins.BasicStatistic"/>
+ <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS" />
+ </Match>
+</FindBugsFilter>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list