db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r547961 - /db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
Date Sat, 16 Jun 2007 18:44:19 GMT
Author: rhillegas
Date: Sat Jun 16 11:44:18 2007
New Revision: 547961

URL: http://svn.apache.org/viewvc?view=rev&rev=547961
Log:
DERBY-2570: Merge 547957 from trunk--this adds some more error reporting to the release note
generator.

Modified:
    db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java

Modified: db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java?view=diff&rev=547961&r1=547960&r2=547961
==============================================================================
--- db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
(original)
+++ db/derby/code/branches/10.3/java/build/org/apache/derbyBuild/ReleaseNotesGenerator.java
Sat Jun 16 11:44:18 2007
@@ -622,7 +622,7 @@
             JiraIssue       issue = bugs[ i ];
             Document    releaseNote = getReleaseNote( gs, issue );
             String          key = "Note for " + issue.getKey();
-            String          summary = getReleaseNoteSummary( releaseNote );
+            String          summary = getReleaseNoteSummary( issue, releaseNote );
             String          tocEntry = key + ": " + summary;
 
             insertLine( issuesSection );
@@ -682,7 +682,7 @@
      * Get the summary for a release note
      * </p>
      */
-    private String   getReleaseNoteSummary( Document releaseNote )
+    private String   getReleaseNoteSummary( JiraIssue issue, Document releaseNote )
         throws Exception
     {
         if ( releaseNote != null )
@@ -695,11 +695,18 @@
             //  Summary text
             // </p>
             //
-            Element     root = releaseNote.getDocumentElement();
-            Element     summaryParagraph = getFirstChild( root, PARAGRAPH );
-            String          summaryText = squeezeText( summaryParagraph );
+            try {
+                Element     root = releaseNote.getDocumentElement();
+                Element     summaryParagraph = getFirstChild( root, PARAGRAPH );
+                String          summaryText = squeezeText( summaryParagraph );
 
-            return summaryText;
+                return summaryText;
+            }
+            catch (Throwable t)
+            {
+                throw new BuildException
+                    ( "Badly formatted summary for " + issue.getKey() + ": " + t.toString(),
t );
+            }
         }
         else { return "???"; }
     }



Mime
View raw message