check(logger, filters);
}
- private void check(Logger logger, ResourceFilter[] filters) {
+ private static void check(Logger logger, ResourceFilter[] filters) {
if (filters.length > 0) {
logger.warn("ResourceFilters are not supported since version 4.2: " + Joiner.on(", ").join(filters));
}
writer.writeActiveRules(activeRuleMessages);
}
- private class ToMessage implements Function<ActiveRule, BatchReport.ActiveRule> {
+ private static class ToMessage implements Function<ActiveRule, BatchReport.ActiveRule> {
private final BatchReport.ActiveRule.Builder builder = BatchReport.ActiveRule.newBuilder();
@Override
def.addFiles(explodedPlugin.getLibs());
def.addMainClass(info.getKey(), info.getMainClass());
- for (String defaultSharedResource : DEFAULT_SHARED_RESOURCES) {
- def.getExportMask().addInclusion(String.format("%s/%s/api/", defaultSharedResource, info.getKey()));
- }
+ for (String defaultSharedResource : DEFAULT_SHARED_RESOURCES) {
+ def.getExportMask().addInclusion(String.format("%s/%s/api/", defaultSharedResource, info.getKey()));
+ }
// The plugins that extend other plugins can only add some files to classloader.
// They can't change metadata like ordering strategy or compatibility mode.
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.core.persistence;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
--- /dev/null
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube 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.
+ *
+ * SonarQube 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 this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+@ParametersAreNonnullByDefault
+package org.sonar.core.properties;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
return toUsers(dtos);
}
- private List<User> toUsers(Collection<UserDto> dtos) {
+ private static List<User> toUsers(Collection<UserDto> dtos) {
List<User> users = Lists.newArrayList();
for (UserDto dto : dtos) {
users.add(dto.toUser());
return copy(userDao.selectActiveUserByLogin(login));
}
- private User copy(@Nullable UserDto dto) {
+ private static User copy(@Nullable UserDto dto) {
if (dto != null) {
User user = new User().setEmail(dto.getEmail()).setLogin(dto.getLogin()).setName(dto.getName());
user.setId(dto.getId().intValue());
}
}
- private Set<ResourceDto> collectAllModules(long projectId, String stringToReplace, ResourceKeyUpdaterMapper mapper) {
+ private static Set<ResourceDto> collectAllModules(long projectId, String stringToReplace, ResourceKeyUpdaterMapper mapper) {
ResourceDto project = mapper.selectProject(projectId);
Set<ResourceDto> modules = Sets.newHashSet();
if (project.getKey().contains(stringToReplace)) {
import java.util.Map.Entry;
import java.util.Properties;
import javax.annotation.CheckForNull;
-import javax.annotation.Nullable;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.CoreProperties;
}
protected final ProfileExporter setSupportedLanguages(String... languages) {
- supportedLanguages = (languages != null) ? languages : new String[0];
+ supportedLanguages = (languages != null ? languages : new String[0]);
return this;
}
}
protected final ProfileImporter setSupportedLanguages(String... languages) {
- supportedLanguages = ((languages != null) ? languages : new String[0]);
+ supportedLanguages = (languages != null ? languages : new String[0]);
return this;
}