You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by ch...@apache.org on 2014/12/30 06:29:02 UTC

[2/4] incubator-reef git commit: [REEF-81]: Rename com.example to org.apache.reef.tang.examples

[REEF-81]: Rename com.example to org.apache.reef.tang.examples

JIRA: [REEF-81](https://issues.apache.org/jira/browse/REEF-81)

Pull Request: Closes #39

Author:    Byung-Gon Chun <bg...@apache.org>

cherry-picking commit 56ec6b1.


Project: http://git-wip-us.apache.org/repos/asf/incubator-reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-reef/commit/e5e2a3b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-reef/tree/e5e2a3b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-reef/diff/e5e2a3b4

Branch: refs/heads/branch-0.10.0-incubating
Commit: e5e2a3b42aa268cbbbfe8f73883bd59afd788d5f
Parents: b1f9110
Author: Byung-Gon Chun <bg...@apache.org>
Authored: Sun Dec 28 15:01:42 2014 +0900
Committer: chobrian <ch...@apache.org>
Committed: Tue Dec 30 14:22:50 2014 +0900

----------------------------------------------------------------------
 .../src/main/java/com/example/A.java            | 23 ---------------
 .../java/org/apache/reef/tang/examples/A.java   | 23 +++++++++++++++
 .../src/main/java/com/example/A.java            | 25 ----------------
 .../src/main/java/com/example/B.java            | 25 ----------------
 .../java/org/apache/reef/tang/examples/A.java   | 25 ++++++++++++++++
 .../java/org/apache/reef/tang/examples/B.java   | 25 ++++++++++++++++
 .../src/main/java/com/example/B.java            | 23 ---------------
 .../java/org/apache/reef/tang/examples/B.java   | 23 +++++++++++++++
 .../org/apache/reef/tang/TestClassLoaders.java  | 30 ++++++++++----------
 9 files changed, 111 insertions(+), 111 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarA/src/main/java/com/example/A.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarA/src/main/java/com/example/A.java b/reef-tang/tang-test-jarA/src/main/java/com/example/A.java
deleted file mode 100644
index d070807..0000000
--- a/reef-tang/tang-test-jarA/src/main/java/com/example/A.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example;
-
-public class A {
-  int iAmAClass = 0;
-}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarA/src/main/java/org/apache/reef/tang/examples/A.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarA/src/main/java/org/apache/reef/tang/examples/A.java b/reef-tang/tang-test-jarA/src/main/java/org/apache/reef/tang/examples/A.java
new file mode 100644
index 0000000..2eb49cf
--- /dev/null
+++ b/reef-tang/tang-test-jarA/src/main/java/org/apache/reef/tang/examples/A.java
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.reef.tang.examples;
+
+public class A {
+  int iAmAClass = 0;
+}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarAB/src/main/java/com/example/A.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarAB/src/main/java/com/example/A.java b/reef-tang/tang-test-jarAB/src/main/java/com/example/A.java
deleted file mode 100644
index 2dbd86d..0000000
--- a/reef-tang/tang-test-jarAB/src/main/java/com/example/A.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example;
-
-import javax.inject.Inject;
-
-public class A {
-  @Inject public A() {}
-}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarAB/src/main/java/com/example/B.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarAB/src/main/java/com/example/B.java b/reef-tang/tang-test-jarAB/src/main/java/com/example/B.java
deleted file mode 100644
index b9d8cce..0000000
--- a/reef-tang/tang-test-jarAB/src/main/java/com/example/B.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example;
-
-import javax.inject.Inject;
-
-public class B extends A {
-  @Inject public B() { }
-}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/A.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/A.java b/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/A.java
new file mode 100644
index 0000000..7586c16
--- /dev/null
+++ b/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/A.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.reef.tang.examples;
+
+import javax.inject.Inject;
+
+public class A {
+  @Inject public A() {}
+}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/B.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/B.java b/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/B.java
new file mode 100644
index 0000000..991461f
--- /dev/null
+++ b/reef-tang/tang-test-jarAB/src/main/java/org/apache/reef/tang/examples/B.java
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.reef.tang.examples;
+
+import javax.inject.Inject;
+
+public class B extends A {
+  @Inject public B() { }
+}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarB/src/main/java/com/example/B.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarB/src/main/java/com/example/B.java b/reef-tang/tang-test-jarB/src/main/java/com/example/B.java
deleted file mode 100644
index 1282496..0000000
--- a/reef-tang/tang-test-jarB/src/main/java/com/example/B.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.example;
-
-public class B extends A {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang-test-jarB/src/main/java/org/apache/reef/tang/examples/B.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang-test-jarB/src/main/java/org/apache/reef/tang/examples/B.java b/reef-tang/tang-test-jarB/src/main/java/org/apache/reef/tang/examples/B.java
new file mode 100644
index 0000000..5b44ca7
--- /dev/null
+++ b/reef-tang/tang-test-jarB/src/main/java/org/apache/reef/tang/examples/B.java
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.reef.tang.examples;
+
+public class B extends A {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-reef/blob/e5e2a3b4/reef-tang/tang/src/test/java/org/apache/reef/tang/TestClassLoaders.java
----------------------------------------------------------------------
diff --git a/reef-tang/tang/src/test/java/org/apache/reef/tang/TestClassLoaders.java b/reef-tang/tang/src/test/java/org/apache/reef/tang/TestClassLoaders.java
index a3f238e..4394abb 100644
--- a/reef-tang/tang/src/test/java/org/apache/reef/tang/TestClassLoaders.java
+++ b/reef-tang/tang/src/test/java/org/apache/reef/tang/TestClassLoaders.java
@@ -36,7 +36,7 @@ public class TestClassLoaders {
         .getTang()
         .newConfigurationBuilder(
             new File("../tang-test-jarA/target/tang-test-jarA-1.0-SNAPSHOT.jar")
-                .toURI().toURL()).getClassHierarchy().getNode("com.example.A");
+                .toURI().toURL()).getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
 
   }
 
@@ -53,8 +53,8 @@ public class TestClassLoaders {
         .toURL());
     cbA.addConfiguration(cbB.build());
 
-    cbA.getClassHierarchy().getNode("com.example.A");
-    cbA.getClassHierarchy().getNode("com.example.B");
+    cbA.getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
+    cbA.getClassHierarchy().getNode("org.apache.reef.tang.examples.B");
 
     t.newInjector(cbA.build());
   }
@@ -71,8 +71,8 @@ public class TestClassLoaders {
         .toURL());
     cbA.addConfiguration(cbB.build());
 
-    cbA.getClassHierarchy().getNode("com.example.A");
-    cbA.getClassHierarchy().getNode("com.example.B");
+    cbA.getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
+    cbA.getClassHierarchy().getNode("org.apache.reef.tang.examples.B");
 
     t.newInjector(cbA.build());
   }
