Yeikel

Results 184 issues of Yeikel

> Connections, streams, files, and other classes that implement the Closeable interface or its super-interface, AutoCloseable, needs to be closed after use. Further, that close call must be made in...

recipe

See https://rules.sonarsource.com/java/RSPEC-2168

recipe

https://rules.sonarsource.com/java/type/Bug/RSPEC-3655 See as well : https://github.com/openrewrite/rewrite-static-analysis/issues/58

recipe

See https://rules.sonarsource.com/java/RSPEC-1941

recipe

> While the ternary operator is pleasingly compact, its use can make code more difficult to read. It should therefore be avoided in favor of the more verbose if/else structure....

recipe

```java StringBuilder output = new StringBuilder(); var elements = List.of("A","B","C"); for (var i : elements){ output.append("A" + i); } ``` ```java StringBuilder output = new StringBuilder(); var elements = List.of("A","B","C");...

recipe

Before: ```java boolean isUser = x != null && x instanceof User; boolean isNotUser = y == null || !(y instanceof User); if(x != null && x instanceof User) {...

recipe

```java Optional longValue; Optional number; Optional doubleOtional; ``` ```java OptionalLong longValue; OptionalInt number; OptionalDouble doubleOtional; ``` Relevant : https://stackoverflow.com/questions/33190768/optionalint-vs-optionalinteger

recipe

See https://jira.sonarsource.com/browse/SONARJAVA-1018

recipe

```java Map map = new HashMap(); map.put("hello","world"); for (String key : map.keySet()){ String value = map.get(key); System.out.println("Key " + key + " value " + value); } ``` ```java Map...

recipe