Identifying non-externalized text strings that are not hard-coded
First Claim
1. A method for identifying hard-coded strings that require conversion, the method comprising the computer-implemented steps of:
- scanning programming code for a first pair of string delimiters that are used to delimit text strings;
determining whether a text string within said first pair of string delimiters is a path name to a resource file;
if said text string is not a path name to said resource file then flagging said string as a possible hard-coded string; and
wherein said text string is not flagged as a possible hard-coded string if said text string is a path name to said resource file.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, computer program product and data processing system for identifying non-externalized strings that are not hard-coded. In one embodiment, a method comprises the step of scanning a code, e.g., Java, line by line until a pair of string delimiters is identified. Once a pair of string delimiters is identified, the method further comprises the step of determining whether the string within the pair of string delimiters identified is a path name to a resource file, e.g., resource bundle. If the string is a path name to the resource file, then the string is a non-externalized string that is not hard-coded. If the string is not a path name to the resource file, then the string may be identified as a possible hard-coded string.
30 Citations
21 Claims
-
1. A method for identifying hard-coded strings that require conversion, the method comprising the computer-implemented steps of:
-
scanning programming code for a first pair of string delimiters that are used to delimit text strings; determining whether a text string within said first pair of string delimiters is a path name to a resource file; if said text string is not a path name to said resource file then flagging said string as a possible hard-coded string; and wherein said text string is not flagged as a possible hard-coded string if said text string is a path name to said resource file.
-
-
2. The method as recited in clam 1, wherein said programming code comprises platform-independent byte code.
-
3. The method as recited in clam 1, wherein said path name is a uniform resource locator.
-
4. The method as recited in clam 1, wherein said path name is a resource bundle.
-
5. The method as recited in clam 1, wherein said text string within said first pair of string delimiters is a path name to said resource file if said text string is in a dot delimited notation.
-
6. The method as recited in clam 1, wherein said programming code is scanned line by line until said first pair of string delimiters is identified.
-
7. The method as recited in clam 6, wherein if there is any more programming code to be scanned after said first pair of string delimiters is identified, then the method further comprises the step of:
continuing to scan said programming code for a second pair of delimiters.
-
8. A computer program product in a computer readable medium for identifying hard-coded string that require conversion, comprising:
-
programming operable for scanning programming code for a first pair of string delimiters that are used to delimit text strings; programming operable for determining whether a text string within said first pair of string delimiters is a path name to a resource file; programming operable for flagging said text string as possible hard-coded string if said string is not a path name to said resource file; and wherein said text string is not flagged as a possible hard-coded string if said text string is a path name to said resource file. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A data processing system, comprising:
-
a processor; and a memory unit for storing instructions of said processor; an input mechanism; an output mechanism; a bus system for coupling the processor to the memory unit, input mechanism, and output mechanism; means for scanning programming code for a first pair of string delimiters that are used to delimit text strings; means for determining whether a text string within said first pair of string delimiters is a path name to a resource file; means for flagging said string as a possible hard-coded string if said text string is not a path name to said resource file; and means for not flagging said text string is not flagged as a possible hard-coded string if said text string is a path name to said resource file. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification