juneau-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamesbog...@apache.org
Subject [juneau] branch master updated: Rename @URI to @Uri
Date Fri, 16 Oct 2020 14:45:11 GMT
This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 63b3af0  Rename @URI to @Uri
63b3af0 is described below

commit 63b3af02d4f0e38408bb33445a9087a76be1fe57
Author: JamesBognar <james.bognar@salesforce.com>
AuthorDate: Fri Oct 16 10:45:06 2020 -0400

    Rename @URI to @Uri
---
 .../java/org/apache/juneau/SerializerPropertiesComboTest.java  |  2 +-
 .../src/test/java/org/apache/juneau/serializer/TestURI.java    | 10 +++++-----
 .../src/test/java/org/apache/juneau/serializer/TestURIc.java   |  2 +-
 .../test/java/org/apache/juneau/testutils/pojos/TestURI.java   |  8 ++++----
 .../src/main/java/org/apache/juneau/BeanPropertyMeta.java      | 10 +++++-----
 .../src/main/java/org/apache/juneau/ClassMeta.java             |  2 +-
 .../src/main/java/org/apache/juneau/annotation/BeanConfig.java |  6 +++---
 .../java/org/apache/juneau/annotation/{URI.java => Uri.java}   |  2 +-
 .../main/java/org/apache/juneau/annotation/UriAnnotation.java  |  6 +++---
 .../src/main/java/org/apache/juneau/serializer/Serializer.java |  4 ++--
 .../java/org/apache/juneau/serializer/SerializerBuilder.java   |  4 ++--
 .../apache/juneau/serializer/annotation/SerializerConfig.java  |  4 ++--
 .../juneau/rest/client/RestClient_Config_Serializer_Test.java  |  2 +-
 .../java/org/apache/juneau/rest/client/RestClientBuilder.java  |  4 ++--
 14 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/SerializerPropertiesComboTest.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/SerializerPropertiesComboTest.java
