Merge "Delete pointer sized fields" into lmp-mr1-dev
diff --git a/luni/src/main/java/libcore/net/MimeUtils.java b/luni/src/main/java/libcore/net/MimeUtils.java
index a5a1469..125ea87 100644
--- a/luni/src/main/java/libcore/net/MimeUtils.java
+++ b/luni/src/main/java/libcore/net/MimeUtils.java
@@ -259,8 +259,9 @@
add("image/ico", "cur");
add("image/ico", "ico");
add("image/ief", "ief");
- add("image/jpeg", "jpeg");
+ // add ".jpg" first so it will be the default for guessExtensionFromMimeType
add("image/jpeg", "jpg");
+ add("image/jpeg", "jpeg");
add("image/jpeg", "jpe");
add("image/pcx", "pcx");
add("image/png", "png");
diff --git a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
index 4681877..ff055b2 100644
--- a/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
+++ b/luni/src/test/java/libcore/javax/net/ssl/SSLSocketTest.java
@@ -1667,6 +1667,10 @@
server.startHandshake();
fail("Should result in inappropriate fallback");
} catch (SSLHandshakeException expected) {
+ Throwable cause = expected.getCause();
+ assertEquals(SSLProtocolException.class, cause.getClass());
+ assertTrue(cause.getMessage(),
+ cause.getMessage().contains("inappropriate fallback"));
}
return null;
}
@@ -1679,6 +1683,10 @@
client.startHandshake();
fail("Should receive TLS alert inappropriate fallback");
} catch (SSLHandshakeException expected) {
+ Throwable cause = expected.getCause();
+ assertEquals(SSLProtocolException.class, cause.getClass());
+ assertTrue(cause.getMessage(),
+ cause.getMessage().contains("inappropriate fallback"));
}
return null;
}
diff --git a/luni/src/test/java/libcore/net/MimeUtilsTest.java b/luni/src/test/java/libcore/net/MimeUtilsTest.java
index 36476e9..9bfb375 100644
--- a/luni/src/test/java/libcore/net/MimeUtilsTest.java
+++ b/luni/src/test/java/libcore/net/MimeUtilsTest.java
@@ -42,4 +42,8 @@
assertEquals("png", MimeUtils.guessExtensionFromMimeType("image/png"));
assertEquals("zip", MimeUtils.guessExtensionFromMimeType("application/zip"));
}
+
+ public void test_18390752() {
+ assertEquals("jpg", MimeUtils.guessExtensionFromMimeType("image/jpeg"));
+ }
}