@@ -188,8 +188,8 @@ public class XmlReportParser { | |||
} | |||
private boolean canBeIncludedInFileMetrics(SMInputCursor metricsCursor) throws ParseException, XMLStreamException { | |||
// skip class elements on 1.x xml format | |||
while (metricsCursor.getNext() != null && metricsCursor.getLocalName().equals("class")) { | |||
// skip class elements on 1.x xml format | |||
} | |||
return ParsingUtils.parseNumber(metricsCursor.getAttrValue("elements")) > 0; | |||
} |
@@ -119,8 +119,8 @@ public class TestSuiteParser implements XmlStreamHandler { | |||
setStackAndMessage(detail, childNode); | |||
} | |||
} | |||
// make sure we loop till the end of the elements cursor | |||
while (childNode.getNext() != null) { | |||
// make sure we loop till the end of the elements cursor | |||
} | |||
detail.setTimeMS(time.intValue()); | |||
detail.setStatus(status); |
@@ -125,7 +125,7 @@ public class CodeReader extends CodeBuffer { | |||
} | |||
/** | |||
* @see peekTo(EndMatcher matcher, Appendable appendable) | |||
* @deprecated use peekTo(EndMatcher matcher, Appendable appendable) | |||
*/ | |||
@Deprecated | |||
public final String peekTo(EndMatcher matcher) { | |||
@@ -135,7 +135,7 @@ public class CodeReader extends CodeBuffer { | |||
} | |||
/** | |||
* @see popTo(Matcher matcher, Appendable appendable) | |||
* @deprecated use popTo(Matcher matcher, Appendable appendable) | |||
*/ | |||
@Deprecated | |||
public final void popTo(EndMatcher matcher, Appendable appendable) { |
@@ -123,16 +123,16 @@ public final class AnnotationCheckFactory extends CheckFactory { | |||
field.setByte(check, Byte.parseByte(value)); | |||
} else if (field.getType().equals(Integer.class)) { | |||
field.set(check, new Integer(Integer.parseInt(value))); | |||
field.set(check, Integer.parseInt(value)); | |||
} else if (field.getType().equals(Long.class)) { | |||
field.set(check, new Long(Long.parseLong(value))); | |||
field.set(check, Long.parseLong(value)); | |||
} else if (field.getType().equals(Double.class)) { | |||
field.set(check, new Double(Double.parseDouble(value))); | |||
field.set(check, Double.parseDouble(value)); | |||
} else if (field.getType().equals(Boolean.class)) { | |||
field.set(check, Boolean.valueOf(Boolean.parseBoolean(value))); | |||
field.set(check, Boolean.parseBoolean(value)); | |||
} else { | |||
throw new SonarException("The type of the field " + field + " is not supported: " + field.getType()); |
@@ -77,7 +77,7 @@ public class RangeDistributionBuilder implements MeasureBuilder { | |||
} | |||
if (onlyInts) { | |||
for (int i=0 ; i<bottomLimits.length ; i++) { | |||
bottomLimits[i] = new Integer(bottomLimits[i].intValue()); | |||
bottomLimits[i] = bottomLimits[i].intValue(); | |||
} | |||
} | |||
} |
@@ -64,6 +64,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
* @deprecated since 2.6 - ProjectFileSystem should be immutable | |||
* See http://jira.codehaus.org/browse/SONAR-2126 | |||
*/ | |||
@Deprecated | |||
ProjectFileSystem addSourceDir(File dir); | |||
/** | |||
@@ -78,6 +79,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
* @deprecated since 2.6 - ProjectFileSystem should be immutable | |||
* See http://jira.codehaus.org/browse/SONAR-2126 | |||
*/ | |||
@Deprecated | |||
ProjectFileSystem addTestDir(File dir); | |||
/** | |||
@@ -100,7 +102,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
* Source files, excluding unit tests and files matching project exclusion patterns. | |||
* | |||
* @param langs language filter. Check all files, whatever their language, if null or empty. | |||
* @deprecated since 2.6 use {@link #mainFiles(Language...)} instead. | |||
* @deprecated since 2.6 use {@link #mainFiles(String...)} instead. | |||
* See http://jira.codehaus.org/browse/SONAR-2126 | |||
*/ | |||
@Deprecated | |||
@@ -109,7 +111,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
/** | |||
* Java source files, excluding unit tests and files matching project exclusion patterns. Shortcut for getSourceFiles(Java.INSTANCE) | |||
* | |||
* @deprecated since 2.6 use {@link #mainFiles(Language...)} instead. | |||
* @deprecated since 2.6 use {@link #mainFiles(String...)} instead. | |||
* See http://jira.codehaus.org/browse/SONAR-2126 | |||
*/ | |||
@Deprecated | |||
@@ -126,7 +128,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
/** | |||
* Unit test files, excluding files matching project exclusion patterns. | |||
* | |||
* @deprecated since 2.6 use {@link #testFiles(Language...)} instead. | |||
* @deprecated since 2.6 use {@link #testFiles(String...)} instead. | |||
* See http://jira.codehaus.org/browse/SONAR-2126 | |||
*/ | |||
@Deprecated | |||
@@ -160,7 +162,7 @@ public interface ProjectFileSystem extends BatchComponent { | |||
List<InputFile> mainFiles(String... langs); | |||
/** | |||
* TODO comment me | |||
* Source files of unit tests. Exclusion patterns are not applied. | |||
* | |||
* @param langs language filter. If null or empty, will return empty list | |||
* @since 2.6 |
@@ -234,10 +234,6 @@ public final class JRubyFacade implements ServerComponent { | |||
getAsyncMeasuresService().deleteMeasure(asyncMeasureId); | |||
} | |||
private DefaultRulesManager getRulesManager() { | |||
return getContainer().getComponent(DefaultRulesManager.class); | |||
} | |||
private ProfilesManager getProfilesManager() { | |||
return getContainer().getComponent(ProfilesManager.class); | |||
} |
@@ -141,6 +141,7 @@ public class ResourceQuery extends Query<Resource> { | |||
* @param ruleCategories values: Maintainability, Usability, Reliability, Efficiency, Portability | |||
* @deprecated since 2.5 See http://jira.codehaus.org/browse/SONAR-2007 | |||
*/ | |||
@Deprecated | |||
public ResourceQuery setRuleCategories(String... ruleCategories) { | |||
return this; | |||
} | |||
@@ -190,6 +191,7 @@ public class ResourceQuery extends Query<Resource> { | |||
/** | |||
* @deprecated since 2.5 not used anymore | |||
*/ | |||
@Deprecated | |||
public boolean isExcludeRuleCategories() { | |||
return false; | |||
} | |||
@@ -197,6 +199,7 @@ public class ResourceQuery extends Query<Resource> { | |||
/** | |||
* @deprecated since 2.5 not used anymore | |||
*/ | |||
@Deprecated | |||
public ResourceQuery setExcludeRuleCategories(boolean b) { | |||
return this; | |||
} |