title: Java - duplicate case label
body: <p>I found some time ago a function to replace polish characters in text with "normal" version of this character. I used this in some projects earlier without problems, but now, when i just copied it, this doesn't want to work. But when I try to compile old projects in the same IDE(IntelliJ IDEA 14.1.3) it is ok, but in new project it's giving me errors: </p>
  
  <pre><code>Error:(22, 17) java: duplicate case label
  </code></pre>
  
  <p>It happens for each case except first and default.
  Function code:</p>
  
  <pre><code>public static String polskieznaki(String s)
  {
      char[] tekst = s.toCharArray();
      s = "";
  
      for(int i=0; i&lt;tekst.length; i++)
      {
  
          switch(tekst[i])
  
          {
  
              case 'ą': tekst[i] = 'a'; break;
  
              case 'ć': tekst[i] = 'c'; break;
  
              case 'ę': tekst[i] = 'e'; break;
  
              case 'ó': tekst[i] = 'o'; break;
  
              case 'ś': tekst[i] = 's'; break;
  
              case 'ł': tekst[i] = 'l'; break;
  
              case 'ż': tekst[i] = 'z'; break;
  
              case 'ź': tekst[i] = 'z'; break;
  
              case 'ń': tekst[i] = 'n'; break;
  
              case 'Ą': tekst[i] = 'A'; break;
  
              case 'Ć': tekst[i] = 'C'; break;
  
              case 'Ę': tekst[i] = 'E'; break;
  
              case 'Ó': tekst[i] = 'O'; break;
  
              case 'Ś': tekst[i] = 'S'; break;
  
              case 'Ł': tekst[i] = 'L'; break;
  
              case 'Ż': tekst[i] = 'Z'; break;
  
              case 'Ź': tekst[i] = 'Z'; break;
  
              case 'Ń': tekst[i] = 'N'; break;
  
              default: break;
  
          }
          s += tekst[i];
  
      }
  
      return s;
  }
  </code></pre>
  
  <p>I would be grateful for any help.</p>