Bug 255421 - Incorrect stub file generated when using ExtendedStringLiterals
Summary: Incorrect stub file generated when using ExtendedStringLiterals
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: AJDoc (show other bugs)
Version: 1.6.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.6.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-14 18:27 EST by Arturo Salazar CLA
Modified: 2009-05-14 15:06 EDT (History)
2 users (show)

See Also:


Attachments
Test Case (367 bytes, application/x-zip-compressed)
2008-11-14 18:27 EST, Arturo Salazar CLA
no flags Details
Patch for ExtendedStringLiteral (971 bytes, patch)
2008-11-14 19:27 EST, Arturo Salazar CLA
aclement: iplog+
Details | Diff
Patch for the AsmHierarchyBuilder (1.30 KB, patch)
2008-11-14 19:28 EST, Arturo Salazar CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arturo Salazar CLA 2008-11-14 18:27:39 EST
Created attachment 117964 [details]
Test Case

The generated code created does not reflect javadoc behavior.

The first incorrect stub is generated when the following Extended String Literal is used:
 
       public static final String B = "Half" + " and " + "Half";

the stub file generated looks like this:

public static final String B = "<extended string literal>";

And the HTML file created expresses the constant in the Constant Field Values as:

public static final java.lang.String B "<extended string literal>"

When I run the same class file through javadoc the Constant Field Values expreses it as:

public static final java.lang.String B "Half and Half"

The second incorrect stub generated is when you set a class variable using a Extended String Literal inside a method call:

int C = D("Half" + " Complete");

the stub file generated looks like this:

int C = D(ExtendedStringLiteral{Half Complete});

This is code is Syntacticly wrong and cause errors when javadoc is run on the stub file causing that file to not have an HTML file generated.

I've Attached Files that will produce the discussed behavior.
Comment 1 Arturo Salazar CLA 2008-11-14 19:27:09 EST
Created attachment 117967 [details]
Patch for ExtendedStringLiteral

I split this one up into 2 patches since one changes the shadow code.
Comment 2 Arturo Salazar CLA 2008-11-14 19:28:27 EST
Created attachment 117968 [details]
Patch for the AsmHierarchyBuilder

This will adjust the AsmHierarchyBuilder to use the change made to ExtendStringLiteral properly.
Comment 3 Andrew Clement CLA 2009-01-29 17:48:54 EST
all patches applied.  See bug 257277 in case there is follow up work to be done...

thanks for the patches!

iplog