Make gate ids case insensitive.

This commit is contained in:
Tobias Ottenweller 2013-06-23 20:14:19 +02:00
parent 437296262c
commit ed4dd5711e
2 changed files with 4 additions and 4 deletions

View File

@ -43,9 +43,9 @@ public class Gate implements ConfigurationSerializable
* You should never create two gates with the same 'id'. Also see 'setId(String id)'. * You should never create two gates with the same 'id'. Also see 'setId(String id)'.
* @param id This parameter must not be 'null'. An exception will be thrown otherwise! * @param id This parameter must not be 'null'. An exception will be thrown otherwise!
*/ */
public Gate(String id) public Gate(final String id)
{ {
setId(id); setId(id.toLowerCase());
} }

View File

@ -56,7 +56,7 @@ public class GatesManager
public Gate getGateWithId(final String id) public Gate getGateWithId(final String id)
{ {
return gatesById.get(id); return gatesById.get(id.toLowerCase());
} }
@ -484,7 +484,7 @@ public class GatesManager
public boolean gateExists(final String id) public boolean gateExists(final String id)
{ {
return gatesById.containsKey(id); return gatesById.containsKey(id.toLowerCase());
} }