Index: /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 11293)
+++ /trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java	(revision 11294)
@@ -57,5 +57,5 @@
      * and on upload the object will be send to the server.
      */
-    protected static final int FLAG_MODIFIED = 1 << 0;
+    protected static final short FLAG_MODIFIED = 1 << 0;
 
     /**
@@ -63,5 +63,5 @@
      * as deleted on the server.
      */
-    protected static final int FLAG_VISIBLE = 1 << 1;
+    protected static final short FLAG_VISIBLE = 1 << 1;
 
     /**
@@ -72,5 +72,5 @@
      * objects still referring to it.
      */
-    protected static final int FLAG_DELETED = 1 << 2;
+    protected static final short FLAG_DELETED = 1 << 2;
 
     /**
@@ -79,5 +79,5 @@
      * fetched from the server.
      */
-    protected static final int FLAG_INCOMPLETE = 1 << 3;
+    protected static final short FLAG_INCOMPLETE = 1 << 3;
 
     /**
@@ -277,9 +277,9 @@
     /* ------*/
 
-    protected void updateFlags(int flag, boolean value) {
+    protected void updateFlags(short flag, boolean value) {
         if (value) {
             flags |= flag;
         } else {
-            flags &= ~flag;
+            flags &= (short) ~flag;
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11293)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 11294)
@@ -52,5 +52,5 @@
      * while the filter is active.
      */
-    protected static final int FLAG_DISABLED = 1 << 4;
+    protected static final short FLAG_DISABLED = 1 << 4;
 
     /**
@@ -63,15 +63,15 @@
      * unset as well (for efficient access).
      */
-    protected static final int FLAG_HIDE_IF_DISABLED = 1 << 5;
+    protected static final short FLAG_HIDE_IF_DISABLED = 1 << 5;
 
     /**
      * Flag used internally by the filter mechanism.
      */
-    protected static final int FLAG_DISABLED_TYPE = 1 << 6;
+    protected static final short FLAG_DISABLED_TYPE = 1 << 6;
 
     /**
      * Flag used internally by the filter mechanism.
      */
-    protected static final int FLAG_HIDDEN_TYPE = 1 << 7;
+    protected static final short FLAG_HIDDEN_TYPE = 1 << 7;
 
     /**
@@ -80,5 +80,5 @@
      * (e.g. one way street.)
      */
-    protected static final int FLAG_HAS_DIRECTIONS = 1 << 8;
+    protected static final short FLAG_HAS_DIRECTIONS = 1 << 8;
 
     /**
@@ -86,5 +86,5 @@
      * Some trivial tags like source=* are ignored here.
      */
-    protected static final int FLAG_TAGGED = 1 << 9;
+    protected static final short FLAG_TAGGED = 1 << 9;
 
     /**
@@ -93,5 +93,5 @@
      * (E.g. oneway=-1.)
      */
-    protected static final int FLAG_DIRECTION_REVERSED = 1 << 10;
+    protected static final short FLAG_DIRECTION_REVERSED = 1 << 10;
 
     /**
@@ -100,5 +100,5 @@
      * that the primitive is currently highlighted.
      */
-    protected static final int FLAG_HIGHLIGHTED = 1 << 11;
+    protected static final short FLAG_HIGHLIGHTED = 1 << 11;
 
     /**
@@ -106,5 +106,5 @@
      * Match the "work in progress" tags in default map style.
      */
-    protected static final int FLAG_ANNOTATED = 1 << 12;
+    protected static final short FLAG_ANNOTATED = 1 << 12;
 
     /**
@@ -396,10 +396,10 @@
     /* ------*/
 
-    private void updateFlagsNoLock(int flag, boolean value) {
+    private void updateFlagsNoLock(short flag, boolean value) {
         super.updateFlags(flag, value);
     }
 
     @Override
-    protected final void updateFlags(int flag, boolean value) {
+    protected final void updateFlags(short flag, boolean value) {
         boolean locked = writeLock();
         try {
@@ -440,5 +440,6 @@
         try {
             int oldFlags = flags;
-            updateFlagsNoLock(FLAG_DISABLED + FLAG_HIDE_IF_DISABLED, false);
+            updateFlagsNoLock(FLAG_DISABLED, false);
+            updateFlagsNoLock(FLAG_HIDE_IF_DISABLED, false);
             return oldFlags != flags;
         } finally {
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11293)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11294)
@@ -806,11 +806,11 @@
             LineMetrics metrics = text.font.getLineMetrics(s, frc);
             if (bs.vAlign == VerticalTextAlignment.ABOVE) {
-                y -= -box.y + metrics.getDescent();
+                y -= -box.y + (int) metrics.getDescent();
             } else if (bs.vAlign == VerticalTextAlignment.TOP) {
-                y -= -box.y - metrics.getAscent();
+                y -= -box.y - (int) metrics.getAscent();
             } else if (bs.vAlign == VerticalTextAlignment.CENTER) {
-                y += (metrics.getAscent() - metrics.getDescent()) / 2;
+                y += (int) ((metrics.getAscent() - metrics.getDescent()) / 2);
             } else if (bs.vAlign == VerticalTextAlignment.BELOW) {
-                y += box.y + box.height + metrics.getAscent() + 2;
+                y += box.y + box.height + (int) metrics.getAscent() + 2;
             } else throw new AssertionError();
         }
Index: /trunk/src/org/openstreetmap/josm/tools/MultiLineFlowLayout.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/MultiLineFlowLayout.java	(revision 11293)
+++ /trunk/src/org/openstreetmap/josm/tools/MultiLineFlowLayout.java	(revision 11294)
@@ -75,5 +75,5 @@
                     x += getHgap();
                 }
-                x += size.getWidth();
+                x += size.width;
                 if (x > containerWidth) {
                     totalHeight += rowHeight + getVgap();
