From issues-return-92122-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Tue Apr 24 13:58:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9CE1F180671 for ; Tue, 24 Apr 2018 13:58:05 +0200 (CEST) Received: (qmail 63807 invoked by uid 500); 24 Apr 2018 11:58:04 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 63798 invoked by uid 500); 24 Apr 2018 11:58:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 63795 invoked by uid 99); 24 Apr 2018 11:58:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2018 11:58:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 319381A2178 for ; Tue, 24 Apr 2018 11:58:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id KgbN8xik5QI2 for ; Tue, 24 Apr 2018 11:58:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C144E5FC6F for ; Tue, 24 Apr 2018 11:58:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CD8C2E0F52 for ; Tue, 24 Apr 2018 11:58:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 23C75241D8 for ; Tue, 24 Apr 2018 11:58:01 +0000 (UTC) Date: Tue, 24 Apr 2018 11:58:01 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10363) Inconsistent "getXXX" and "listXXX" method names. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10363?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16449704#comment-16449704 ]=20 ASF GitHub Bot commented on CLOUDSTACK-10363: --------------------------------------------- BruceKuiLiu commented on issue #2599: CLOUDSTACK-10363: Change the "getXXX"= and "listXXX" method names to "=E2=80=A6 URL: https://github.com/apache/cloudstack/pull/2599#issuecomment-383904258 =20 =20 Hi @nitin-maharana , I think that #2600, #2061, #2602 can be classified into three different = changes. If it is necessary, I will merge them into one commit. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > Inconsistent "getXXX" and "listXXX" method names. > ------------------------------------------------- > > Key: CLOUDSTACK-10363 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-103= 63 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Reporter: KuiLIU > Priority: Major > > The following methods are not direct getter or list. > They try to find the target objects with the related arguments. > So that, renaming them as "findXXX" should be more intuitive. > {code:java} > //cloudstack/plugins/network-elements/ovs/src/main/java/com/cloud/network= /ovs/dao/OvsTunnelInterfaceDaoImpl.java > @Override > public OvsTunnelInterfaceVO getByHostAndLabel(long hostId, String lab= el) { > SearchCriteria sc =3D hostAndLabelSearch.cr= eate(); > sc.setParameters("host_id", hostId); > sc.setParameters("label", label); > return findOneBy(sc); > } > //cloudstack/services/secondary-storage/controller/src/main/java/org/apac= he/cloudstack/secondarystorage/PremiumSecondaryStorageManagerImpl.java > private List listActiveCommands(long dcId, Date cut= Time) { > SearchCriteria sc =3D activeCommandSearch.creat= e(); > sc.setParameters("created", cutTime); > sc.setJoinParameters("hostSearch", "dc", dcId); > sc.setJoinParameters("hostSearch", "status", Status.Up); > return _cmdExecLogDao.search(sc, null); > } > //cloudstack/framework/jobs/src/main/java/org/apache/cloudstack/framework= /jobs/impl/AsyncJobManagerImpl.java > private AsyncJobDispatcher getWakeupDispatcher(AsyncJob job) { > if (_jobDispatchers !=3D null) { > List joinRecords =3D _joinMapDao.listJoinR= ecords(job.getId()); > if (joinRecords.size() > 0) { > AsyncJobJoinMapVO joinRecord =3D joinRecords.get(0); > for (AsyncJobDispatcher dispatcher : _jobDispatchers) { > if (dispatcher.getName().equals(joinRecord.getWakeupD= ispatcher())) > return dispatcher; > } > } else { > s_logger.warn("job-" + job.getId() + " is scheduled for w= akeup run, but there is no joining info anymore"); > } > } > return null; > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)