[skip] code spacing, right margin is 120 chars

This commit is contained in:
Connor Tumbleson 2015-12-18 11:31:43 -06:00
parent ba7393d705
commit 9618ce9759

View File

@ -37,8 +37,7 @@ public abstract class TestUtils {
public static Map<String, String> parseStringsXml(File file) public static Map<String, String> parseStringsXml(File file)
throws BrutException { throws BrutException {
try { try {
XmlPullParser xpp = XmlPullParserFactory.newInstance() XmlPullParser xpp = XmlPullParserFactory.newInstance().newPullParser();
.newPullParser();
xpp.setInput(new FileReader(file)); xpp.setInput(new FileReader(file));
int eventType; int eventType;
@ -83,16 +82,14 @@ public abstract class TestUtils {
* implementation uses brut.dir. I think I should merge all my projects to * implementation uses brut.dir. I think I should merge all my projects to
* single brut.common . * single brut.common .
*/ */
public static void copyResourceDir(Class class_, String dirPath, File out) public static void copyResourceDir(Class class_, String dirPath, File out) throws BrutException {
throws BrutException {
if (!out.exists()) { if (!out.exists()) {
out.mkdirs(); out.mkdirs();
} }
copyResourceDir(class_, dirPath, new FileDirectory(out)); copyResourceDir(class_, dirPath, new FileDirectory(out));
} }
public static void copyResourceDir(Class class_, String dirPath, public static void copyResourceDir(Class class_, String dirPath, Directory out) throws BrutException {
Directory out) throws BrutException {
if (class_ == null) { if (class_ == null) {
class_ = Class.class; class_ = Class.class;
} }
@ -111,9 +108,7 @@ public abstract class TestUtils {
if (dirURL.getProtocol().equals("jar")) { if (dirURL.getProtocol().equals("jar")) {
String jarPath; String jarPath;
try { try {
jarPath = URLDecoder.decode( jarPath = URLDecoder.decode(dirURL.getPath().substring(5, dirURL.getPath().indexOf("!")), "UTF-8");
dirURL.getPath().substring(5,
dirURL.getPath().indexOf("!")), "UTF-8");
} catch (UnsupportedEncodingException ex) { } catch (UnsupportedEncodingException ex) {
throw new BrutException(ex); throw new BrutException(ex);
} }
@ -135,9 +130,7 @@ public abstract class TestUtils {
testType = test.getAttribute("type"); testType = test.getAttribute("type");
} }
return controlType.equals(testType) return controlType.equals(testType) && control.getAttribute("name").equals(test.getAttribute("name"));
&& control.getAttribute("name").equals(
test.getAttribute("name"));
} }
} }
} }