You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/02/25 09:23:10 UTC
[2/2] git commit: stupid class naming MacOS problem
Updated Branches:
refs/heads/master bcdcc67fd -> 34dbbd5d7
stupid class naming MacOS problem
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/34dbbd5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/34dbbd5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/34dbbd5d
Branch: refs/heads/master
Commit: 34dbbd5d7d067f93144825f64ccc0401a51cd0a5
Parents: 3a4c531
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Mon Feb 25 09:22:59 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Mon Feb 25 09:22:59 2013 +0100
----------------------------------------------------------------------
.../marmotta/platform/core/util/CDIUtils.java | 44 +++++++++++++++
.../marmotta/platform/core/util/CDIUtils2.java | 44 ---------------
.../user/services/AuthenticationServiceImpl.java | 6 +-
3 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/34dbbd5d/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils.java
new file mode 100644
index 0000000..6e71fdf
--- /dev/null
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (C) 2013 The Apache Software Foundation.
+ *
+ * Licensed 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.marmotta.platform.core.util;
+
+import javax.enterprise.inject.Instance;
+import javax.inject.Named;
+import java.lang.annotation.Annotation;
+
+public abstract class CDIUtils {
+
+ public static <T> Instance<T> selectNamed(Instance<T> instance, String name) {
+ if (name != null)
+ return instance.select(createNamedLiteral(name));
+ return instance;
+ }
+
+ private static Annotation createNamedLiteral(final String name) {
+ return new Named() {
+ @Override
+ public Class<? extends Annotation> annotationType() {
+ return Named.class;
+ }
+
+ @Override
+ public String value() {
+ return name;
+ }
+ };
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/34dbbd5d/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils2.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils2.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils2.java
deleted file mode 100644
index b086f10..0000000
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/util/CDIUtils2.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2013 The Apache Software Foundation.
- *
- * Licensed 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.marmotta.platform.core.util;
-
-import javax.enterprise.inject.Instance;
-import javax.inject.Named;
-import java.lang.annotation.Annotation;
-
-public abstract class CDIUtils2 {
-
- public static <T> Instance<T> selectNamed(Instance<T> instance, String name) {
- if (name != null)
- return instance.select(createNamedLiteral(name));
- return instance;
- }
-
- private static Annotation createNamedLiteral(final String name) {
- return new Named() {
- @Override
- public Class<? extends Annotation> annotationType() {
- return Named.class;
- }
-
- @Override
- public String value() {
- return name;
- }
- };
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/34dbbd5d/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AuthenticationServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AuthenticationServiceImpl.java b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AuthenticationServiceImpl.java
index 6b00ec8..1e77f62 100644
--- a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AuthenticationServiceImpl.java
+++ b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/services/AuthenticationServiceImpl.java
@@ -15,7 +15,7 @@
*/
package org.apache.marmotta.platform.user.services;
-import org.apache.marmotta.platform.core.util.CDIUtils2;
+import org.apache.marmotta.platform.core.util.CDIUtils;
import org.apache.marmotta.platform.user.api.AccountService;
import org.apache.marmotta.platform.user.api.AuthenticationProvider;
import org.apache.marmotta.platform.user.api.AuthenticationService;
@@ -64,13 +64,13 @@ public class AuthenticationServiceImpl implements AuthenticationService {
final String prov = configurationService.getStringConfiguration("user.auth.provider", DEFAULT_AUTH_PROVIDER_NAMED);
- Instance<AuthenticationProvider> selected = CDIUtils2.selectNamed(providers, prov);
+ Instance<AuthenticationProvider> selected = CDIUtils.selectNamed(providers, prov);
if (selected.isAmbiguous()) {
authenticationProvider = selected.iterator().next();
log.error("multiple candidates for AuthenticationProvider '{}' found. Chose randomly!", prov);
} else if (selected.isUnsatisfied()) {
log.error("no candidate for AuthenticationProvider '{}' found, falling back to default", prov);
- authenticationProvider = CDIUtils2.selectNamed(providers, DEFAULT_AUTH_PROVIDER_NAMED).iterator().next();
+ authenticationProvider = CDIUtils.selectNamed(providers, DEFAULT_AUTH_PROVIDER_NAMED).iterator().next();
} else {
authenticationProvider = selected.get();
}