title: Remainder operator on int causes java.util.Objects.requireNonNull?
body: <p>I'm trying to get as much performance as possible from some internal method.</p>
  
  <p>The Java code is:</p>
  
  <pre><code>List&lt;DirectoryTaxonomyWriter&gt; writers = Lists.newArrayList();
  private final int taxos = 4;
  
  [...]
  
  @Override
  public int getParent(final int globalOrdinal) throws IOException {
      final int bin = globalOrdinal % this.taxos;
      final int ordinalInBin = globalOrdinal / this.taxos;
      return this.writers.get(bin).getParent(ordinalInBin) * this.taxos + bin; //global parent
  }
  </code></pre>
  
  <p>In my profiler I saw there is 1% CPU spend in <code>java.util.Objects.requireNonNull</code>, but I don't even call that. When inspecting the bytecode, I saw this:</p>
  
  <pre><code> public getParent(I)I throws java/io/IOException 
     L0
      LINENUMBER 70 L0
      ILOAD 1
      ALOAD 0
      INVOKESTATIC java/util/Objects.requireNonNull (Ljava/lang/Object;)Ljava/lang/Object;
      POP
      BIPUSH 8
      IREM
      ISTORE 2
  </code></pre>
  
  <p>So the compiler generates this (useless?) check. I work on primitives, which cannot be <code>null</code> anyways, so why does the compiler generate this line? Is it a bug? Or 'normal' behaviour?</p>
  
  <p>(I might work around with a bitmask, but I'm just curious)</p>
  
  <p>[UPDATE]</p>
  
  <ol>
  <li><p>The operator seems to be having nothing to do with it (see answer below)</p></li>
  <li><p>Using the eclipse compiler (version 4.10) I get this more reasonable result:</p></li>
  </ol>
  
  <pre>
      public getParent(I)I throws java/io/IOException 
         L0
          LINENUMBER 77 L0
          ILOAD 1
          ICONST_4
          IREM
          ISTORE 2
         L1
          LINENUMBER 78 L
  </pre>
  
  <p>So that is more logical.</p>