Skip to content

Commit

Permalink
Refactoring ExtraSpecial/ExtraSpecialLiteral to work around compilati…
Browse files Browse the repository at this point in the history
…on problems encountered in different environments.
  • Loading branch information
mbogoevici committed Mar 1, 2010
1 parent b97758e commit a068b9a
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 14 deletions.
@@ -1,8 +1,8 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,7 +25,6 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.util.AnnotationLiteral;
import javax.inject.Qualifier;

@Qualifier
Expand All @@ -34,13 +33,4 @@
public @interface ExtraSpecial
{

static class ExtraSpecialLiteral extends AnnotationLiteral<ExtraSpecial> implements ExtraSpecial
{

private ExtraSpecialLiteral() {}

}

public static final ExtraSpecial INSTANCE = new ExtraSpecialLiteral();

}
@@ -0,0 +1,29 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* 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.jboss.weld.tests.injectionPoint;

import javax.enterprise.util.AnnotationLiteral;

public class ExtraSpecialLiteral extends AnnotationLiteral<ExtraSpecial> implements ExtraSpecial
{
public static final ExtraSpecial INSTANCE = new ExtraSpecialLiteral();

private ExtraSpecialLiteral() {
}

}
@@ -1,3 +1,20 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat, Inc. and/or its affiliates, and individual
* contributors by the @authors tag. See the copyright.txt in the
* distribution for a full listing of individual contributors.
*
* 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.jboss.weld.tests.injectionPoint;

import javax.enterprise.inject.Instance;
Expand All @@ -9,7 +26,7 @@ public class PigSty

public Pig getPig()
{
return pig.select(ExtraSpecial.INSTANCE).get();
return pig.select(ExtraSpecialLiteral.INSTANCE).get();
}

}
Expand Down

0 comments on commit a068b9a

Please sign in to comment.