commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosu...@apache.org
Subject svn commit: r410143 - in /jakarta/commons/proper/attributes/trunk: api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java build.xml compiler/project.xml project.properties project.xml site/xdocs/changelog.xml site/xdocs/index.xml
Date Mon, 29 May 2006 19:45:25 GMT
Author: leosutic
Date: Mon May 29 12:45:24 2006
New Revision: 410143

URL: http://svn.apache.org/viewvc?rev=410143&view=rev
Log: (empty)

Modified:
    jakarta/commons/proper/attributes/trunk/api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java
    jakarta/commons/proper/attributes/trunk/build.xml
    jakarta/commons/proper/attributes/trunk/compiler/project.xml
    jakarta/commons/proper/attributes/trunk/project.properties
    jakarta/commons/proper/attributes/trunk/project.xml
    jakarta/commons/proper/attributes/trunk/site/xdocs/changelog.xml
    jakarta/commons/proper/attributes/trunk/site/xdocs/index.xml

Modified: jakarta/commons/proper/attributes/trunk/api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java
(original)
+++ jakarta/commons/proper/attributes/trunk/api/src/java/org/apache/commons/attributes/RuntimeAttributeRepository.java
Mon May 29 12:45:24 2006
@@ -99,6 +99,15 @@
     private final Class clazz;
     
     /**
+     * Synchronization lock for sealing the repository. We use this instead of
+     * synchronizing on the instance (this), since the sync:ing was added
+     * in 2.2 and we don't want to break any code.
+     * 
+     * @since 2.2
+     */
+    private final Object syncLock = new Object ();
+    
+    /**
      * Create a new runtime repository.
      *
      * @since 2.1
@@ -113,6 +122,7 @@
      * @since 2.1
      */
     public void addClassAttribute (Object attribute) {
+        checkSealed ();
         classAttributes.add (attribute);
     }
     
@@ -124,8 +134,10 @@
      * @since 2.1
      */
     private void checkSealed () throws IllegalStateException {
-        if (sealed) {
-            throw new IllegalStateException ("RuntimeAttributeRepository has been sealed.");
+        synchronized (syncLock) {
+            if (sealed) {
+                throw new IllegalStateException ("RuntimeAttributeRepository has been sealed.");
+            }
         }
     }
     
@@ -364,6 +376,8 @@
      * @since 2.1
      */
     public void seal () {
-        sealed = true;
+        synchronized (syncLock) {
+            sealed = true;
+        }
     }
 }

Modified: jakarta/commons/proper/attributes/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/build.xml?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/build.xml (original)
+++ jakarta/commons/proper/attributes/trunk/build.xml Mon May 29 12:45:24 2006
@@ -53,7 +53,8 @@
     <target name="compile" description="o Compile the code" depends="get-deps">
         <mkdir dir="${classesdir}">
         </mkdir>
-        <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false"
excludes="**/package.html">
+        <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false"
excludes="**/package.html"
+            source="1.4" target="1.4">
             <src>
                 <pathelement location="api/src/java">
                 </pathelement>

Modified: jakarta/commons/proper/attributes/trunk/compiler/project.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/compiler/project.xml?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/compiler/project.xml (original)
+++ jakarta/commons/proper/attributes/trunk/compiler/project.xml Mon May 29 12:45:24 2006
@@ -40,14 +40,6 @@
             <artifactId>ant</artifactId>
             <version>1.5</version>
         </dependency>
-        
-        <!--
-        <dependency>
-            <groupId>xdoclet</groupId>
-            <artifactId>xdoclet-xjavadoc</artifactId>
-            <version>1.0</version>
-        </dependency>
-        -->        
 
         <dependency>
             <groupId>qdox</groupId>
@@ -58,15 +50,15 @@
         <dependency>
             <groupId>org.apache.commons</groupId>
             <artifactId>commons-attributes-api</artifactId>
-            <version>2.2-SNAPSHOT</version>
+            <version>2.2</version>
         </dependency>
-        <!--
+
         <dependency>
             <groupId>javadoc</groupId>
             <artifactId>javadoc</artifactId>
             <version>1.4</version>
         </dependency>
--->
+
     </dependencies>
     
 </project>

Modified: jakarta/commons/proper/attributes/trunk/project.properties
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/project.properties?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/project.properties (original)
+++ jakarta/commons/proper/attributes/trunk/project.properties Mon May 29 12:45:24 2006
@@ -21,8 +21,8 @@
 ######################################################################
 # Specify the JVM version.
 ######################################################################
-#maven.compile.source=
-#maven.compile.target=
+maven.compile.source=1.4
+maven.compile.target=1.4
 
 ######################################################################
 # Jar Manifest Additional Attributes

Modified: jakarta/commons/proper/attributes/trunk/project.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/project.xml?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/project.xml (original)
+++ jakarta/commons/proper/attributes/trunk/project.xml Mon May 29 12:45:24 2006
@@ -31,7 +31,7 @@
         <logo>http://jakarta.apache.org/images/jakarta-logo.gif</logo>
     </organization>
     
-    <currentVersion>2.2-SNAPSHOT</currentVersion>
+    <currentVersion>2.2</currentVersion>
     <inceptionYear>2003</inceptionYear>
     <shortDescription>Commons Attributes</shortDescription>
     <description>A package for handling runtime information about types (including
Java classes)</description>

Modified: jakarta/commons/proper/attributes/trunk/site/xdocs/changelog.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/site/xdocs/changelog.xml?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/site/xdocs/changelog.xml (original)
+++ jakarta/commons/proper/attributes/trunk/site/xdocs/changelog.xml Mon May 29 12:45:24 2006
@@ -24,6 +24,17 @@
     </properties>
     
     <body>
+        <section name="2006-06-29">
+            <ul>
+                <li>
+                    <p>
+                        Fixed a potential bug in RuntimeAttributeRepository - the seal()
method and the
+                        checkSealed() method weren't synchronized properly.
+                    </p>
+                </li>
+            </ul>
+        </section>
+        
         <section name="2005-10-26">
             <ul>
                 <li>

Modified: jakarta/commons/proper/attributes/trunk/site/xdocs/index.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/attributes/trunk/site/xdocs/index.xml?rev=410143&r1=410142&r2=410143&view=diff
==============================================================================
--- jakarta/commons/proper/attributes/trunk/site/xdocs/index.xml (original)
+++ jakarta/commons/proper/attributes/trunk/site/xdocs/index.xml Mon May 29 12:45:24 2006
@@ -39,6 +39,11 @@
         <section name="News">
             <p>Please see the <a href="changelog.html">change log</a> for
summaries of code changes.</p>
 
+            <p><b>2006-06-29</b></p>
+            <ul>
+                <li><p>Attributes 2.2 released!</p></li>
+            </ul>
+            
             <p><b>2004-08-15</b></p>
             <ul>
                 <li><p>Attributes 2.1 released!</p></li>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message