diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCLanguage.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCLanguage.java index 961a978b9f..7960fcce68 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCLanguage.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCLanguage.java @@ -1,8 +1,8 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ -package net.sourceforge.pmd.cpd; +package net.sourceforge.pmd.cpd; /** * Defines the Language module for Objective-C @@ -10,7 +10,8 @@ package net.sourceforge.pmd.cpd; public class ObjectiveCLanguage extends AbstractLanguage { /** - * Creates a new instance of {@link ObjectiveCLanguage} with the default extensions for Objective-C files. + * Creates a new instance of {@link ObjectiveCLanguage} with the default + * extensions for Objective-C files. */ public ObjectiveCLanguage() { super("Objective-C", "objectivec", new ObjectiveCTokenizer(), ".h", ".m"); diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizer.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizer.java index 78d7ef0d55..27dab7e2e5 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizer.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizer.java @@ -1,11 +1,14 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.cpd; import java.io.Reader; import java.io.StringReader; +import org.apache.commons.io.IOUtils; + import net.sourceforge.pmd.lang.LanguageRegistry; import net.sourceforge.pmd.lang.LanguageVersionHandler; import net.sourceforge.pmd.lang.TokenManager; @@ -13,8 +16,6 @@ import net.sourceforge.pmd.lang.ast.TokenMgrError; import net.sourceforge.pmd.lang.objectivec.ObjectiveCLanguageModule; import net.sourceforge.pmd.lang.objectivec.ast.Token; -import org.apache.commons.io.IOUtils; - /** * The Objective-C Tokenizer */ @@ -28,8 +29,9 @@ public class ObjectiveCTokenizer implements Tokenizer { LanguageVersionHandler languageVersionHandler = LanguageRegistry.getLanguage(ObjectiveCLanguageModule.NAME) .getDefaultVersion().getLanguageVersionHandler(); reader = new StringReader(buffer.toString()); - TokenManager tokenManager = languageVersionHandler.getParser( - languageVersionHandler.getDefaultParserOptions()).getTokenManager(sourceCode.getFileName(), reader); + TokenManager tokenManager = languageVersionHandler + .getParser(languageVersionHandler.getDefaultParserOptions()) + .getTokenManager(sourceCode.getFileName(), reader); Token currentToken = (Token) tokenManager.getNextToken(); while (currentToken.image.length() > 0) { tokenEntries.add(new TokenEntry(currentToken.image, sourceCode.getFileName(), currentToken.beginLine)); diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java index dc19effdff..5a7f13e215 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCHandler.java @@ -1,6 +1,7 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.lang.objectivec; import net.sourceforge.pmd.lang.AbstractLanguageVersionHandler; diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.java index 37c53819d5..30e9ccdb3c 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCLanguageModule.java @@ -1,6 +1,7 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.lang.objectivec; import net.sourceforge.pmd.lang.BaseLanguageModule; @@ -16,7 +17,8 @@ public class ObjectiveCLanguageModule extends BaseLanguageModule { public static final String TERSE_NAME = "objectivec"; /** - * Creates a new instance of {@link ObjectiveCLanguageModule} with the default file extensions for Objective-C. + * Creates a new instance of {@link ObjectiveCLanguageModule} with the + * default file extensions for Objective-C. */ public ObjectiveCLanguageModule() { super(NAME, null, TERSE_NAME, null, "h", "m"); diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.java index 6e1b87ee3e..fcc042bdab 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCParser.java @@ -1,6 +1,7 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.lang.objectivec; import java.io.Reader; @@ -20,7 +21,9 @@ public class ObjectiveCParser extends AbstractParser { /** * Creates a new Objective-C Parser. - * @param parserOptions the options + * + * @param parserOptions + * the options */ public ObjectiveCParser(ParserOptions parserOptions) { super(parserOptions); diff --git a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.java b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.java index 79942c43c4..9190e673be 100644 --- a/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.java +++ b/pmd-objectivec/src/main/java/net/sourceforge/pmd/lang/objectivec/ObjectiveCTokenManager.java @@ -1,6 +1,7 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.lang.objectivec; import java.io.Reader; @@ -17,7 +18,9 @@ public class ObjectiveCTokenManager implements TokenManager { /** * Creates a new Objective-C Token Manager from the given source code. - * @param source the source code + * + * @param source + * the source code */ public ObjectiveCTokenManager(Reader source) { tokenManager = new ObjectiveCParserTokenManager(new SimpleCharStream(source)); diff --git a/pmd-objectivec/src/test/java/net/sourceforge/pmd/LanguageVersionTest.java b/pmd-objectivec/src/test/java/net/sourceforge/pmd/LanguageVersionTest.java index 5eb0673b03..20f0472faa 100644 --- a/pmd-objectivec/src/test/java/net/sourceforge/pmd/LanguageVersionTest.java +++ b/pmd-objectivec/src/test/java/net/sourceforge/pmd/LanguageVersionTest.java @@ -1,17 +1,18 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd; import java.util.Arrays; import java.util.Collection; +import org.junit.runners.Parameterized.Parameters; + import net.sourceforge.pmd.lang.LanguageRegistry; import net.sourceforge.pmd.lang.LanguageVersion; import net.sourceforge.pmd.lang.objectivec.ObjectiveCLanguageModule; -import org.junit.runners.Parameterized.Parameters; - public class LanguageVersionTest extends AbstractLanguageVersionTest { public LanguageVersionTest(String name, String terseName, String version, LanguageVersion expected) { @@ -20,8 +21,7 @@ public class LanguageVersionTest extends AbstractLanguageVersionTest { @Parameters public static Collection data() { - return Arrays.asList(new Object[][] { - { ObjectiveCLanguageModule.NAME, ObjectiveCLanguageModule.TERSE_NAME, "", LanguageRegistry.getLanguage(ObjectiveCLanguageModule.NAME).getDefaultVersion() } - }); + return Arrays.asList(new Object[][] { { ObjectiveCLanguageModule.NAME, ObjectiveCLanguageModule.TERSE_NAME, "", + LanguageRegistry.getLanguage(ObjectiveCLanguageModule.NAME).getDefaultVersion(), }, }); } } diff --git a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizerTest.java b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizerTest.java index 097f28a221..2013927abc 100644 --- a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizerTest.java +++ b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/ObjectiveCTokenizerTest.java @@ -1,16 +1,16 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.cpd; import java.io.IOException; -import net.sourceforge.pmd.testframework.AbstractTokenizerTest; - import org.apache.commons.io.IOUtils; import org.junit.Before; import org.junit.Test; +import net.sourceforge.pmd.testframework.AbstractTokenizerTest; public class ObjectiveCTokenizerTest extends AbstractTokenizerTest { @@ -25,8 +25,8 @@ public class ObjectiveCTokenizerTest extends AbstractTokenizerTest { @Override public String getSampleCode() throws IOException { - return IOUtils.toString(ObjectiveCTokenizer.class.getResourceAsStream(FILENAME)); - } + return IOUtils.toString(ObjectiveCTokenizer.class.getResourceAsStream(FILENAME)); + } @Test public void tokenizeTest() throws IOException { diff --git a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UTF8EscapesInStringLiteralObjCTokenizerTest.java b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UTF8EscapesInStringLiteralObjCTokenizerTest.java index bd3d87d930..e5067e5f8b 100644 --- a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UTF8EscapesInStringLiteralObjCTokenizerTest.java +++ b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UTF8EscapesInStringLiteralObjCTokenizerTest.java @@ -1,16 +1,16 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.cpd; import java.io.IOException; -import net.sourceforge.pmd.testframework.AbstractTokenizerTest; - import org.apache.commons.io.IOUtils; import org.junit.Before; import org.junit.Test; +import net.sourceforge.pmd.testframework.AbstractTokenizerTest; //Tests if the ObjectiveC tokenizer supports UTF-8 escapes in string literals public class UTF8EscapesInStringLiteralObjCTokenizerTest extends AbstractTokenizerTest { diff --git a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UnicodeObjectiveCTokenizerTest.java b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UnicodeObjectiveCTokenizerTest.java index 8a58e34179..7418a99b49 100644 --- a/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UnicodeObjectiveCTokenizerTest.java +++ b/pmd-objectivec/src/test/java/net/sourceforge/pmd/cpd/UnicodeObjectiveCTokenizerTest.java @@ -1,16 +1,16 @@ /** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ + package net.sourceforge.pmd.cpd; import java.io.IOException; -import net.sourceforge.pmd.testframework.AbstractTokenizerTest; - import org.apache.commons.io.IOUtils; import org.junit.Before; import org.junit.Test; +import net.sourceforge.pmd.testframework.AbstractTokenizerTest; //Tests if the ObjectiveC tokenizer supports identifiers with unicode characters public class UnicodeObjectiveCTokenizerTest extends AbstractTokenizerTest {