You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by li...@apache.org on 2012/05/01 22:38:25 UTC
git commit: Rename of a literal and one more test for
AnnotationInstanceProvider
Updated Branches:
refs/heads/master 318da67f5 -> c82837e3a
Rename of a literal and one more test for AnnotationInstanceProvider
Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/c82837e3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/c82837e3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/c82837e3
Branch: refs/heads/master
Commit: c82837e3a3b73ce71a614a12a1554ef613c1565a
Parents: 318da67
Author: Jason Porter <li...@apache.org>
Authored: Tue May 1 14:37:49 2012 -0600
Committer: Jason Porter <li...@apache.org>
Committed: Tue May 1 14:37:49 2012 -0600
----------------------------------------------------------------------
.../core/api/literal/RequestScopedLiteral.java | 30 +++++++++++++++
.../core/api/literal/RequestedScopeLiteral.java | 30 ---------------
.../metadata/AnnotationInstanceProviderTest.java | 9 ++++
3 files changed, 39 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/c82837e3/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestScopedLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestScopedLiteral.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestScopedLiteral.java
new file mode 100644
index 0000000..1f9b18a
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestScopedLiteral.java
@@ -0,0 +1,30 @@
+/*
+ * 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.deltaspike.core.api.literal;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.util.AnnotationLiteral;
+
+/**
+ * Literal for {@link RequestScoped}
+ */
+public class RequestScopedLiteral extends AnnotationLiteral<RequestScoped> implements RequestScoped
+{
+ private static final long serialVersionUID = -6365776352042023537L;
+}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/c82837e3/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestedScopeLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestedScopeLiteral.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestedScopeLiteral.java
deleted file mode 100644
index ae4da04..0000000
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/RequestedScopeLiteral.java
+++ /dev/null
@@ -1,30 +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 org.apache.deltaspike.core.api.literal;
-
-import javax.enterprise.context.RequestScoped;
-import javax.enterprise.util.AnnotationLiteral;
-
-/**
- * Literal for {@link RequestScoped}
- */
-public class RequestedScopeLiteral extends AnnotationLiteral<RequestScoped> implements RequestScoped
-{
- private static final long serialVersionUID = -6365776352042023537L;
-}
http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/c82837e3/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/metadata/AnnotationInstanceProviderTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/metadata/AnnotationInstanceProviderTest.java b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/metadata/AnnotationInstanceProviderTest.java
index 18c202c..377ff67 100644
--- a/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/metadata/AnnotationInstanceProviderTest.java
+++ b/deltaspike/core/api/src/test/java/org/apache/deltaspike/test/api/util/metadata/AnnotationInstanceProviderTest.java
@@ -308,4 +308,13 @@ public class AnnotationInstanceProviderTest
{
assertFalse(AnnotationInstanceProvider.of(Named.class).equals(""));
}
+
+ @Test
+ public void assertHashCodeSameAsLiteral()
+ {
+ Named a1 = AnnotationInstanceProvider.of(Named.class);
+ Named a2 = new NamedLiteral();
+
+ assertThat(a2.hashCode(), is(a1.hashCode()));
+ }
}