Bug 1476552 - GeckoSession::WebResponseInfo Kotlin annotations and static r=sebastian
authorRaynald Mirville <raynald.mirville@gmail.com>
Tue, 28 Aug 2018 13:02:23 +0000
changeset 488666 a2e7223d34fcb8eefedf5aa303ad9f0b9fe9b5e0
parent 488665 6f6eab842feaf00a38653dd4405aca1ec4d075db
child 488667 684d84410d7f92e221ae395959bb7b7d5da33a94
push id9734
push usershindli@mozilla.com
push dateThu, 30 Aug 2018 12:18:07 +0000
treeherdermozilla-beta@71c71ab3afae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1476552
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1476552 - GeckoSession::WebResponseInfo Kotlin annotations and static r=sebastian MozReview-Commit-ID: 1HWEStKaGVl Bug 1476552 part 1 - Add @NonNull/@Nullable annotations to GeckoSession::WebResponseInfo for Kotlin interoperability Bug 1476552 part 2 - Make GeckoSession::WebResponseInfo static MozReview-Commit-ID: 4ce92G7i2nz Differential Revision: https://phabricator.services.mozilla.com/D2885
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/GeckoSession.java
@@ -2064,37 +2064,37 @@ public class GeckoSession extends LayerS
             return ContentDelegate.ELEMENT_TYPE_AUDIO;
         }
         return ContentDelegate.ELEMENT_TYPE_NONE;
     }
 
     /**
      * WebResponseInfo contains information about a single web response.
      */
-    public class WebResponseInfo {
+    static public class WebResponseInfo {
         /**
          * The URI of the response. Cannot be null.
          */
-        public final String uri;
+        @NonNull public final String uri;
 
         /**
          * The content type (mime type) of the response. May be null.
          */
-        public final String contentType;
+        @Nullable public final String contentType;
 
         /**
          * The content length of the response. May be 0 if unknokwn.
          */
-        public final long contentLength;
+        @Nullable public final long contentLength;
 
         /**
          * The filename obtained from the content disposition, if any.
          * May be null.
          */
-        public final String filename;
+        @Nullable public final String filename;
 
         /* package */ WebResponseInfo(GeckoBundle message) {
             uri = message.getString("uri");
             if (uri == null) {
                 throw new IllegalArgumentException("URI cannot be null");
             }
 
             contentType = message.getString("contentType");