java.lang APIs
Categories
Composite Recipes
Recipes that include further recipes, often including the individual recipes below.
Recipes
- Prefer
String.formatted(Object...)
- Replace
0 < s.length()
with!s.isEmpty()
- Replace
String.indexOf(String, 0)
withString.indexOf(String)
- Replace
String.indexOf(char, 0)
withString.indexOf(char)
- Replace
Thread.resume()
,Thread.stop()
, andThread.suspend()
withthrow new UnsupportedOperationException()
- Replace lower and upper case
String
comparisons withString.equalsIgnoreCase(String)
- Replace redundant
String
method calls with self - Use
Character#isJavaIdentifierPart(char)
- Use
Character#isJavaIdentifierStart(char)
- Use
Character#isWhitespace(char)
- Use
Class#getDeclaredConstructor().newInstance()
- Use
ClassLoader#defineClass(String, byte[], int, int)
- Use
Runtime.Version#feature()
- Use
Runtime.Version#interim()
- Use
Runtime.Version#update()
- Use
SecurityManager#checkMulticast(InetAddress)
- Use text blocks