Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 52E97200CCF for ; Mon, 10 Jul 2017 03:49:59 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 518FF167DBC; Mon, 10 Jul 2017 01:49:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7123F167DBB for ; Mon, 10 Jul 2017 03:49:58 +0200 (CEST) Received: (qmail 78663 invoked by uid 500); 10 Jul 2017 01:49:57 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 78647 invoked by uid 99); 10 Jul 2017 01:49:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jul 2017 01:49:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A65E5181294 for ; Mon, 10 Jul 2017 01:49:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.379 X-Spam-Level: *** X-Spam-Status: No, score=3.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 5x81fJEUrrr5 for ; Mon, 10 Jul 2017 01:49:50 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7DA27627DA for ; Mon, 10 Jul 2017 01:33:14 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id h22so49263422lfk.3 for ; Sun, 09 Jul 2017 18:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=U22cyVB6vSK2Tc7+4w+4diAHoevqtQPM/uR+P+eeVG8=; b=okrplifn6iqrvp+pd4v694/bfzPn0Xny3w1NnAObaXyaxdiezmWVPfJvxi1VS4sbRx OgDLuN7BaGO46yJL0zJG2RJP52FXruSZf9NTd3ZuiYMIw8wW3ra/8pHc+2PXnyYDQsWZ 3ENXSltuFanQhuzoczC0im1WUmxb+RWjVcYXzhlkeeXvGIze3yIJbHvjVWZS21F8/lC/ OiZ8NNc8QP+7yj3ay/33o0HkWP5pRD7D53ugYTzK0bhfxrU0efY+yHHHnTaJj5o1ltMh 4Z9ZKhZhP9yvHqtuQ3Ie5hoopwD2kYJ/Lv4AQ9ePCb/B/2+PZ6cBNcXESXn2+ffVmw6G gm7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=U22cyVB6vSK2Tc7+4w+4diAHoevqtQPM/uR+P+eeVG8=; b=rf7aJSMSOLUYbj4bV228Upe5ivaVyoNnqugGEkrmD9D2hVgO6avXZILlnOD0owrXZ4 h8YGOwznb8DNw1FhQDov1KlGbXKDamgvAnjtSq9BYSHNkfUebnC92gmLG2GenhTtU9aU EySnqeWjIfpEWrEVDabGRA3Y/kfPotbDac8uc/PK8+j4fXgKwTsUNeOArHlWKd4TUw+p 0U72KLtUl9mEDAz0hVU9WBtpDGClTIDUbDahHBA8m0TIAFCt5XdmSi7mH6IuhgpW2GiE por97sHmjGYvX2hPk0wEeJ0bvZVWPYwU3gOVSWa7fq7kvsUM1bzgk0gW6IWki1jZhssa PD0A== X-Gm-Message-State: AIVw113Sd3ILdi0qusmEL0uS+v3d7mQwsiTc3jqcHf51IwHwMDiPkk8d PfaFUWJNwgcT3Cu52ksBLYRAzs4xqQ== X-Received: by 10.25.229.2 with SMTP id c2mr396454lfh.52.1499650393700; Sun, 09 Jul 2017 18:33:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.56.65 with HTTP; Sun, 9 Jul 2017 18:33:12 -0700 (PDT) In-Reply-To: References: From: Matt Sicker Date: Sun, 9 Jul 2017 20:33:12 -0500 Message-ID: Subject: Re: [lang] Applying IntelliJ IDEA refactorings To: Commons Developers List Content-Type: multipart/alternative; boundary="001a113c457600fd070553ec9124" archived-at: Mon, 10 Jul 2017 01:49:59 -0000 --001a113c457600fd070553ec9124 Content-Type: text/plain; charset="UTF-8" I personally don't see the point of making a jira issue for it. On 9 July 2017 at 20:19, Jonathan Bluett-Duncan wrote: > Okay, thanks for the clarification Gary. > > Does this mean, by extension, that there's no need to create a new JIRA > issue? In other words, would just a new GitHub PR be fine (at least for > now)? > > Jonathan > > On 10 July 2017 at 01:32, Gary Gregory wrote: > > > I would think an ICLA is not needed if the only thing we are talking > about > > are clean-up style refactoring. > > > > Gary > > > > On Sun, Jul 9, 2017 at 2:27 PM, Jonathan Bluett-Duncan < > > jbluettduncan@gmail.com> wrote: > > > > > I've re-read the contribution guidelines > > > , > > but > > > it's not clear to me if my changes are non-trivial enough to warrant a > > new > > > JIRA issue. > > > > > > Can someone advise me on this? > > > > > > Jonathan > > > > > > On 6 July 2017 at 00:51, Jonathan Bluett-Duncan < > jbluettduncan@gmail.com > > > > > > wrote: > > > > > > > Okay, I don't intend to apply any `@SuppressWarnings` during my > > > > refactoring efforts - if IntelliJ still reports warnings after my > > > efforts, > > > > then I can live with that. :) > > > > > > > > Jonathan > > > > > > > > On 6 July 2017 at 00:31, Matt Sicker wrote: > > > > > > > >> The only thing I can think of that conflicts sometimes with IDEA > > versus > > > >> Eclipse are custom @SupressWarnings strings causing warnings in > > Eclipse. > > > >> The default IntelliJ warnings tend to be simple things that wouldn't > > > cause > > > >> an issue, however, based in my experience. It's only some of the > > > advanced > > > >> inspections that can get strange. > > > >> > > > >> On 5 July 2017 at 17:24, Jonathan Bluett-Duncan < > > > jbluettduncan@gmail.com> > > > >> wrote: > > > >> > > > >> > Great! Sounds like there's general agreement on me pursuing at > least > > > >> some > > > >> > of these refactorings, right? > > > >> > > > > >> > On the subject of code style guidelines, AFAIK [lang] uses > > Checkstyle > > > to > > > >> > check style adherence? So I assume that if the corresponding Maven > > > goal > > > >> > passes after a refactoring, then it's okay to submit it as a > GitHub > > > PR. > > > >> > > > > >> > I don't expect changes suggested by IDEA to cause warnings/errors > in > > > >> > Eclipse or for the Eclipse Java compiler either. Is there an > > automated > > > >> way > > > >> > to explicitly check for things like this through Apache's > > > >> infrastructure? > > > >> > Or would I need to manually download Eclipse and check on my > > machine? > > > >> > > > > >> > I've already created an Apache JIRA account and signed the CLA, > but > > > now > > > >> > it's not clear to me what to do next. Can someone kindly advise me > > on > > > >> the > > > >> > next step? > > > >> > > > > >> > Jonathan > > > >> > > > > >> > On 5 July 2017 at 20:33, Gary Gregory > > wrote: > > > >> > > > > >> > > Keep in mind that not all of us use IDEA. For example, I am on > > > >> Eclipse. I > > > >> > > do not think this should be an issue for any of these changes > > > thougg. > > > >> I > > > >> > do > > > >> > > not expect that changes from IDEA warnings would cause the > Eclipse > > > >> Java > > > >> > > compiler to issue warnings, and vice-versa. > > > >> > > > > > >> > > Gary > > > >> > > > > > >> > > On Jul 5, 2017 12:23, "Allon Mureinik" > > wrote: > > > >> > > > > > >> > > > I've submitted several such cleanups over the past couple of > > > month, > > > >> and > > > >> > > for > > > >> > > > the most part, they've been well received. > > > >> > > > > > > >> > > > I think the key here is to improve the codebase when possible > > but > > > to > > > >> > > leave > > > >> > > > room to deviate from IntelliJ's norms when there's a good > reason > > > to. > > > >> > > > Perhaps annotating such places with @SuppressWarning would be > > the > > > >> best > > > >> > > > approach, to signal to future developers that the warning was > > > >> > considered, > > > >> > > > and we explicitly decided to suppress it (possibly with a > > comment > > > in > > > >> > the > > > >> > > > code explaining why). > > > >> > > > > > > >> > > > > > > >> > > > On Wed, Jul 5, 2017 at 6:42 PM, Matt Sicker > > > > >> wrote: > > > >> > > > > > > >> > > > > I like the idea myself at least, though I'm not sure if it > > > >> conflicts > > > >> > > with > > > >> > > > > any coding styleguides established. > > > >> > > > > > > > >> > > > > On 4 July 2017 at 18:18, Jonathan Bluett-Duncan < > > > >> > > jbluettduncan@gmail.com > > > >> > > > > > > > >> > > > > wrote: > > > >> > > > > > > > >> > > > > > Hi all, > > > >> > > > > > > > > >> > > > > > I'm interested in going through commons-lang with IntelliJ > > > IDEA > > > >> and > > > >> > > > > > applying small refactorings to make the code base easier > to > > > read > > > >> > > and/or > > > >> > > > > > more performant (and also make IntelliJ IDEA itself report > > > less > > > >> > > > > warnings). > > > >> > > > > > > > > >> > > > > > Is this something that the [lang] team would find useful? > > > >> > > > > > > > > >> > > > > > Examples of refactorings that I could apply include: > > > >> > > > > > > > > >> > > > > > - Replace manual array-to-collection copy operations > with > > > >> > > > > > `Collections.addAll()`. > > > >> > > > > > - Replace simple `String{Buffer,Builder}` usages with > > > direct > > > >> > > > `String` > > > >> > > > > > concatenations or `String.format()`. > > > >> > > > > > - Simplifying boolean expressions like `obj instanceof > > > >> CharRange > > > >> > > == > > > >> > > > > > false` to `!(obj instanceof CharRange)`. > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > Cheers, > > > >> > > > > > Jonathan > > > >> > > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > -- > > > >> > > > > Matt Sicker > > > >> > > > > > > > >> > > > > > > >> > > > > > >> > > > > >> > > > >> > > > >> > > > >> -- > > > >> Matt Sicker > > > >> > > > > > > > > > > > > > > -- Matt Sicker --001a113c457600fd070553ec9124--