Bug 1287946 - Move Java bindings to mozilla::java namespace; r=snorp
☠☠ backed out by de1db0ba27a7 ☠ ☠
authorJim Chen <nchen@mozilla.com>
Thu, 21 Jul 2016 00:42:25 -0400
changeset 346044 0cf61343793a9036528cebc3524a52f718ef0ba4
parent 346043 d8a07729a34c30f2a5138ef82a0615d4ea838a91
child 346045 684888aeee810cbf3ab28acdd4edb8e92d6cbc59
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1287946
milestone50.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 1287946 - Move Java bindings to mozilla::java namespace; r=snorp Currently, auto-generated Java bindings are in the mozilla::widget namespace, and that potentially conflicts with code under widget/android. Moving the bindings to mozilla::java avoids conflicts and makes it more clear that we're using Java bindings.
build/annotationProcessors/AnnotationProcessor.java
build/annotationProcessors/SDKProcessor.java
--- a/build/annotationProcessors/AnnotationProcessor.java
+++ b/build/annotationProcessors/AnnotationProcessor.java
@@ -52,36 +52,36 @@ public class AnnotationProcessor {
 
         headerFile.append(
                 "#ifndef " + getHeaderGuardName(HEADER_FILE) + "\n" +
                 "#define " + getHeaderGuardName(HEADER_FILE) + "\n" +
                 "\n" +
                 "#include \"mozilla/jni/Refs.h\"\n" +
                 "\n" +
                 "namespace mozilla {\n" +
-                "namespace widget {\n" +
+                "namespace java {\n" +
                 "\n");
 
         implementationFile.append(
                 "#include \"GeneratedJNIWrappers.h\"\n" +
                 "#include \"mozilla/jni/Accessors.h\"\n" +
                 "\n" +
                 "namespace mozilla {\n" +
-                "namespace widget {\n" +
+                "namespace java {\n" +
                 "\n");
 
         nativesFile.append(
                 "#ifndef " + getHeaderGuardName(NATIVES_FILE) + "\n" +
                 "#define " + getHeaderGuardName(NATIVES_FILE) + "\n" +
                 "\n" +
                 "#include \"GeneratedJNIWrappers.h\"\n" +
                 "#include \"mozilla/jni/Natives.h\"\n" +
                 "\n" +
                 "namespace mozilla {\n" +
-                "namespace widget {\n" +
+                "namespace java {\n" +
                 "\n");
 
         while (jarClassIterator.hasNext()) {
             generateClass(jarClassIterator.next());
         }
 
         implementationFile.append(
                 "} /* widget */\n" +
--- a/build/annotationProcessors/SDKProcessor.java
+++ b/build/annotationProcessors/SDKProcessor.java
@@ -72,27 +72,27 @@ public class SDKProcessor {
         StringBuilder headerFile = new StringBuilder(GENERATED_COMMENT);
         headerFile.append(
                 "#ifndef " + generatedFilePrefix + "_h__\n" +
                 "#define " + generatedFilePrefix + "_h__\n" +
                 "\n" +
                 "#include \"mozilla/jni/Refs.h\"\n" +
                 "\n" +
                 "namespace mozilla {\n" +
-                "namespace widget {\n" +
+                "namespace java {\n" +
                 "namespace sdk {\n" +
                 "\n");
 
         StringBuilder implementationFile = new StringBuilder(GENERATED_COMMENT);
         implementationFile.append(
                 "#include \"" + generatedFilePrefix + ".h\"\n" +
                 "#include \"mozilla/jni/Accessors.h\"\n" +
                 "\n" +
                 "namespace mozilla {\n" +
-                "namespace widget {\n" +
+                "namespace java {\n" +
                 "namespace sdk {\n" +
                 "\n");
 
         // Used to track the calls to the various class-specific initialisation functions.
         ClassLoader loader = null;
         try {
             loader = URLClassLoader.newInstance(new URL[] { new URL("file://" + sdkJar) },
                                                 SDKProcessor.class.getClassLoader());