commit | ed1d3feeaede2b1a71add2c4a71d9512641fd593 | [log] [tgz] |
---|---|---|
author | emcmanus <emcmanus@google.com> | Fri Nov 17 20:41:01 2017 |
committer | Ron Shapiro <shapiro.rd@gmail.com> | Mon Nov 20 16:11:09 2017 |
tree | d6fce1223de2b52cf4c88af93a8874adb86137f6 | |
parent | 4b17885c08595fff09c1e44cbfe637b9c129180d [diff] |
Only import java.util.Arrays if there are primitive-array properties. The previous check imported java.util.Arrays if there were arrays anywhere. This meant it was imported if for example a builder setter took a String[] argument to set an ImmutableList field. But we only need the import for the toString, equals, and hashCode methods, when there is a primitive-array property. Fixes https://github.com/google/auto/issues/373. RELNOTES=Fixed bug where java.util.Arrays was sometimes imported but not used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=176146371
A collection of source code generators for Java.
Java is full of code that is mechanical, repetitive, typically untested and sometimes the source of subtle bugs. Sounds like a job for robots!
The Auto subprojects are a collection of code generators that automate those types of tasks. They create the code you would have written, but without the bugs.
Save time. Save code. Save sanity.
AutoFactory - JSR-330-compatible factories
AutoService - Provider-configuration files for ServiceLoader
AutoValue - Immutable value-type code generation for Java 1.6+.
Common - Helper utilities for writing annotation processors.
Copyright 2013 Google, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.