title: Rectangle rotation in java changes geometry in Java
body: <p>In my application I'm drawing spatial data from database after I convert them from SDO_GEOMETRY to java's Shape object. Everything works fine, my geometry from DB converts to shape (Rectangle2D) which is exactly what I need, but when I want to rotate this rectangle it also work but it converts my geometry from Rectangle2D to Path2D. Why is that so? What to do to rotate Rectangle2D shape to keep its shape?</p>
  
  <p>By the way, this is code I use for rotating and it doesn't seem to be a problem.</p>
  
  <pre><code>AffineTransform af = new AffineTransform();
      af.rotate(  Math.toRadians(45),
                  clickedCase.getBounds().getX() + clickedCase.getBounds().getWidth()/2,
                  clickedCase.getBounds().getY() + clickedCase.getBounds().getHeight()/2);
  
      Shape trShape = af.createTransformedShape(clickedCase);
  </code></pre>