blob: 945c6a2ba42bc4c1447120cb204470f593e33f49 [file] [log] [blame]
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright 2010 Oracle and/or its affiliates. All rights reserved.
#
# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
# Other names may be trademarks of their respective owners.
#
# The contents of this file are subject to the terms of either the GNU
# General Public License Version 2 only ("GPL") or the Common
# Development and Distribution License("CDDL") (collectively, the
# "License"). You may not use this file except in compliance with the
# License. You can obtain a copy of the License at
# http://www.netbeans.org/cddl-gplv2.html
# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
# specific language governing permissions and limitations under the
# License. When distributing the software, include this License Header
# Notice in each file and include the License file at
# nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the GPL Version 2 section of the License file that
# accompanied this code. If applicable, add the following below the
# License Header, with the fields enclosed by brackets [] replaced by
# your own identifying information:
# "Portions Copyrighted [year] [name of copyright owner]"
#
# If you wish your version of this file to be governed by only the CDDL
# or only the GPL Version 2, indicate your decision by adding
# "[Contributor] elects to include this software in this distribution
# under the [CDDL or GPL Version 2] license." If you do not indicate a
# single choice of license, a recipient has the option to distribute
# your version of this file under either the CDDL, the GPL Version 2 or
# to extend the choice of license to its licensees as provided above.
# However, if you add GPL Version 2 code and therefore, elected the GPL
# Version 2 license, then the option applies only if the new code is
# made subject to such option by the copyright holder.
#
# Contributor(s):
#
# Portions Copyrighted 2010 Sun Microsystems, Inc.
#
DN_org.netbeans.modules.java.hints.perf.ManualArrayCopy=Manual array copy
DESC_org.netbeans.modules.java.hints.perf.ManualArrayCopy=Finds occurrences of manual array copying via for loop
ERR_manual-array-copy-coll=Manual array copy to Collection
FIX_manual-array-copy-coll=Replace with Collection.addAll(Arrays.asList(...))
ERR_manual-array-copy=Manual array copy
FIX_manual-array-copy=Replace with System.arraycopy
DN_org.netbeans.modules.java.hints.perf.SizeEqualsZero=Usage of .size() == 0
DESC_org.netbeans.modules.java.hints.perf.SizeEqualsZero=Use .isEmpty() or !.isEmpty() instead of .size() == 0 or .size() != 0 where possible.
ERR_SizeEqualsZero=Usage of .size() == 0 can be replaced with .isEmpty()
ERR_SizeEqualsZeroNeg=Usage of .size() != 0 can be replaced with !.isEmpty()
FIX_UseIsEmpty=Use .isEmpty() instead of .size() == 0
FIX_UseIsEmptyNeg=Use .isEmpty() instead of .size() != 0
CONF_LBL_SizeEqualsZero=Also check for .size() != 0
CONF_TP_SizeEqualsZero=Should this hint also report occurrences of ".size() != 0"?
DN_org.netbeans.modules.java.hints.perf.Tiny.stringConstructor=String constructor
DESC_org.netbeans.modules.java.hints.perf.Tiny.stringConstructor=Use of java.lang.String constructor is usually useless.
ERR_StringConstructor=String constructor invocation
FIX_StringConstructor=Remove String constructor invocation
CONF_LBL_SizeEqualsZero=Ignore String constructors containing invocations of String.substring
CONF_TP_SizeEqualsZero=Ignore String constructors containing invocations of java.lang.String.substring
DN_org.netbeans.modules.java.hints.perf.Tiny.stringEqualsEmpty=String.equals("")
DESC_org.netbeans.modules.java.hints.perf.Tiny.stringEqualsEmpty=Use of String.equals("") can be replaced with with String.length() == 0 (for JDK5 and lower) or String.isEmpty() (for JDK6 and higher)
ERR_StringEqualsEmpty=String equals empty string
FIX_StringEqualsEmpty=Change to String.length() == 0
FIX_StringEqualsEmptyNeg=Change to String.length() != 0
FIX_StringEqualsEmpty16=Change to String.isEmpty()
DN_org.netbeans.modules.java.hints.perf.StringBuffer2Builder=Useless use of StringBuffer
DESC_org.netbeans.modules.java.hints.perf.StringBuffer2Builder=Use StringBuilder instead of StringBuffer where possible.
ERR_StringBuffer2Builder=StringBuffer can be replaced with StringBuilder
FIX_StringBuffer2Builder=Replace with StringBuilder
DN_org.netbeans.modules.java.hints.perf.Tiny.lengthOneStringIndexOf=Length one String in String.indexOf
DESC_org.netbeans.modules.java.hints.perf.Tiny.lengthOneStringIndexOf=Length one String literal in String.indexOf can be replaced with a character literal
#the string:
ERR_LengthOneStringIndexOf=Length one string {0} in String.indexOf
FIX_LengthOneStringIndexOf=Replace with a character literal
DN_org.netbeans.modules.java.hints.perf.Tiny.getClassInsteadOfDotClass=.getClass() replaceable with .class
DESC_org.netbeans.modules.java.hints.perf.Tiny.getClassInsteadOfDotClass=Finds instantions of a class directly followed by invocation of .getClass() on the newly constructed object
ERR_GetClassInsteadOfDotClass=Invocation of .getClass() can be replaced with .class
FIX_GetClassInsteadOfDotClass=Replace invocation of .getClass() with .class
DN_org.netbeans.modules.java.hints.perf.Tiny.constantIntern=String.intern() called on constant
DESC_org.netbeans.modules.java.hints.perf.Tiny.constantIntern=Invocations of String.intern() on compile-time constants are superfluous.
ERR_ConstantIntern=Invoking String.intern() of a compile-time constant is superfluos
FIX_ConstantIntern=Remove invocation of String.intern()
DN_org.netbeans.modules.java.hints.perf.NoBooleanConstructor=Creating new Boolean
DESC_org.netbeans.modules.java.hints.perf.NoBooleanConstructor=Creating new Boolean is inefficient and typically useless.
ERR_NoBooleanConstructor=Creating new Boolean is inefficient
FIX_NoBooleanConstructorBoolean=Remove Boolean constructor invocation
FIX_NoBooleanConstructorString=Remove Boolean constructor invocation
DN_org.netbeans.modules.java.hints.perf.InitialCapacity.collections=Collections without initial capacity
DESC_org.netbeans.modules.java.hints.perf.InitialCapacity.collections=Looks for instatiations of collections with missing initial capacity. Only collections backed-up with an array are tested.
ERR_InitialCapacity_collections=Instantianting collection without specified initial capacity
DN_org.netbeans.modules.java.hints.perf.InitialCapacity.stringBuilder=StringBuilder without initial capacity
DESC_org.netbeans.modules.java.hints.perf.InitialCapacity.stringBuilder=Looks for instantiations of StringBuilder or StringBuffer with missing initial capacity.
ERR_InitialCapacity_stringBuilder=Instantianting StringBuilder or StringBuffer without specified capacity
DN_org.netbeans.modules.java.hints.perf.Tiny.enumSet=Set replaceable with EnumSet
DESC_org.netbeans.modules.java.hints.perf.Tiny.enumSet=Finds instantiations of Sets that can be replaced with EnumSet
DN_org.netbeans.modules.java.hints.perf.Tiny.enumMap=Map replaceable with EnumMap
DESC_org.netbeans.modules.java.hints.perf.Tiny.enumMap=Finds instantiations of Maps that can be replaced with EnumMap
ERR_Tiny_enumSet=Set can be replaced with java.util.EnumSet
ERR_Tiny_enumMap=Map can be replaced with java.util.EnumMap
FIX_Tiny_enumMap=Replace Map with java.util.EnumMap