@@ -88,18 +88,18 @@ public class TestClassLoaders {
     JavaConfigurationBuilder cbA2 = t.newConfigurationBuilder(new File(
         "../tang-test-jarAB/target/tang-test-jarAB-1.0-SNAPSHOT.jar").toURI()
         .toURL());
-    cbA1.getClassHierarchy().getNode("com.example.A");
-    cbA1.bind("com.example.A", "com.example.B");
-    cbA2.bind("com.example.A", "com.example.B");
-    Object o = t.newInjector(cbA1.build()).getInstance("com.example.A");
-    Object p = t.newInjector(cbA2.build()).getInstance("com.example.A");
+    cbA1.getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
+    cbA1.bind("org.apache.reef.tang.examples.A", "org.apache.reef.tang.examples.B");
+    cbA2.bind("org.apache.reef.tang.examples.A", "org.apache.reef.tang.examples.B");
+    Object o = t.newInjector(cbA1.build()).getInstance("org.apache.reef.tang.examples.A");
+    Object p = t.newInjector(cbA2.build()).getInstance("org.apache.reef.tang.examples.A");
     Assert.assertSame(o.getClass(), p.getClass());
     JavaConfigurationBuilder cbAother = t.newConfigurationBuilder(new File(
         "../tang-test-jarA/target/tang-test-jarA-1.0-SNAPSHOT.jar").toURI()
         .toURL());
 
-    Assert.assertEquals(1, ((ClassNode<?>) (cbA1.getClassHierarchy().getNode("com.example.A"))).getInjectableConstructors().length);
-    Assert.assertEquals(0, ((ClassNode<?>) (cbAother.getClassHierarchy().getNode("com.example.A"))).getInjectableConstructors().length);
+    Assert.assertEquals(1, ((ClassNode<?>) (cbA1.getClassHierarchy().getNode("org.apache.reef.tang.examples.A"))).getInjectableConstructors().length);
+    Assert.assertEquals(0, ((ClassNode<?>) (cbAother.getClassHierarchy().getNode("org.apache.reef.tang.examples.A"))).getInjectableConstructors().length);
 
   }
 
@@ -111,8 +111,8 @@ public class TestClassLoaders {
     JavaConfigurationBuilder cbA1 = t.newConfigurationBuilder(new File(
         "../tang-test-jarAB/target/tang-test-jarAB-1.0-SNAPSHOT.jar").toURI()
         .toURL());
-    cbA1.bind("com.example.A", "com.example.B");
-    cbA1.getClassHierarchy().getNode("com.example.A");
-    t.newInjector(cbA1.build()).getInstance("com.example.B");
+    cbA1.bind("org.apache.reef.tang.examples.A", "org.apache.reef.tang.examples.B");
+    cbA1.getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
+    t.newInjector(cbA1.build()).getInstance("org.apache.reef.tang.examples.B");
   }
 }