Files
openide/java/java-tests/testData/inspection/dataFlow/StrangeArrayIndexOutOfBounds/src/Test.java
T
2009-09-25 20:42:06 +04:00

34 lines
862 B
Java

public class Test {
public void foo() {
Properties properties = new Properties();
InputStream inStream = null;
try {
removeCustomPrefixFromProperties(propertiesFile);
inStream = new FileInputStream(propertiesFile);
properties.load(inStream);
Enumeration<?> propertyNames = properties.propertyNames();
while (propertyNames.hasMoreElements()) {
String name = (String) propertyNames.nextElement();
setValue(name, properties.getProperty(name));
}
} catch (FileNotFoundException e) {
System.err.println(e.getMessage());
System.exit(-1);
}
catch (IOException e) {
LOG.error(e.getMessage(), e);
} finally {
if (inStream != null) {
try {
inStream.close();
} catch (IOException e) {
LOG.info(e);
}
}
}
}
}