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

Replaced a part of replaceAll() calls to replace() #5228

Merged
merged 1 commit into from
Jan 9, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ private static String parseHtmlMessage(String html, boolean htmlTextIsAllYouGot)
html = html.substring(idxS, idxE);

// very nice
html = html.replaceAll("Please press \\<b\\>Back\\</b\\> and try again.", ""); // NOI18N
html = html.replace("Please press <b>Back</b> and try again.", ""); // NOI18N

return html;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public void prependPathVariable(String name, String path) {

String oldpath = get(name);
String newPath = path + (oldpath == null ? "" : (isWindows ? ';' : ':') + oldpath); // NOI18N
newPath = newPath.replaceAll("::", ":"); // NOI18N
newPath = newPath.replace("::", ":"); // NOI18N
newPath = newPath.replaceAll("^:", ""); // NOI18N
newPath = newPath.replaceAll(":$", ""); // NOI18N
put(name, newPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ private void initHooksPanel() {
JTabbedPane hooksTabbedPane = new JTabbedPane();
for (HgHook hook : hooks) {
hooksTabbedPane.add(hook.createComponent(hookContext),
hook.getDisplayName().replaceAll("\\&", ""));
hook.getDisplayName().replace("&", ""));
}
hookSectionPanel.add(hooksTabbedPane);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ private void initHooksPanel() {
JTabbedPane hooksTabbedPane = new JTabbedPane();
for (SvnHook hook : hooks) {
hooksTabbedPane.add(hook.createComponent(hookContext),
hook.getDisplayName().replaceAll("\\&", ""));
hook.getDisplayName().replace("&", ""));
}
hooksSectionPanel.add(hooksTabbedPane);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public HookPanel(VCSCommitPanel master, Collection<? extends VCSHook> hooks, VCS
} else {
JTabbedPane hooksTabbedPane = new JTabbedPane();
for (VCSHook hook : hooks) {
hooksTabbedPane.add(hook.createComponent(hookContext), hook.getDisplayName().replaceAll("\\&", ""));
hooksTabbedPane.add(hook.createComponent(hookContext), hook.getDisplayName().replace("&", ""));
}
sectionPanel.add(hooksTabbedPane);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void testXSLT() throws Exception{
Thread.sleep(1000);//wait for opening a window
String text = new EditorOperator(outputName).getText();
//create one line because of Windows are adding few empty lines
text = text.replaceAll("\n", "");
text = text.replace("\n", "");
ref(text);
ending();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ private String escapeChars(String str) {
replace("\t","\\\\t").
replace("\r","\\\\r").
replace("`","\\`").
replaceAll("\"","\\\\\"");
replace("\"","\\\\\"");

}
private String escapeSlashesAndChars(String str) {
Expand Down