MCPcopy Create free account
hub / github.com/spotbugs/spotbugs / oddInts

Method oddInts

spotbugsTestCases/src/java/January2006.java:14–21  ·  view source on GitHub ↗
(int min, int max)

Source from the content-addressed store, hash-verified

12 }
13
14 public static List<Integer> oddInts(int min, int max) {
15 List<Integer> lst = new LinkedList<Integer>();
16 for (int i = min; i <= max; i++)
17 lst.add(i);
18 for (int i = 2 * (min / 2) + 1; i <= max; i += 2)
19 lst.remove(i);
20 return lst;
21 }
22
23 public static void print(int a[]) {
24 System.out.println(Arrays.asList(a));

Callers

nothing calls this directly

Calls 2

addMethod · 0.65
removeMethod · 0.45

Tested by

no test coverage detected