Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some config results in OOM, reduce list of project in config #213

Merged
merged 2 commits into from
Oct 13, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Regexp/Example13/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<module name="Regexp">
<property name="duplicateLimit" value="0"/>
<property name="format" value='(/\*\*\n)( \*.*\n)*( \* <P>\n \* <I> This software is the confidential and proprietary information of\n \* ACME \(<B>"Confidential Information"</B> \)\. You shall not\n \* disclose such Confidential Information and shall use it only in\n \* accordance with the terms of the license agreement you entered into\n \* with ACME\.</I>\n \* </P>\n \*\n \* © copyright \d\d\d\d ACME\n \*\n \* @author .*)(\n\s\*.*)*/\n[\w|\s]*( class | interface )'/>
<property name="format" value='(/\*\*\n)( \*.*\n)*( \* &lt;P>\n \* &lt;I> This software is the confidential and proprietary information of\n \* ACME \(&lt;B>"Confidential Information"&lt;/B> \)\. You shall not\n \* disclose such Confidential Information and shall use it only in\n \* accordance with the terms of the license agreement you entered into\n \* with ACME\.&lt;/I>\n \* &lt;/P>\n \*\n \* © copyright \d\d\d\d ACME\n \*\n \* @author .*)(\n\s\*.*)*/\n[\w|\s]*( class | interface )'/>
<property name="message" value="Copyright in class/interface Javadoc"/>
</module>

Expand Down
2 changes: 1 addition & 1 deletion Regexp/all-examples-in-one/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

<module name="Regexp">
<property name="duplicateLimit" value="0"/>
<property name="format" value='(/\*\*\n)( \*.*\n)*( \* <P>\n \* <I> This software is the confidential and proprietary information of\n \* ACME \(<B>"Confidential Information"</B> \)\. You shall not\n \* disclose such Confidential Information and shall use it only in\n \* accordance with the terms of the license agreement you entered into\n \* with ACME\.</I>\n \* </P>\n \*\n \* © copyright \d\d\d\d ACME\n \*\n \* @author .*)(\n\s\*.*)*/\n[\w|\s]*( class | interface )'/>
<property name="format" value='(/\*\*\n)( \*.*\n)*( \* &lt;P>\n \* &lt;I> This software is the confidential and proprietary information of\n \* ACME \(&lt;B>"Confidential Information"&lt;/B> \)\. You shall not\n \* disclose such Confidential Information and shall use it only in\n \* accordance with the terms of the license agreement you entered into\n \* with ACME\.&lt;/I>\n \* &lt;/P>\n \*\n \* © copyright \d\d\d\d ACME\n \*\n \* @author .*)(\n\s\*.*)*/\n[\w|\s]*( class | interface )'/>
<property name="id" value="example13"/>
<property name="message" value="Copyright in class/interface Javadoc"/>
</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ private static void appendProperty(final StringBuilder builder, final String ind
private static String escapeXml(final String input) {
String result = input;
if (input != null && !input.isEmpty()) {
result = input.replace("\"", "&quot;")
result = input.replace("&", "&amp;")
.replace("<", "&lt;")
.replace("\"", "&quot;")
.replace("'", "&apos;");
}
return result;
Expand All @@ -535,6 +537,10 @@ private static String escapeXml(final String input) {
private static String escapeXmlAttributeValue(final String input, final char delimiter) {
String result = input;
if (input != null && !input.isEmpty()) {
// Escape '&', '<', and '>'
result = result.replace("&", "&amp;")
.replace("<", "&lt;");
// Escape the delimiter character
if (delimiter == '\'') {
result = result.replace("'", "&apos;");
}
Expand Down
Loading