-
Bug
-
Resolution: Fixed
-
Major
-
None
a java property value can be wrapped in more than one line:
name = value\ split\ in\ more\ lines\
The code in hudson.plugins.android_emulator.util.Utils.parseConfigFile does not take this into account and tries to split every non-empty line at the = char. This causes an ArrayIndexOutOfBoundsException in the above situation.
proposed fix:
public static Map<String,String> parseConfigFile(File configFile) throws IOException { FileReader fileReader = new FileReader(configFile); BufferedReader reader = new BufferedReader(fileReader); Properties properties = new Properties(); properties.load(reader); reader.close(); final Map<String,String> values = new HashMap<String,String>(); for (final Entry<Object, Object> entry : properties.entrySet()) { values.put((String) entry.getKey(), (String) entry.getValue()); } return values; }