Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 11600)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 11601)
@@ -1005,12 +1005,10 @@
 
     /**
-     * Adjusts the position of a node to lie on a segment (or a segment
-     * intersection).
+     * Adjusts the position of a node to lie on a segment (or a segment intersection).
      *
      * If one or more than two segments are passed, the node is adjusted
      * to lie on the first segment that is passed.
      *
-     * If two segments are passed, the node is adjusted to be at their
-     * intersection.
+     * If two segments are passed, the node is adjusted to be at their intersection.
      *
      * No action is taken if no segments are passed.
@@ -1020,54 +1018,64 @@
      */
     private static void adjustNode(Collection<Pair<Node, Node>> segs, Node n) {
-
         switch (segs.size()) {
         case 0:
             return;
         case 2:
-            // This computes the intersection between the two segments and adjusts the node position.
-            Iterator<Pair<Node, Node>> i = segs.iterator();
-            Pair<Node, Node> seg = i.next();
-            EastNorth pA = seg.a.getEastNorth();
-            EastNorth pB = seg.b.getEastNorth();
-            seg = i.next();
-            EastNorth pC = seg.a.getEastNorth();
-            EastNorth pD = seg.b.getEastNorth();
-
-            double u = det(pB.east() - pA.east(), pB.north() - pA.north(), pC.east() - pD.east(), pC.north() - pD.north());
-
-            // Check for parallel segments and do nothing if they are
-            // In practice this will probably only happen when a way has been duplicated
-
-            if (u == 0)
-                return;
-
-            // q is a number between 0 and 1
-            // It is the point in the segment where the intersection occurs
-            // if the segment is scaled to lenght 1
-
-            double q = det(pB.north() - pC.north(), pB.east() - pC.east(), pD.north() - pC.north(), pD.east() - pC.east()) / u;
-            EastNorth intersection = new EastNorth(
-                    pB.east() + q * (pA.east() - pB.east()),
-                    pB.north() + q * (pA.north() - pB.north()));
-
-
-            // only adjust to intersection if within snapToIntersectionThreshold pixel of mouse click; otherwise
-            // fall through to default action.
-            // (for semi-parallel lines, intersection might be miles away!)
-            if (Main.map.mapView.getPoint2D(n).distance(Main.map.mapView.getPoint2D(intersection)) < SNAP_TO_INTERSECTION_THRESHOLD.get()) {
-                n.setEastNorth(intersection);
-                return;
-            }
+            adjustNodeTwoSegments(segs, n);
+            break;
         default:
-            EastNorth p = n.getEastNorth();
-            seg = segs.iterator().next();
-            pA = seg.a.getEastNorth();
-            pB = seg.b.getEastNorth();
-            double a = p.distanceSq(pB);
-            double b = p.distanceSq(pA);
-            double c = pA.distanceSq(pB);
-            q = (a - b + c) / (2*c);
-            n.setEastNorth(new EastNorth(pB.east() + q * (pA.east() - pB.east()), pB.north() + q * (pA.north() - pB.north())));
-        }
+            adjustNodeDefault(segs, n);
+        }
+    }
+
+    private static void adjustNodeTwoSegments(Collection<Pair<Node, Node>> segs, Node n) {
+        // This computes the intersection between the two segments and adjusts the node position.
+        Iterator<Pair<Node, Node>> i = segs.iterator();
+        Pair<Node, Node> seg = i.next();
+        EastNorth pA = seg.a.getEastNorth();
+        EastNorth pB = seg.b.getEastNorth();
+        seg = i.next();
+        EastNorth pC = seg.a.getEastNorth();
+        EastNorth pD = seg.b.getEastNorth();
+
+        double u = det(pB.east() - pA.east(), pB.north() - pA.north(), pC.east() - pD.east(), pC.north() - pD.north());
+
+        // Check for parallel segments and do nothing if they are
+        // In practice this will probably only happen when a way has been duplicated
+
+        if (u == 0)
+            return;
+
+        // q is a number between 0 and 1
+        // It is the point in the segment where the intersection occurs
+        // if the segment is scaled to length 1
+
+        double q = det(pB.north() - pC.north(), pB.east() - pC.east(), pD.north() - pC.north(), pD.east() - pC.east()) / u;
+        EastNorth intersection = new EastNorth(
+                pB.east() + q * (pA.east() - pB.east()),
+                pB.north() + q * (pA.north() - pB.north()));
+
+
+        // only adjust to intersection if within snapToIntersectionThreshold pixel of mouse click; otherwise
+        // fall through to default action.
+        // (for semi-parallel lines, intersection might be miles away!)
+        if (Main.map.mapView.getPoint2D(n).distance(Main.map.mapView.getPoint2D(intersection)) < SNAP_TO_INTERSECTION_THRESHOLD.get()) {
+            n.setEastNorth(intersection);
+            return;
+        }
+
+        adjustNodeDefault(segs, n);
+    }
+
+    private static void adjustNodeDefault(Collection<Pair<Node, Node>> segs, Node n) {
+        EastNorth p = n.getEastNorth();
+        Pair<Node, Node> seg = segs.iterator().next();
+        EastNorth pA = seg.a.getEastNorth();
+        EastNorth pB = seg.b.getEastNorth();
+        double a = p.distanceSq(pB);
+        double b = p.distanceSq(pA);
+        double c = pA.distanceSq(pB);
+        double q = (a - b + c) / (2*c);
+        n.setEastNorth(new EastNorth(pB.east() + q * (pA.east() - pB.east()), pB.north() + q * (pA.north() - pB.north())));
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 11600)
+++ /trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java	(revision 11601)
@@ -241,11 +241,16 @@
                 if (nw != null)
                     return nw;
