From: <aki...@us...> - 2010-05-24 17:41:30
|
Revision: 7982 http://gridarta.svn.sourceforge.net/gridarta/?rev=7982&view=rev Author: akirschbaum Date: 2010-05-24 17:41:22 +0000 (Mon, 24 May 2010) Log Message: ----------- Simplify code. Modified Paths: -------------- trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java Modified: trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java =================================================================== --- trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java 2010-05-24 17:39:38 UTC (rev 7981) +++ trunk/src/app/net/sf/gridarta/model/gameobject/GameObjectUtils.java 2010-05-24 17:41:22 UTC (rev 7982) @@ -63,14 +63,8 @@ final Comparable<String> attrKey = spaceIndex == -1 ? line : line.substring(0, spaceIndex); // now check if there's a match in the definitions - final boolean doesMatch; /* we exclude "direction", "type", and "name" on the hard way */ - if (attrKey.compareTo("direction") == 0 || attrKey.equals(Archetype.TYPE) || attrKey.equals(Archetype.NAME)) { - doesMatch = true; - } else { - doesMatch = type.hasAttributeKey(attrKey); - } - if (!doesMatch) { + if (!attrKey.equals("direction") && !attrKey.equals(Archetype.TYPE) && !attrKey.equals(Archetype.NAME) && !type.hasAttributeKey(attrKey)) { errors.append(line.trim()).append('\n'); // append line to the errors /* // the attribute doesn't match the definitions, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |