1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-15 13:05:22 +02:00

[244051] Check dups in env vars even if invalidNameChars==null

This commit is contained in:
Martin Oberhuber 2008-11-12 14:08:03 +00:00
parent cde5c0f2bc
commit 2b0e88e140

View file

@ -580,17 +580,15 @@ public class EnvironmentVariablesForm extends SystemBaseForm implements Selectio
} }
// first check for invalid characters // first check for invalid characters
if (invalidNameChars != null) for (int i = 0; i < invalidNameChars.length() && msg == null; i++)
{ {
for (int i = 0; i < invalidNameChars.length() && msg == null; i++) if (name.indexOf(invalidNameChars.charAt(i)) != -1)
{ {
if (name.indexOf(invalidNameChars.charAt(i)) != -1) msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR);
{
msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_ENVVAR_INVALIDCHAR);
}
} }
} }
}
if (msg == null) {
// next check for duplicate env var names // next check for duplicate env var names
int itemCount = envVarTable.getItemCount(); int itemCount = envVarTable.getItemCount();
for (int i = 0; i < itemCount; i++) { for (int i = 0; i < itemCount; i++) {