diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-05-07 18:16:48 +0600 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2012-05-08 21:02:54 +0600 |
commit | 54ce0edc38605421e91a660ccbacd8765a8e2a6d (patch) | |
tree | c425901f0d5d11101512dca95840aba81899e7a2 /sonar-duplications/src/main/java | |
parent | c4136d4e4ae8bac0c30a0c0cef8b5b4688565642 (diff) | |
download | sonarqube-54ce0edc38605421e91a660ccbacd8765a8e2a6d.tar.gz sonarqube-54ce0edc38605421e91a660ccbacd8765a8e2a6d.zip |
SONAR-3182 Remove unused code
Diffstat (limited to 'sonar-duplications/src/main/java')
-rw-r--r-- | sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java | 71 | ||||
-rw-r--r-- | sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java | 34 |
2 files changed, 0 insertions, 105 deletions
diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java deleted file mode 100644 index 7237e68d2e1..00000000000 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/AbstractLanguage.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ - -package net.sourceforge.pmd.cpd; - -import java.io.File; -import java.io.FilenameFilter; - -public abstract class AbstractLanguage implements Language { - private final Tokenizer tokenizer; - private final FilenameFilter fileFilter; - - public AbstractLanguage(Tokenizer tokenizer, String... extensions) { - this.tokenizer = tokenizer; - fileFilter = new ExtensionsFilter(extensions); - } - - /** - * @deprecated in 2.14, seems that not used in Sonar ecosystem - we don't scan directories. - */ - @Deprecated - public FilenameFilter getFileFilter() { - return fileFilter; - } - - public Tokenizer getTokenizer() { - return tokenizer; - } - - private static class ExtensionsFilter implements FilenameFilter { - private final String[] extensions; - - public ExtensionsFilter(String... extensions) { - this.extensions = new String[extensions.length]; - for (int i = 0; i < extensions.length; i++) { - this.extensions[i] = extensions[i].toUpperCase(); - } - } - - public boolean accept(File dir, String name) { - File file = new File(dir, name); - if (file.isDirectory()) { - return true; - } - String uppercaseName = name.toUpperCase(); - for (String extension : extensions) { - if (uppercaseName.endsWith(extension)) { - return true; - } - } - return false; - } - } -} diff --git a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java b/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java deleted file mode 100644 index 8fb352cfe84..00000000000 --- a/sonar-duplications/src/main/java/net/sourceforge/pmd/cpd/Language.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2008-2012 SonarSource - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ - -/** - * BSD-style license; for more info see http://pmd.sourceforge.net/license.html - */ -package net.sourceforge.pmd.cpd; - -import java.io.FilenameFilter; - -public interface Language { - - Tokenizer getTokenizer(); - - FilenameFilter getFileFilter(); - -} |