Bug 83590 - The aspectj source contains many hardcoded strings that should be externalized.
Summary: The aspectj source contains many hardcoded strings that should be externalized.
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-25 03:32 EST by Andrew Clement CLA
Modified: 2007-10-23 06:28 EDT (History)
0 users

See Also:


Attachments
externalized strings from PointcutParser (11.54 KB, patch)
2005-01-25 04:41 EST, Kev Jackson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2005-01-25 03:32:53 EST
Having strings externalized makes support for other languages much easier as
only a message bundle needs translating.  We should externalize all our strings.
Comment 1 Kev Jackson CLA 2005-01-25 04:41:40 EST
Created attachment 17419 [details]
externalized strings from PointcutParser
Comment 2 Andrew Clement CLA 2005-02-04 04:38:05 EST
Hmmm.  Some of the tests are failing with the patch applied.  After some digging
there are two problems:

1. in the patch the message id is PointcutPrimitives.WITHIN_CODE in the bundle
but it is referred to in WeaverMessages as WITHINCODE.

2. There are multiple changes to PointcutParser so that it has throws clauses
like this:
  throw new UnsupportedOperationException(WeaverMessages.POINTCUT_ARGS);

rather than throwing the hardcoded string.  Unfortunately that is merely a
reference to the key in the WeaverMessages.java source, the key has to be used
as a lookup into the bundle to access the real message.  This works:

  throw new
UnsupportedOperationException(WeaverMessages.format(WeaverMessages.POINTCUT_ARGS));

but probably could be further simplified with some changes to WeaverMessages.
Comment 3 Andrew Clement CLA 2006-05-30 09:46:56 EDT
i've put in the first proposed changes for PointcutParser - code had moved around a bit, so not so much to externalize.