+                if (se != null)
+                    return se;
+                return ne;
             case NW_INDEX:
                 if (se != null)
                     return se;
+                return ne;
             case SE_INDEX:
                 return ne;
-            }
-            return null;
+            default:
+                return null;
+            }
         }
 
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java	(revision 11600)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/LambertAzimuthalEqualArea.java	(revision 11601)
@@ -183,58 +183,62 @@
     @Override
     public double[] invproject(double x, double y) {
-        final double lambda, phi;
         switch (mode) {
             case EQUATORIAL: // Fall through
-            case OBLIQUE: {
-                x /= dd;
-                y *= dd;
-                final double rho = Math.hypot(x, y);
-                if (rho < FINE_EPSILON) {
-                    lambda = 0.0;
-                    phi = latitudeOfOrigin;
-                } else {
-                    double sCe, cCe, ab;
-                    sCe = 2.0 * Math.asin(0.5 * rho / rq);
-                    cCe = Math.cos(sCe);
-                    sCe = Math.sin(sCe);
-                    x *= sCe;
-                    if (mode == Mode.OBLIQUE) {
-                        ab = cCe * sinb1 + y * sCe * cosb1 / rho;
-                        y = rho * cosb1 * cCe - y * sinb1 * sCe;
-                    } else {
-                        ab = y * sCe / rho;
-                        y = rho * cCe;
-                    }
-                    lambda = Math.atan2(x, y);
-                    phi = authlat(Math.asin(ab));
-                }
-                break;
+            case OBLIQUE:
+                return invprojectEO(x, y);
+            case NORTH_POLE:
+                return invprojectNS(x, -y);
+            case SOUTH_POLE:
+                return invprojectNS(x, y);
+            default:
+                throw new AssertionError(mode);
+        }
+    }
+
+    private double[] invprojectEO(double x, double y) {
+        final double lambda;
+        final double phi;
+        x /= dd;
+        y *= dd;
+        final double rho = Math.hypot(x, y);
+        if (rho < FINE_EPSILON) {
+            lambda = 0.0;
+            phi = latitudeOfOrigin;
+        } else {
+            final double ab;
+            double sCe = 2.0 * Math.asin(0.5 * rho / rq);
+            double cCe = Math.cos(sCe);
+            sCe = Math.sin(sCe);
+            x *= sCe;
+            if (mode == Mode.OBLIQUE) {
+                ab = cCe * sinb1 + y * sCe * cosb1 / rho;
+                y = rho * cosb1 * cCe - y * sinb1 * sCe;
+            } else {
+                ab = y * sCe / rho;
+                y = rho * cCe;
             }
-            case NORTH_POLE: {
-                y = -y;
-                // Fall through
+            lambda = Math.atan2(x, y);
+            phi = authlat(Math.asin(ab));
+        }
+        return new double[] {phi, lambda};
+    }
+
+    private double[] invprojectNS(double x, double y) {
+        final double lambda;
+        final double phi;
+        final double q = x*x + y*y;
+        if (q == 0) {
+            lambda = 0.;
+            phi = latitudeOfOrigin;
+        } else {
+            double ab = 1.0 - q / qp;
+            if (mode == Mode.SOUTH_POLE) {
+                ab = -ab;
             }
-            case SOUTH_POLE: {
-                final double q = x*x + y*y;
-                if (q == 0) {
-                    lambda = 0.;
-                    phi = latitudeOfOrigin;
-                } else {
-                    double ab = 1.0 - q / qp;
-                    if (mode == Mode.SOUTH_POLE) {
-                        ab = -ab;
-                    }
-                    lambda = Math.atan2(x, y);
-                    phi = authlat(Math.asin(ab));
-                }
-                break;
-            }
-            default: {
-                throw new AssertionError(mode);
-            }
+            lambda = Math.atan2(x, y);
+            phi = authlat(Math.asin(ab));
         }
         return new double[] {phi, lambda};
     }
-
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 11600)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictResolverModel.java	(revision 11601)
@@ -385,4 +385,5 @@
                 if (relation.getMember(i).getMember() != newPrimitive)
                     return true;
+                break;
             case UNDECIDED:
                 // FIXME: handle error
