blob: 4c0a57e12304d40e49703041e2bc619b9b9a07c8 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you 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.
#
# Signatures of APIs to avoid.
# Cribbed from Elasticsearch and Apache Calcite
java.lang.Character#codePointBefore(char[],int) @ Implicit start offset is error-prone when the char[] is a buffer and the first chars are random chars
java.lang.Character#codePointAt(char[],int) @ Implicit end offset is error-prone when the char[] is a buffer and the last chars are random chars
#@defaultMessage Only use wait / notify when really needed. Try to use concurrency primitives, latches or callbacks instead.
#java.lang.Object#wait()
#java.lang.Object#wait(long)
#java.lang.Object#wait(long,int)
#java.lang.Object#notify()
#java.lang.Object#notifyAll()
#@defaultMessage Use StringBuilder; it is more efficient
#java.lang.StringBuffer
@defaultMessage Please do not try to stop the world
java.lang.System#gc()
#@defaultMessage Please do not try to kill the world
#java.lang.System#exit(int)
#java.lang.Runtime#exit(int)
@defaultMessage Don't interrupt threads use FutureUtils#cancel(Future<T>) instead
java.util.concurrent.Future#cancel(boolean)
@defaultMessage Spawning processes is a potential security issue
java.lang.ProcessBuilder
java.lang.Runtime#exec(java.lang.String)
java.lang.Runtime#exec(java.lang.String[])
java.lang.Runtime#exec(java.lang.String, java.lang.String[])
java.lang.Runtime#exec(java.lang.String, java.lang.String[], java.io.File)
java.lang.Runtime#exec(java.lang.String[], java.lang.String[])
java.lang.Runtime#exec(java.lang.String[], java.lang.String[], java.io.File)
#@defaultMessage For an enum, use == rather than equals
#java.lang.Enum#equals(java.lang.Object)
# Preconditions.checkArgument,
# Preconditions.checkPositionIndex, and
# Preconditions.checkState are still OK
#@defaultMessage Use Objects.requireNonNull
#com.google.common.base.Preconditions#checkNotNull(java.lang.Object)
#com.google.common.base.Preconditions#checkNotNull(java.lang.Object, java.lang.Object)
@defaultMessage Use java.util.Objects.equals
com.google.common.base.Objects#equal(java.lang.Object, java.lang.Object)
#@defaultMessage Use java.util.Objects
#com.google.common.base.Objects
@defaultMessage Use java.lang.String.join
com.google.common.base.Joiner
# Remove Guava calls to construct empty collections;
# Sets.identityHashSet(),
# Sets.newHashSet(Iterable) are still OK
#@defaultMessage Use "new ArrayList<>()"
#com.google.common.collect.Lists#newArrayList()
@defaultMessage Use "new HashMap<>()"
com.google.common.collect.Maps#newHashMap()
@defaultMessage Use "new IdentityHashMap<>()"
com.google.common.collect.Maps#newIdentityHashMap()
@defaultMessage Use "new TreeMap<>()"
com.google.common.collect.Maps#newTreeMap()
@defaultMessage Use "new HashSet<>()"
com.google.common.collect.Sets#newHashSet()
@defaultMessage Fix the truststore instead of working around
org.apache.http.conn.ssl.TrustSelfSignedStrategy