package com.linkedin.clustermanager.tools;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.testng.Assert;

public class PropertiesReader
{
  private final Properties _properties = new Properties();

  public PropertiesReader(String propertyFileName)
  {
    try
    {
      InputStream stream = Thread.currentThread().getContextClassLoader()
          .getResourceAsStream(propertyFileName);
      _properties.load(stream);
    }
    catch (IOException e)
    {
      Assert.fail("could not open properties file:" + propertyFileName, e);
    }
  }

  public String getProperty(String key)
  {
    String value = _properties.getProperty(key);
    if (value == null)
    {
      throw new IllegalArgumentException("no property exist for key:" + key);
    }

    return value;
  }
}

@@ -138,21 +138,27 @@
 org.
-testng.Ass
+apache.log4j.Logg
 er
-t
 ;%0A%0Ap
@@ -188,16 +188,112 @@
 eader%0A%7B%0A
+  private static final Logger LOG = Logger%0A      .getLogger(PropertiesReader.class.getName());%0A%0A
   privat
@@ -617,20 +617,24 @@
     
-Assert.fail(
+String errMsg = 
 %22cou
@@ -681,16 +681,96 @@
 FileName
+;%0A      // LOG.error(errMsg, e);%0A      throw new IllegalArgumentException(errMsg
 , e);%0A  

fix broken file