index 6477760..b4c98d0 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/SerializerPropertiesComboTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/SerializerPropertiesComboTest.java
@@ -420,7 +420,7 @@ public class SerializerPropertiesComboTest extends ComboRoundTripTest
{
 	}
 
 	public static class T9 {
-		@URI
+		@Uri
 		public String f = "foo";
 	}
 
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURI.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURI.java
index 801bded..d82fdc9 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURI.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURI.java
@@ -23,7 +23,7 @@ import org.apache.juneau.xml.annotation.*;
 public class TestURI {
 
 	// String annotated as a URI
-	@org.apache.juneau.annotation.URI
+	@Uri
 	@Rdf(beanUri=true)
 	@Xml(format=XmlFormat.ATTR)
 	public String f0 = "f0/x0";
@@ -47,7 +47,7 @@ public class TestURI {
 		fio = null;
 
 	// Strings annotated with @URI properties
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public String
 		f2a = "http://www.apache.org/f2a",
 		f2b = "/f2b",
@@ -66,7 +66,7 @@ public class TestURI {
 		f2o = null;
 
 	// Strings with labels
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public String
 		f3a = "http://www.apache.org/f3a/x?label=MY_LABEL&foo=bar",
 		f3b = StringUtils.urlEncode("<>&'\""),
@@ -76,12 +76,12 @@ public class TestURI {
 	public TestURIb f4 = new TestURIb();
 
 	// @URI on bean property method.
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public String getF5() {
 		return "f5/x";
 	}
 
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public static class TestURIb {
 		@Override /* Object */
 		public String toString() {
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURIc.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURIc.java
index 3b2c390..7063b50 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURIc.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/serializer/TestURIc.java
@@ -22,7 +22,7 @@ import org.apache.juneau.xml.annotation.*;
 @Bean(sort=true)
 @BeanConfig(
 	applyURI={
-		@org.apache.juneau.annotation.URI(on="TestURIc.f0,TestURIc.f2a,TestURIc.f2b,TestURIc.f2c,TestURIc.f2d,TestURIc.f2e,TestURIc.f2f,TestURIc.f2g,TestURIc.f2h,TestURIc.f2i,TestURIc.f2j,TestURIc.f2k,TestURIc.f2l,TestURIc.f2m,TestURIc.f2n,TestURIc.f2o,TestURIc.f3a,,TestURIc.f3b,TestURIc.f3c,TestURIc.getF5,TestURIbc")
+		@Uri(on="TestURIc.f0,TestURIc.f2a,TestURIc.f2b,TestURIc.f2c,TestURIc.f2d,TestURIc.f2e,TestURIc.f2f,TestURIc.f2g,TestURIc.f2h,TestURIc.f2i,TestURIc.f2j,TestURIc.f2k,TestURIc.f2l,TestURIc.f2m,TestURIc.f2n,TestURIc.f2o,TestURIc.f3a,,TestURIc.f3b,TestURIc.f3c,TestURIc.getF5,TestURIbc")
 	}
 )
 public class TestURIc {
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/pojos/TestURI.java
b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/pojos/TestURI.java
index 69ef3d5..456cb2c 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/pojos/TestURI.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/testutils/pojos/TestURI.java
@@ -21,14 +21,14 @@ import org.apache.juneau.xml.annotation.*;
 
 @Bean(sort=true)
 public class TestURI {
-	@org.apache.juneau.annotation.URI
+	@Uri
 	@Rdf(beanUri=true)
 	@Xml(format=XmlFormat.ATTR)
 	public String f0 = "f0/x0";
 
 	public URI f1, f2, f3;
 
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public String f4, f5, f6;
 
 	public URL f7;
@@ -37,7 +37,7 @@ public class TestURI {
 
 	public String fa, fb, fc, fd, fe;
 
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public String getF9() {
 		return "f9/x9";
 	}
@@ -58,7 +58,7 @@ public class TestURI {
 		fe = "http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL";
 	}
 
-	@org.apache.juneau.annotation.URI
+	@Uri
 	public static class TestURIb {
 		@Override /* Object */
 		public String toString() {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index 338d3ac..2b26882 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -193,14 +193,14 @@ public final class BeanPropertyMeta {
 				}
 				for (Swap s : bc.getAnnotations(Swap.class, innerField))
 					swap = getPropertyPojoSwap(s);
-				isUri |= last(bc.getAnnotations(org.apache.juneau.annotation.URI.class, innerField))
!= null;
+				isUri |= last(bc.getAnnotations(Uri.class, innerField)) != null;
 			}
 
 			if (getter != null) {
 				List<Beanp> lp = bc.getAnnotations(Beanp.class, getter);
 				if (rawTypeMeta == null)
 					rawTypeMeta = bc.resolveClassMeta(last(lp), getter.getGenericReturnType(), typeVarImpls);
-				isUri |= (rawTypeMeta.isUri() || bc.hasAnnotation(org.apache.juneau.annotation.URI.class,
getter));
+				isUri |= (rawTypeMeta.isUri() || bc.hasAnnotation(Uri.class, getter));
 				for (Beanp p : lp) {
 					if (properties != null && ! p.properties().isEmpty())
 						properties = split(p.properties());
@@ -218,7 +218,7 @@ public final class BeanPropertyMeta {
 				List<Beanp> lp = bc.getAnnotations(Beanp.class, setter);
 				if (rawTypeMeta == null)
 					rawTypeMeta = bc.resolveClassMeta(last(lp), setter.getGenericParameterTypes()[0], typeVarImpls);
-				isUri |= (rawTypeMeta.isUri() || bc.hasAnnotation(org.apache.juneau.annotation.URI.class,
setter));
+				isUri |= (rawTypeMeta.isUri() || bc.hasAnnotation(Uri.class, setter));
 				for (Beanp p : lp) {
 					if (swap == null)
 						swap = getPropertyPojoSwap(p);
@@ -498,8 +498,8 @@ public final class BeanPropertyMeta {
 	 * A bean property can be considered a URI if any of the following are true:
 	 * <ul>
 	 * 	<li>Property class type is {@link URL} or {@link URI}.
-	 * 	<li>Property class type is annotated with {@link org.apache.juneau.annotation.URI
@URI}.
-	 * 	<li>Property getter, setter, or field is annotated with {@link org.apache.juneau.annotation.URI
@URI}.
+	 * 	<li>Property class type is annotated with {@link org.apache.juneau.annotation.Uri
@Uri}.
+	 * 	<li>Property getter, setter, or field is annotated with {@link org.apache.juneau.annotation.Uri
@Uri}.
 	 * </ul>
 	 *
 	 * @return <jk>true</jk> if this bean property is a URI.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
index 364d69f..2a955f8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
@@ -419,7 +419,7 @@ public final class ClassMeta<T> implements Type {
 					cc = DATE;
 				else if (c.isArray())
 					cc = ARRAY;
-				else if (ci.isChildOfAny(URL.class, URI.class) || bc.hasAnnotation(org.apache.juneau.annotation.URI.class,
c))
+				else if (ci.isChildOfAny(URL.class, URI.class) || bc.hasAnnotation(Uri.class, c))
 					cc = URI;
 				else if (ci.isChildOf(Reader.class))
 					cc = READER;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
index 0a5d1ea..33a0447 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
@@ -155,17 +155,17 @@ public @interface BeanConfig {
 	Swap[] applySwap() default {};
 
 	/**
-	 * Dynamically applies {@link URI @URI} annotations to specified classes/methods/fields.
+	 * Dynamically applies {@link Uri @Uri} annotations to specified classes/methods/fields.
 	 *
 	 * <p>
-	 * Provides an alternate approach for applying annotations using {@link URI#on() @URI.on}
to specify the names
+	 * Provides an alternate approach for applying annotations using {@link Uri#on() @URI.on}
to specify the names
 	 * to apply the annotation to.
 	 *
 	 * <ul class='seealso'>
 	 * 	<li class='link'>{@doc DynamicallyAppliedAnnotations}
 	 * </ul>
 	 */
-	URI[] applyURI() default {};
+	Uri[] applyURI() default {};
 
 	/**
 	 * Configuration property:  Minimum bean class visibility.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/URI.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
similarity index 96%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/URI.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
index d1e8d4e..ab9e345 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/URI.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
@@ -31,7 +31,7 @@ import java.lang.annotation.*;
 @Target({TYPE,FIELD,METHOD})
 @Retention(RUNTIME)
 @Inherited
-public @interface URI {
+public @interface Uri {
 
 	/**
 	 * Dynamically apply this annotation to the specified class/method/fields.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
index 5cdfa72..ee25a3c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
@@ -18,19 +18,19 @@ import java.lang.reflect.*;
 import org.apache.juneau.*;
 
 /**
- * A concrete implementation of the {@link URI} annotation.
+ * A concrete implementation of the {@link Uri} annotation.
  *
  * <ul class='seealso'>
  * 	<li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
  * </ul>
  */
-public class UriAnnotation extends TargetedAnnotation.OnClassMethodField implements URI {
+public class UriAnnotation extends TargetedAnnotation.OnClassMethodField implements Uri {
 
 	/**
 	 * Constructor.
 	 *
 	 * @param on The initial value for the <c>on</c> property.
-	 * 	<br>See {@link URI#on()}
+	 * 	<br>See {@link Uri#on()}
 	 */
 	public UriAnnotation(String...on) {
 		on(on);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
index dffaa60..314c3ab 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
@@ -695,7 +695,7 @@ public abstract class Serializer extends BeanTraverseContext {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>
@@ -745,7 +745,7 @@ public abstract class Serializer extends BeanTraverseContext {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
index 8c124eb..6e9f37e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerBuilder.java
@@ -481,7 +481,7 @@ public class SerializerBuilder extends BeanTraverseBuilder {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>
@@ -519,7 +519,7 @@ public class SerializerBuilder extends BeanTraverseBuilder {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
index 09923f0..feac4a2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
@@ -353,7 +353,7 @@ public @interface SerializerConfig {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <ul class='notes'>
@@ -382,7 +382,7 @@ public @interface SerializerConfig {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <ul class='notes'>
diff --git a/juneau-rest/juneau-rest-client-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Serializer_Test.java
b/juneau-rest/juneau-rest-client-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Serializer_Test.java
index 88fab1d..f232a0b 100644
--- a/juneau-rest/juneau-rest-client-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Serializer_Test.java
+++ b/juneau-rest/juneau-rest-client-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Serializer_Test.java
@@ -171,7 +171,7 @@ public class RestClient_Config_Serializer_Test {
 	}
 
 	public static class A13 {
-		@URI
+		@Uri
 		public String f = "foo";
 	}
 
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClientBuilder.java
b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClientBuilder.java
index fb29558..8f25e7e 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClientBuilder.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClientBuilder.java
@@ -4002,7 +4002,7 @@ public class RestClientBuilder extends BeanContextBuilder {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>
@@ -4040,7 +4040,7 @@ public class RestClientBuilder extends BeanContextBuilder {
 	 * <ul>
 	 * 	<li>{@link java.net.URI}
 	 * 	<li>{@link java.net.URL}
-	 * 	<li>Properties and classes annotated with {@link org.apache.juneau.annotation.URI
@URI}
+	 * 	<li>Properties and classes annotated with {@link Uri @Uri}
 	 * </ul>
 	 *
 	 * <p>


Mime
View raw message