[testng] 99/160: Follow the naming convention

Eugene Zhukov eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:26 UTC 2015


This is an automated email from the git hooks/post-receive script.

eugene-guest pushed a commit to annotated tag testng-6.9.5
in repository testng.

commit 88d9755901ae0a919c9e54b545dbdf396f110345
Author: Julien Herr <julien.herr at alcatel-lucent.com>
Date:   Tue Jun 9 23:43:43 2015 +0200

    Follow the naming convention
---
 src/main/java/org/testng/internal/YamlParser.java              |  4 ++--
 .../org/testng/xml/{SuiteParser.java => ISuiteParser.java}     |  2 +-
 src/main/java/org/testng/xml/Parser.java                       | 10 +++++-----
 src/main/java/org/testng/xml/SuiteXmlParser.java               |  3 +--
 src/main/java/org/testng/xml/dom/DomXmlParser.java             |  4 ++--
 ...{org.testng.xml.SuiteParser => org.testng.xml.ISuiteParser} |  0
 6 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/main/java/org/testng/internal/YamlParser.java b/src/main/java/org/testng/internal/YamlParser.java
index 2877acd..23f9ef2 100644
--- a/src/main/java/org/testng/internal/YamlParser.java
+++ b/src/main/java/org/testng/internal/YamlParser.java
@@ -1,13 +1,13 @@
 package org.testng.internal;
 
 import org.testng.TestNGException;
-import org.testng.xml.SuiteParser;
+import org.testng.xml.ISuiteParser;
 import org.testng.xml.XmlSuite;
 
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 
-public class YamlParser implements SuiteParser {
+public class YamlParser implements ISuiteParser {
 
   @Override
   public XmlSuite parse(String filePath, InputStream is, boolean loadClasses)
diff --git a/src/main/java/org/testng/xml/SuiteParser.java b/src/main/java/org/testng/xml/ISuiteParser.java
similarity index 50%
rename from src/main/java/org/testng/xml/SuiteParser.java
rename to src/main/java/org/testng/xml/ISuiteParser.java
index 7bb8de1..c737898 100644
--- a/src/main/java/org/testng/xml/SuiteParser.java
+++ b/src/main/java/org/testng/xml/ISuiteParser.java
@@ -1,6 +1,6 @@
 package org.testng.xml;
 
-public interface SuiteParser extends IFileParser<XmlSuite> {
+public interface ISuiteParser extends IFileParser<XmlSuite> {
 
   boolean accept(String fileName);
 }
diff --git a/src/main/java/org/testng/xml/Parser.java b/src/main/java/org/testng/xml/Parser.java
index 4408c8b..5be433c 100755
--- a/src/main/java/org/testng/xml/Parser.java
+++ b/src/main/java/org/testng/xml/Parser.java
@@ -33,11 +33,11 @@ public class Parser {
   /** The default file name for the TestNG test suite if none is specified (testng.xml). */
   public static final String DEFAULT_FILENAME = "testng.xml";
 
-  private static final SuiteParser DEFAULT_FILE_PARSER = new SuiteXmlParser();
-  private static final List<SuiteParser> PARSERS = Lists.newArrayList(DEFAULT_FILE_PARSER);
+  private static final ISuiteParser DEFAULT_FILE_PARSER = new SuiteXmlParser();
+  private static final List<ISuiteParser> PARSERS = Lists.newArrayList(DEFAULT_FILE_PARSER);
   static {
-    ServiceLoader<SuiteParser> suiteParserLoader = ServiceLoader.load(SuiteParser.class);
-    for (SuiteParser parser : suiteParserLoader) {
+    ServiceLoader<ISuiteParser> suiteParserLoader = ServiceLoader.load(ISuiteParser.class);
+    for (ISuiteParser parser : suiteParserLoader) {
       PARSERS.add(parser);
     }
   }
@@ -116,7 +116,7 @@ public class Parser {
 //  }
 
   private static IFileParser getParser(String fileName) {
-    for (SuiteParser parser : PARSERS) {
+    for (ISuiteParser parser : PARSERS) {
       if (parser.accept(fileName)) {
         return parser;
       }
diff --git a/src/main/java/org/testng/xml/SuiteXmlParser.java b/src/main/java/org/testng/xml/SuiteXmlParser.java
index bfe0144..5f47188 100644
--- a/src/main/java/org/testng/xml/SuiteXmlParser.java
+++ b/src/main/java/org/testng/xml/SuiteXmlParser.java
@@ -3,11 +3,10 @@ package org.testng.xml;
 import org.testng.TestNGException;
 import org.xml.sax.SAXException;
 
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 
-public class SuiteXmlParser extends XMLParser<XmlSuite> implements SuiteParser {
+public class SuiteXmlParser extends XMLParser<XmlSuite> implements ISuiteParser {
 
   @Override
   public XmlSuite parse(String currentFile, InputStream inputStream, boolean loadClasses) {
diff --git a/src/main/java/org/testng/xml/dom/DomXmlParser.java b/src/main/java/org/testng/xml/dom/DomXmlParser.java
index 1ad59c2..f2513ef 100644
--- a/src/main/java/org/testng/xml/dom/DomXmlParser.java
+++ b/src/main/java/org/testng/xml/dom/DomXmlParser.java
@@ -1,6 +1,6 @@
 package org.testng.xml.dom;
 
-import org.testng.xml.SuiteParser;
+import org.testng.xml.ISuiteParser;
 import org.testng.xml.XMLParser;
 import org.testng.xml.XmlSuite;
 import org.w3c.dom.Document;
@@ -14,7 +14,7 @@ import javax.xml.xpath.XPathExpressionException;
 import java.io.IOException;
 import java.io.InputStream;
 
-public class DomXmlParser extends XMLParser<XmlSuite> implements SuiteParser {
+public class DomXmlParser extends XMLParser<XmlSuite> implements ISuiteParser {
   @Override
   public XmlSuite parse(String currentFile, InputStream inputStream, boolean loadClasses) {
     XmlSuite result = null;
diff --git a/src/main/resources/META-INF/services/org.testng.xml.SuiteParser b/src/main/resources/META-INF/services/org.testng.xml.ISuiteParser
similarity index 100%
rename from src/main/resources/META-INF/services/org.testng.xml.SuiteParser
rename to src/main/resources/META-INF/services/org.testng.xml.ISuiteParser

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git



More information about the pkg-java-commits mailing list