From: Stephane Gamard Date: Thu, 21 Aug 2014 10:16:52 +0000 (+0200) Subject: fixing case sensitive issue on file X-Git-Tag: 4.5-RC1~131 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a477b1a1304443053b0b72a32aa536d26810e67;p=sonarqube.git fixing case sensitive issue on file --- diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDTO.java b/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDTO.java deleted file mode 100644 index 8b801a45b72..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDTO.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ -package org.sonar.server.search.action; - -import org.elasticsearch.action.ActionRequest; -import org.elasticsearch.client.Requests; -import org.sonar.core.persistence.Dto; -import org.sonar.server.search.Index; - -import java.util.ArrayList; -import java.util.List; - -public class DeleteDto extends IndexActionRequest { - - private final DTO dto; - - public DeleteDto(String indexType, DTO dto) { - super(indexType); - this.dto = dto; - } - - @Override - public String getKey() { - return dto.getKey().toString(); - } - - @Override - public Class getPayloadClass() { - return dto.getClass(); - } - - @Override - public List doCall(Index index) throws Exception { - List requests = new ArrayList(); - requests.add(Requests.deleteRequest(index.getIndexName()) - .id(dto.getKey().toString()) - .type(indexType)); - return requests; - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDto121.java b/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDto121.java new file mode 100644 index 00000000000..8b801a45b72 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/search/action/DeleteDto121.java @@ -0,0 +1,57 @@ +/* + * 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. + */ +package org.sonar.server.search.action; + +import org.elasticsearch.action.ActionRequest; +import org.elasticsearch.client.Requests; +import org.sonar.core.persistence.Dto; +import org.sonar.server.search.Index; + +import java.util.ArrayList; +import java.util.List; + +public class DeleteDto extends IndexActionRequest { + + private final DTO dto; + + public DeleteDto(String indexType, DTO dto) { + super(indexType); + this.dto = dto; + } + + @Override + public String getKey() { + return dto.getKey().toString(); + } + + @Override + public Class getPayloadClass() { + return dto.getClass(); + } + + @Override + public List doCall(Index index) throws Exception { + List requests = new ArrayList(); + requests.add(Requests.deleteRequest(index.getIndexName()) + .id(dto.getKey().toString()) + .type(indexType)); + return requests; + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDTO.java b/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDTO.java deleted file mode 100644 index c96c4a54bd7..00000000000 --- a/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDTO.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ -package org.sonar.server.search.action; - -import org.elasticsearch.action.ActionRequest; -import org.sonar.core.persistence.Dto; -import org.sonar.server.search.Index; - -import java.util.List; - -class UpsertDto extends IndexActionRequest { - - private final DTO dto; - - public UpsertDto(String indexType, DTO dto) { - super(indexType); - this.dto = dto; - } - - @Override - public String getKey() { - return dto.getKey().toString(); - } - - @Override - public Class getPayloadClass() { - return dto.getClass(); - } - - @Override - public List doCall(Index index) throws Exception { - return index.getNormalizer().normalize(dto); - } -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDto121.java b/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDto121.java new file mode 100644 index 00000000000..1e31a35d788 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/search/action/UpsertDto121.java @@ -0,0 +1,51 @@ +/* + * 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. + */ +package org.sonar.server.search.action; + +import org.elasticsearch.action.ActionRequest; +import org.sonar.core.persistence.Dto; +import org.sonar.server.search.Index; + +import java.util.List; + +public class UpsertDto extends IndexActionRequest { + + private final DTO dto; + + public UpsertDto(String indexType, DTO dto) { + super(indexType); + this.dto = dto; + } + + @Override + public String getKey() { + return dto.getKey().toString(); + } + + @Override + public Class getPayloadClass() { + return dto.getClass(); + } + + @Override + public List doCall(Index index) throws Exception { + return index.getNormalizer().normalize(dto); + } +}