Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions java/build/org/apache/derbyBuild/ClassSizeCrawler.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ public static void main( String[] arg)
out.print( "package org.apache.derby.iapi.services.cache;\n" +
"class ClassSizeCatalogImpl extends ClassSizeCatalog\n" +
"{\n" +
//IC see: https://issues.apache.org/jira/browse/DERBY-6856
" public ClassSizeCatalogImpl()\n" +
" {\n");
for( Enumeration e = classSizes.keys();
Expand Down Expand Up @@ -224,11 +225,13 @@ public static void main( String[] arg)

private ClassSizeCrawler( Class[] interfaceList,
int interfaceCount,
//IC see: https://issues.apache.org/jira/browse/DERBY-4893
Hashtable<String, int[]> classSizes)
{
this.interfaceList = interfaceList;
this.classSizes = classSizes;
this.interfaceCount = interfaceCount;
//IC see: https://issues.apache.org/jira/browse/DERBY-6856
verbose = Boolean.parseBoolean( System.getProperty( "verbose", "false"));
}

Expand Down Expand Up @@ -262,6 +265,7 @@ private void crawl( File curDir, StringBuffer className)
// Strip off the ".class" suffix
String s = filenames[fileIdx].substring( 0, filenames[fileIdx].length() - 6);
className.append( s);
//IC see: https://issues.apache.org/jira/browse/DERBY-4893
Class<?> targetClass = null;
String targetClassName = className.toString();
try
Expand Down
1 change: 1 addition & 0 deletions java/build/org/apache/derbyBuild/ElementFacade.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public String getTextByTagName(String tag) throws Exception {
public List<String> getTextListByTagName(String tag) throws Exception {
NodeList matchingTags = root.getElementsByTagName(tag);
final int length = matchingTags.getLength();
//IC see: https://issues.apache.org/jira/browse/DERBY-4893
ArrayList<String> tagValues = new ArrayList<String>();
for (int i = 0; i < length; ++i) {
tagValues.add(matchingTags.item(i).getFirstChild().getNodeValue());
Expand Down
7 changes: 7 additions & 0 deletions java/build/org/apache/derbyBuild/GeneratorBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public void setOutputFileName(String outputFileName) throws Exception {
* Ant mutator to set the id of the release
*/
public void setReleaseId(String releaseID) throws Exception {
//IC see: https://issues.apache.org/jira/browse/DERBY-4864
this.releaseID = releaseID;
}

Expand All @@ -178,6 +179,7 @@ public void setReleaseId(String releaseID) throws Exception {
protected void buildDelta(Element parent)
throws Exception {
String deltaStatement =
//IC see: https://issues.apache.org/jira/browse/DERBY-4864
"These notes describe the difference between Apache Derby release " +
releaseID + " and the preceding release " +
previousReleaseID + ".";
Expand Down Expand Up @@ -289,6 +291,7 @@ public static Element createHeader(Element parent, int headerLevel,
Element header = doc.createElement(makeHeaderTag(headerLevel));
Element anchor = doc.createElement(ANCHOR);
Element block = doc.createElement(DIVISION);
//IC see: https://issues.apache.org/jira/browse/DERBY-5181

parent.appendChild(header);
anchor.setAttribute(NAME, text);
Expand All @@ -307,6 +310,7 @@ public static Element createHeader(Element parent, int headerLevel,
* @throws DOMException
*/
private static Element wrapTextContentInDiv(Element node)
//IC see: https://issues.apache.org/jira/browse/DERBY-6044
throws DOMException {
Document doc = node.getOwnerDocument();
Element div = doc.createElement(DIVISION);
Expand Down Expand Up @@ -555,6 +559,7 @@ public static Element createTable(Element parent, int borderWidth,
parent.appendChild(table);
table.setAttribute(BORDER, Integer.toString(borderWidth));

//IC see: https://issues.apache.org/jira/browse/DERBY-6044
for (String headerText : columnHeadings) {
Element headingColumn = insertColumnHeader(headingRow);
headingColumn.setTextContent(headerText);
Expand Down Expand Up @@ -587,6 +592,7 @@ protected void fixWidthOfFirstColumn(Element table)
*/
public static Element insertRow(Element table)
throws Exception {
//IC see: https://issues.apache.org/jira/browse/DERBY-6044
return insertTableElement(table, ROW);
}

Expand All @@ -598,6 +604,7 @@ public static Element insertRow(Element table)
*/
public static Element insertColumn(Element row)
throws Exception {
//IC see: https://issues.apache.org/jira/browse/DERBY-6044
return insertTableElement(row, COLUMN);
}

Expand Down
1 change: 1 addition & 0 deletions java/build/org/apache/derbyBuild/JarDriftTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ protected static String sanityState() throws Exception {
// sanity=[false|true] except for some header/timestamp info).
String fs = File.separator;
String sanityFileName =
//IC see: https://issues.apache.org/jira/browse/DERBY-6945
topOfTree + fs + "generated" + fs + "java" + fs + "org.apache.derby.commons" + fs +
"org" + fs + "apache" + fs + "derby" + fs + "shared" + fs + "common" + fs +
"sanity" + fs + "state.properties";
Expand Down
1 change: 1 addition & 0 deletions java/build/org/apache/derbyBuild/JiraConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class JiraConnector {

public static void main(String[] args) {
try{
//IC see: https://issues.apache.org/jira/browse/DERBY-4014
if (args.length > 0 && args[0].equals("all"))
// don't use this too often it is hard on Apache infrastructure.
refreshJiraIssues(allJiraListFileName, jira_allBugsSource);
Expand Down
6 changes: 6 additions & 0 deletions java/build/org/apache/derbyBuild/JiraIssue.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public JiraIssue(String key, String title, List fixVersions,
public static List createJiraIssueList(String source)
throws IOException {
ArrayList<JiraIssue> jiraIssues = new ArrayList<JiraIssue>();
//IC see: https://issues.apache.org/jira/browse/DERBY-4893

BufferedReader in = new BufferedReader(new FileReader(source));
String line;
Expand All @@ -79,6 +80,7 @@ public static List createJiraIssueList(String source)
System.out.println(line);
}

//IC see: https://issues.apache.org/jira/browse/DERBY-4893
ArrayList<String> comments = new ArrayList<String>();
int state = STATE_ADD_KEY;
String key = null;
Expand Down Expand Up @@ -164,6 +166,7 @@ public long getReleaseNoteAttachmentID() {
* @return true iff this issue has a release note attached
*/
public boolean hasReleaseNote() {
//IC see: https://issues.apache.org/jira/browse/DERBY-4857
return (releaseNoteAttachmentID != NO_RELEASE_NOTE &&
releaseNoteAttachmentID != MISSING_RELEASE_NOTE);
}
Expand All @@ -181,20 +184,23 @@ public boolean hasMissingReleaseNote() {
* @return true iff issue has version as fixVersion
*/
public boolean isFixedIn(String version) {
//IC see: https://issues.apache.org/jira/browse/DERBY-4857
return fixVersions.contains(version);
}

/**
* @return URL for this Jira issue
*/
public String getJiraAddress() {
//IC see: https://issues.apache.org/jira/browse/DERBY-4593
return "https://issues.apache.org/jira/browse/DERBY-" + key;
}

/**
* @return Full URL to the latest release note
*/
public String getReleaseNoteAddress() {
//IC see: https://issues.apache.org/jira/browse/DERBY-4857
return ATTACHMENT_BASE +
releaseNoteAttachmentID + "/" + ATTACHMENT_NAME;
}
Expand Down
21 changes: 21 additions & 0 deletions java/build/org/apache/derbyBuild/MessageBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public class MessageBuilder extends Task
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<!DOCTYPE reference PUBLIC \"-//OASIS//DTD DITA Reference//EN\"\n" +
" \"../dtd/reference.dtd\">\n";
//IC see: https://issues.apache.org/jira/browse/DERBY-2110

public static final String APACHE_LICENSE =
"Licensed to the Apache Software Foundation (ASF) under one or more\n" +
Expand All @@ -100,6 +101,7 @@ public class MessageBuilder extends Task
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. \n" +
"See the License for the specific language governing permissions and \n" +
"limitations under the License.\n";
//IC see: https://issues.apache.org/jira/browse/DERBY-3547

private static final String REF_GUIDE_NOTES =
"<!-- \n" +
Expand All @@ -109,6 +111,7 @@ public class MessageBuilder extends Task
"<!-- \n" +
"NOTE: this file is generated by the MessageBuilder task as part of a\n" +
"Derby build. Please do not hand-edit this file. Instead, please edit\n" +
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
"the corresponding text in messages.xml and/or MessageBuilder.\n" +
"-->\n";

Expand Down Expand Up @@ -160,8 +163,10 @@ public XMLWriter()
*/
public XMLWriter(PrintWriter printWriter)
{
//IC see: https://issues.apache.org/jira/browse/DERBY-3547
_vacuous = false;
_pw = printWriter;
//IC see: https://issues.apache.org/jira/browse/DERBY-4893
_tagStack = new ArrayList<String>();
}

Expand All @@ -173,6 +178,7 @@ public XMLWriter(PrintWriter printWriter)
public XMLWriter( File file )
throws IOException
{
//IC see: https://issues.apache.org/jira/browse/DERBY-3547
this(new PrintWriter(file));
}

Expand Down Expand Up @@ -214,6 +220,7 @@ public void writeEmptyTag( String tag, String attributes )
if ( _vacuous ) { return; }

indent( );
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
if ( attributes.length() >0)
_pw.println( "<" + tag + " " + attributes + "/>");
else
Expand Down Expand Up @@ -244,6 +251,7 @@ public void beginTag( String tag, String attributes )
if ( _vacuous ) { return; }

indent();
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
if (attributes.length() > 0)
_pw.println( "<" + tag + " " + attributes + ">");
else
Expand Down Expand Up @@ -293,6 +301,7 @@ public void writeTextElement( String tag, String attributes, String text )
if ( _vacuous ) { return; }

indent();
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
if ( attributes.length() > 0 )
_pw.print( "<" + tag + " " + attributes + ">");
else
Expand Down Expand Up @@ -388,6 +397,7 @@ public void execute()
}
catch (Exception e)
{
//IC see: https://issues.apache.org/jira/browse/DERBY-5885
throw new BuildException( "Could not generate English properties from message descriptors: " + e.getMessage(), e );
}
finally
Expand Down Expand Up @@ -522,10 +532,12 @@ private void processFamily( PrintWriter propertiesPW, XMLWriter ditaWriter, E
ditaWriter.beginTag( "table" );
{
ditaWriter.writeTextElement( "title", title );
//IC see: https://issues.apache.org/jira/browse/DERBY-5640
ditaWriter.writeTextElement( "desc", "This table lists the SQLStates and message text for the " + title + " exceptions." );

ditaWriter.beginTag( "tgroup", "cols=\"2\"" );
{
//IC see: https://issues.apache.org/jira/browse/DERBY-5202
ditaWriter.writeEmptyTag( "colspec", "colname=\"col1\" colnum=\"1\" colwidth=\"1*\"" );
ditaWriter.writeEmptyTag( "colspec", "colname=\"col2\" colnum=\"2\" colwidth=\"7.5*\"" );

Expand Down Expand Up @@ -569,6 +581,7 @@ private void processMessage( PrintWriter propertiesPW, XMLWriter ditaWriter,
String rawText = squeezeText( getFirstChild( message, "text" ) );
String propertyText = escapePropertiesText( rawText );
int parameterCount = countParameters( rawText );
//IC see: https://issues.apache.org/jira/browse/DERBY-5878
String[] comments = getOptionalSubElements( message, "comment" );
String[] args = getOptionalSubElements( message, "arg" );

Expand All @@ -577,6 +590,7 @@ private void processMessage( PrintWriter propertiesPW, XMLWriter ditaWriter,
throw new Exception( name + " has " + parameterCount + " parameters but " + args.length + " nested args." );
}

//IC see: https://issues.apache.org/jira/browse/DERBY-2110
String displayText;
if (rawText.indexOf('\'')>=0)
{
Expand All @@ -595,8 +609,10 @@ private void processMessage( PrintWriter propertiesPW, XMLWriter ditaWriter,
}
ditaWriter.endTag();

//IC see: https://issues.apache.org/jira/browse/DERBY-5878
propertiesPW.println( "" );

//IC see: https://issues.apache.org/jira/browse/DERBY-5878
if ( comments.length != 0 )
{
for ( int i = 0; i < comments.length; i++ )
Expand All @@ -612,6 +628,7 @@ private void processMessage( PrintWriter propertiesPW, XMLWriter ditaWriter,
propertiesPW.println( "#" );
for ( int i = 0; i < args.length; i++ )
{
//IC see: https://issues.apache.org/jira/browse/DERBY-5878
propertiesPW.println( "# {" + i + "} = " + args[ i ] );
}
propertiesPW.println( "#" );
Expand Down Expand Up @@ -639,6 +656,7 @@ private String getSQLState( String name )
private String[] getOptionalSubElements( Element message, String subElementTag )
throws Exception
{
//IC see: https://issues.apache.org/jira/browse/DERBY-5878
NodeList options = message.getElementsByTagName( subElementTag );
int count = options.getLength();
String[] retval = new String[ count ];
Expand Down Expand Up @@ -690,10 +708,12 @@ private String plugInArgs( String message, String[] rawArgs )
int count = rawArgs.length;
String[] cookedArgs = new String[ count ];
MessageFormat format = new MessageFormat(message);
//IC see: https://issues.apache.org/jira/browse/DERBY-5420

// add xml angle brackets around the args
for ( int i = 0; i < count; i++ )
{
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
cookedArgs[ i ] = "<varname>&lt;" + rawArgs[ i ] + "&gt;</varname>";
format.setFormatByArgumentIndex(i, null); // use plain string format
}
Expand Down Expand Up @@ -805,6 +825,7 @@ private static String escapePropertiesText( java.lang.String input )
*/
private static String escapeTextWithAQuote( java.lang.String input )
{
//IC see: https://issues.apache.org/jira/browse/DERBY-2110
String output = input.replaceAll( "\'", "\'\'" );

return output;
Expand Down
9 changes: 9 additions & 0 deletions java/build/org/apache/derbyBuild/MessageBundleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class MessageBundleTest {
* </p>
*/
public MessageBundleTest()
//IC see: https://issues.apache.org/jira/browse/DERBY-1458
{}

public static void main(String [] args) throws Exception
Expand All @@ -63,6 +64,7 @@ public static void main(String [] args) throws Exception
e.printStackTrace();
}
if (failbuild)
//IC see: https://issues.apache.org/jira/browse/DERBY-4341
throw new Exception("Message check failed. \n" +
"See error in build output or call ant runmessagecheck.");
}
Expand All @@ -89,6 +91,7 @@ public static void main(String [] args) throws Exception
}

static void loadClassIds(Class idclass, HashSet<String> set)
//IC see: https://issues.apache.org/jira/browse/DERBY-4893
throws Exception {
Field[] fields = idclass.getFields();

Expand All @@ -111,6 +114,7 @@ static void loadClassIds(Class idclass, HashSet<String> set)

if ( ! set.add(id) )
{
//IC see: https://issues.apache.org/jira/browse/DERBY-1458
failbuild=true;
System.err.println("ERROR: The id " + id +
" was found twice in " + idclass.getName());
Expand Down Expand Up @@ -144,6 +148,7 @@ static void loadMessageBundle(int index) {
String key = (String)keys.nextElement();

if ( ! messageBundleIds.add(key) ) {
//IC see: https://issues.apache.org/jira/browse/DERBY-1458
failbuild=true;
System.err.println("ERROR: the key " + key +
" exists twice in messages_en.properties");
Expand All @@ -168,6 +173,8 @@ public void testSQLStateOrphanedIds() throws Exception {
// XSAX1: shared SQLState explains; not exposed to users.
// 01004: automatically assigned by java.sql.DataTruncation and
// never used to generate a message
//IC see: https://issues.apache.org/jira/browse/DERBY-3902
//IC see: https://issues.apache.org/jira/browse/DERBY-1567
if (!(sqlStateId.equalsIgnoreCase("XCL32.S") ||
sqlStateId.equalsIgnoreCase("XSAX1") ||
sqlStateId.equalsIgnoreCase("01004"))) {
Expand Down Expand Up @@ -195,6 +202,7 @@ public void testMessageIdOrphanedIds() throws Exception {
if ( ! messageBundleIds.contains(sqlStateId) ) {
// Don't fail out on the first one, we want to catch
// all of them. Just note there was a failure and continue
//IC see: https://issues.apache.org/jira/browse/DERBY-1458
failbuild=true;
System.err.println("ERROR: Message id " + sqlStateId +
" in MessageId.java was not found in" +
Expand Down Expand Up @@ -223,6 +231,7 @@ public void testMessageBundleOrphanedMessages() throws Exception {

// Don't fail out on the first one, we want to catch
// all of them. Just note there was a failure and continue
//IC see: https://issues.apache.org/jira/browse/DERBY-1458
failbuild=true;
System.err.println("WARNING: Message id " + msgid +
" in messages_en.properties is not " +
Expand Down
2 changes: 2 additions & 0 deletions java/build/org/apache/derbyBuild/MessageVetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public boolean accept(File pathname) {
// needs quoting.
LONE_QUOTE_ALLOWED.add("DRDA_Usage8.I");
LONE_QUOTE_ALLOWED.add("DRDA_Usage11.I");
//IC see: https://issues.apache.org/jira/browse/DERBY-5944
LONE_QUOTE_ALLOWED.add("PE_HelpText");
}

Expand All @@ -116,6 +117,7 @@ public boolean accept(File pathname) {
private MessageVetter(File file) throws IOException {
this.file = file;
properties = new Properties();
//IC see: https://issues.apache.org/jira/browse/DERBY-5480
FileInputStream in = new FileInputStream(file);
try {
properties.load(in);
Expand Down
Loading