olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chall...@apache.org
Subject git commit: [OLINGO-415] Java client-proxy code getter method has performane issue: invoke() checks get- before isSelfMethods().
Date Sun, 24 Aug 2014 16:12:01 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/master 58619c966 -> 9c78784de


[OLINGO-415] Java client-proxy code getter method has performane issue: invoke() checks get-
before isSelfMethods().


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/9c78784d
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/9c78784d
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/9c78784d

Branch: refs/heads/master
Commit: 9c78784deea668e2e2999141569fa1450bd498a2
Parents: 58619c9
Author: challenh <challenh@microsoft.com>
Authored: Mon Aug 25 00:10:52 2014 +0800
Committer: challenh <challenh@microsoft.com>
Committed: Mon Aug 25 00:10:52 2014 +0800

----------------------------------------------------------------------
 .../olingo/ext/proxy/api/AbstractOpenType.java  |  6 +-
 .../olingo/ext/proxy/api/Annotatable.java       |  6 +-
 .../apache/olingo/ext/proxy/api/EntityType.java |  3 +-
 .../AbstractStructuredInvocationHandler.java    | 75 +++++++++++---------
 .../commons/AnnotatableInvocationHandler.java   |  4 +-
 .../proxy/commons/EntityInvocationHandler.java  |  7 +-
 .../olingo/fit/proxy/v3/OpenTypeTestITCase.java | 18 ++---
 .../fit/proxy/v4/APIBasicDesignTestITCase.java  |  4 +-
 .../olingo/fit/proxy/v4/OpenTypeTestITCase.java | 30 ++++----
 .../fit/proxy/v4/SingletonTestITCase.java       | 12 ++--
 10 files changed, 88 insertions(+), 77 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
index a4d9bf2..b28ced9 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/AbstractOpenType.java
@@ -26,7 +26,9 @@ public interface AbstractOpenType {
 
   void removeAdditionalProperty(String name);
 
-  Object getAdditionalProperty(String name);
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  Object readAdditionalProperty(String name);
 
-  Collection<String> getAdditionalPropertyNames();
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  Collection<String> readAdditionalPropertyNames();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Annotatable.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Annotatable.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Annotatable.java
index 08af72b..70048ba 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Annotatable.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/Annotatable.java
@@ -27,8 +27,10 @@ public interface Annotatable extends Serializable {
 
   void removeAnnotation(Class<? extends AbstractTerm> term);
 
-  Object getAnnotation(Class<? extends AbstractTerm> term);
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  Object readAnnotation(Class<? extends AbstractTerm> term);  
 
-  Collection<Class<? extends AbstractTerm>> getAnnotationTerms();
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  Collection<Class<? extends AbstractTerm>> readAnnotationTerms();
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
index 891b2db..e68eab9 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/api/EntityType.java
@@ -32,5 +32,6 @@ public interface EntityType<T extends StructuredType<?>> extends
StructuredType<
    *
    * @return entity reference ID.
    */
-  String getEntityReferenceID();
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  String readEntityReferenceID();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
index 43c161f..aaae42c 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AbstractStructuredInvocationHandler.java
@@ -158,41 +158,13 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
 
   @Override
   public Object invoke(final Object proxy, final Method method, final Object[] args) throws
Throwable {
-    if ("expand".equals(method.getName())
-            || "select".equals(method.getName())
-            || "refs".equals(method.getName())) {
-      invokeSelfMethod(method, args);
-      return proxy;
-    } else if (isSelfMethod(method, args)) {
-      return invokeSelfMethod(method, args);
-    } else if ("load".equals(method.getName()) && ArrayUtils.isEmpty(args)) {
-      load();
-      return proxy;
-    } else if ("loadAsync".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
-      return service.getClient().getConfiguration().getExecutor().submit(new Callable<Object>()
{
-        @Override
-        public Object call() throws Exception {
-          load();
-          return proxy;
-        }
-      });
-    } else if ("operations".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
-      final Class<?> returnType = method.getReturnType();
+  	if (method.getName().startsWith("get")) {  
+  		// Here need check "get"/"set" first for better get-/set- performance because
+  		// the below if-statements are really time-consuming, even twice slower than "get" body.
 
-      return Proxy.newProxyInstance(
-              Thread.currentThread().getContextClassLoader(),
-              new Class<?>[] {returnType},
-              OperationInvocationHandler.getInstance(getEntityHandler()));
-    } else if ("annotations".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
-      final Class<?> returnType = method.getReturnType();
-
-      return Proxy.newProxyInstance(
-              Thread.currentThread().getContextClassLoader(),
-              new Class<?>[] {returnType},
-              AnnotatationsInvocationHandler.getInstance(getEntityHandler(), this));
-    } else if (method.getName().startsWith("get")) {
-      // Assumption: for each getter will always exist a setter and viceversa.
+  		// Assumption: for each getter will always exist a setter and viceversa.
       // get method annotation and check if it exists as expected
+
       final Object res;
       final Method getter = typeRef.getMethod(method.getName());
 
@@ -234,6 +206,38 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
       }
 
       return ClassUtils.returnVoid();
+    } else if ("expand".equals(method.getName())
+            || "select".equals(method.getName())
+            || "refs".equals(method.getName())) {
+      invokeSelfMethod(method, args);
+      return proxy;
+    } else if (isSelfMethod(method, args)) {
+      return invokeSelfMethod(method, args);
+    } else if ("load".equals(method.getName()) && ArrayUtils.isEmpty(args)) {
+      load();
+      return proxy;
+    } else if ("loadAsync".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
+      return service.getClient().getConfiguration().getExecutor().submit(new Callable<Object>()
{
+        @Override
+        public Object call() throws Exception {
+          load();
+          return proxy;
+        }
+      });
+    } else if ("operations".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
+      final Class<?> returnType = method.getReturnType();
+
+      return Proxy.newProxyInstance(
+              Thread.currentThread().getContextClassLoader(),
+              new Class<?>[] {returnType},
+              OperationInvocationHandler.getInstance(getEntityHandler()));
+    } else if ("annotations".equals(method.getName()) && ArrayUtils.isEmpty(args))
{
+      final Class<?> returnType = method.getReturnType();
+
+      return Proxy.newProxyInstance(
+              Thread.currentThread().getContextClassLoader(),
+              new Class<?>[] {returnType},
+              AnnotatationsInvocationHandler.getInstance(getEntityHandler(), this));
     } else {
       throw new NoSuchMethodException(method.getName());
     }
@@ -517,7 +521,8 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
     return navPropValue;
   }
 
-  public Object getAdditionalProperty(final String name) {
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  public Object readAdditionalProperty(final String name) {
     return getPropertyValue(name, null);
   }
 
@@ -525,7 +530,7 @@ public abstract class AbstractStructuredInvocationHandler extends AbstractInvoca
     return propertyChanges;
   }
 
-  public Collection<String> getAdditionalPropertyNames() {
+  public Collection<String> readAdditionalPropertyNames() {
     final Set<String> res = new HashSet<String>(propertyChanges.keySet());
     final Set<String> propertyNames = new HashSet<String>();
     for (Method method : typeRef.getMethods()) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
index 6409d24..a219cdc 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/AnnotatableInvocationHandler.java
@@ -141,7 +141,7 @@ public class AnnotatableInvocationHandler extends AbstractInvocationHandler
impl
   }
 
   @Override
-  public Object getAnnotation(final Class<? extends AbstractTerm> term) {
+  public Object readAnnotation(final Class<? extends AbstractTerm> term) {
     Object res = null;
 
     if (annotations.containsKey(term)) {
@@ -171,7 +171,7 @@ public class AnnotatableInvocationHandler extends AbstractInvocationHandler
impl
   }
 
   @Override
-  public Collection<Class<? extends AbstractTerm>> getAnnotationTerms() {
+  public Collection<Class<? extends AbstractTerm>> readAnnotationTerms() {
     return entityHandler.getEntity() instanceof ODataEntity
             ? CoreUtils.getAnnotationTerms(service, internalAnnotations())
             : Collections.<Class<? extends AbstractTerm>>emptyList();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
index 32d3b26..2a23b11 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/EntityInvocationHandler.java
@@ -406,7 +406,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
   }
 
   @Override
-  public Object getAnnotation(final Class<? extends AbstractTerm> term) {
+  public Object readAnnotation(final Class<? extends AbstractTerm> term) {
     Object res = null;
 
     if (annotations.containsKey(term)) {
@@ -436,7 +436,7 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
   }
 
   @Override
-  public Collection<Class<? extends AbstractTerm>> getAnnotationTerms() {
+  public Collection<Class<? extends AbstractTerm>> readAnnotationTerms() {
     return getEntity() instanceof ODataEntity
             ? CoreUtils.getAnnotationTerms(service, ((ODataEntity) getEntity()).getAnnotations())
             : Collections.<Class<? extends AbstractTerm>>emptyList();
@@ -493,7 +493,8 @@ public class EntityInvocationHandler extends AbstractStructuredInvocationHandler
     return getEntity() == null ? null : getEntity().getProperty(name);
   }
 
-  public String getEntityReferenceID() {
+  // use read- instead of get- for .invoke() to distinguish it from entity property getter.
+  public String readEntityReferenceID() {   
     URI id = getEntity() == null ? null
             : getClient().getServiceVersion().compareTo(ODataServiceVersion.V30) <= 0
             ? ((org.apache.olingo.commons.api.domain.v3.ODataEntity) getEntity()).getLink()

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/fit/src/test/java/org/apache/olingo/fit/proxy/v3/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/OpenTypeTestITCase.java
index a0e8b99..5e51ad6 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/OpenTypeTestITCase.java
@@ -72,11 +72,11 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
   @Test
   public void read() {
     Row row = otcontainer.getRow().getByKey(UUID.fromString("71f7d0dc-ede4-45eb-b421-555a2aa1e58f")).load();
-    assertEquals(Double.class, row.getAdditionalProperty("Double").getClass());
+    assertEquals(Double.class, row.readAdditionalProperty("Double").getClass());
     assertEquals("71f7d0dc-ede4-45eb-b421-555a2aa1e58f", row.getId().toString());
 
     row = otcontainer.getRow().getByKey(UUID.fromString("672b8250-1e6e-4785-80cf-b94b572e42b3")).load();
-    assertEquals(BigDecimal.class, row.getAdditionalProperty("Decimal").getClass());
+    assertEquals(BigDecimal.class, row.readAdditionalProperty("Decimal").getClass());
   }
 
   @Test
@@ -119,13 +119,13 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     otcontainer.flush();
 
     rowIndex = otcontainer.getRowIndex().getByKey(id).load();
-    assertEquals(String.class, rowIndex.getAdditionalProperty("aString").getClass());
-    assertEquals(Boolean.class, rowIndex.getAdditionalProperty("aBoolean").getClass());
-    assertEquals(Double.class, rowIndex.getAdditionalProperty("aDouble").getClass());
-    assertEquals(Byte.class, rowIndex.getAdditionalProperty("aByte").getClass());
-    assertEquals(Byte.MAX_VALUE, rowIndex.getAdditionalProperty("aByte"));
-    assertTrue(Timestamp.class.isAssignableFrom(rowIndex.getAdditionalProperty("aDate").getClass()));
-    assertEquals(ContactDetails.class, rowIndex.getAdditionalProperty("aContact").getClass().getInterfaces()[0]);
+    assertEquals(String.class, rowIndex.readAdditionalProperty("aString").getClass());
+    assertEquals(Boolean.class, rowIndex.readAdditionalProperty("aBoolean").getClass());
+    assertEquals(Double.class, rowIndex.readAdditionalProperty("aDouble").getClass());
+    assertEquals(Byte.class, rowIndex.readAdditionalProperty("aByte").getClass());
+    assertEquals(Byte.MAX_VALUE, rowIndex.readAdditionalProperty("aByte"));
+    assertTrue(Timestamp.class.isAssignableFrom(rowIndex.readAdditionalProperty("aDate").getClass()));
+    assertEquals(ContactDetails.class, rowIndex.readAdditionalProperty("aContact").getClass().getInterfaces()[0]);
 
     otservice.getContext().detachAll();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
index 2a7d612..2f91916 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/APIBasicDesignTestITCase.java
@@ -100,11 +100,11 @@ public class APIBasicDesignTestITCase extends AbstractTestITCase {
   public void readWithReferences() {
     final Person person = container.getOrders().getByKey(8).getCustomerForOrder().refs().load();
     assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Customers(PersonID=1)",
-            person.getEntityReferenceID());
+            person.readEntityReferenceID());
 
     final OrderCollection orders = container.getCustomers().getByKey(1).getOrders().refs().execute();
     assertEquals("http://localhost:9080/stub/StaticService/V40/Static.svc/Orders(7)",
-            orders.iterator().next().getEntityReferenceID());
+            orders.iterator().next().readEntityReferenceID());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
index 2cbd7bd..082331e 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/OpenTypeTestITCase.java
@@ -72,11 +72,11 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
   @Test
   public void read() {
     Row row = otcontainer.getRow().getByKey(UUID.fromString("71f7d0dc-ede4-45eb-b421-555a2aa1e58f")).load();
-    assertEquals(Double.class, row.getAdditionalProperty("Double").getClass());
+    assertEquals(Double.class, row.readAdditionalProperty("Double").getClass());
     assertEquals("71f7d0dc-ede4-45eb-b421-555a2aa1e58f", row.getId().toString());
 
     row = otcontainer.getRow().getByKey(UUID.fromString("672b8250-1e6e-4785-80cf-b94b572e42b3")).load();
-    assertEquals(BigDecimal.class, row.getAdditionalProperty("Decimal").getClass());
+    assertEquals(BigDecimal.class, row.readAdditionalProperty("Decimal").getClass());
   }
 
   @Test
@@ -126,19 +126,19 @@ public class OpenTypeTestITCase extends AbstractTestITCase {
     otcontainer.flush();
 
     rowIndex = otcontainer.getRowIndex().getByKey(id).load();
-    assertEquals(String.class, rowIndex.getAdditionalProperty("aString").getClass());
-    assertEquals(Boolean.class, rowIndex.getAdditionalProperty("aBoolean").getClass());
-    assertEquals(Double.class, rowIndex.getAdditionalProperty("aDouble").getClass());
-    assertEquals(Byte.class, rowIndex.getAdditionalProperty("aByte").getClass());
-    assertEquals(Byte.MAX_VALUE, rowIndex.getAdditionalProperty("aByte"));
-    assertTrue(Calendar.class.isAssignableFrom(rowIndex.getAdditionalProperty("aDate").getClass()));
-    assertEquals(ContactDetails.class, rowIndex.getAdditionalProperty("aContact").getClass().getInterfaces()[0]);
-    assertEquals(Color.class, rowIndex.getAdditionalProperty("aColor").getClass());
-    assertEquals(Color.Green, rowIndex.getAdditionalProperty("aColor"));
-    assertEquals("Fabio", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getFirstName());
-    assertEquals("Martelli", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).getLastName());
-    assertEquals("fabio.martelli@tirasa.net", AccountInfo.class.cast(rowIndex.getAdditionalProperty("info")).
-            getAdditionalProperty("email"));
+    assertEquals(String.class, rowIndex.readAdditionalProperty("aString").getClass());
+    assertEquals(Boolean.class, rowIndex.readAdditionalProperty("aBoolean").getClass());
+    assertEquals(Double.class, rowIndex.readAdditionalProperty("aDouble").getClass());
+    assertEquals(Byte.class, rowIndex.readAdditionalProperty("aByte").getClass());
+    assertEquals(Byte.MAX_VALUE, rowIndex.readAdditionalProperty("aByte"));
+    assertTrue(Calendar.class.isAssignableFrom(rowIndex.readAdditionalProperty("aDate").getClass()));
+    assertEquals(ContactDetails.class, rowIndex.readAdditionalProperty("aContact").getClass().getInterfaces()[0]);
+    assertEquals(Color.class, rowIndex.readAdditionalProperty("aColor").getClass());
+    assertEquals(Color.Green, rowIndex.readAdditionalProperty("aColor"));
+    assertEquals("Fabio", AccountInfo.class.cast(rowIndex.readAdditionalProperty("info")).getFirstName());
+    assertEquals("Martelli", AccountInfo.class.cast(rowIndex.readAdditionalProperty("info")).getLastName());
+    assertEquals("fabio.martelli@tirasa.net", AccountInfo.class.cast(rowIndex.readAdditionalProperty("info")).
+            readAdditionalProperty("email"));
 
     otservice.getContext().detachAll();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/9c78784d/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
index 5c0b8c6..f3ab08f 100644
--- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/SingletonTestITCase.java
@@ -51,26 +51,26 @@ public class SingletonTestITCase extends AbstractTestITCase {
   @Test
   public void readWithAnnotations() {
     final Company company = container.getCompany().load();
-    assertTrue(company.getAnnotationTerms().isEmpty());
+    assertTrue(company.readAnnotationTerms().isEmpty());
 
     final Person boss = container.getBoss().load();
     assertEquals(2, boss.getPersonID(), 0);
 
-    assertEquals(1, boss.getAnnotationTerms().size());
-    Object isBoss = boss.getAnnotation(IsBoss.class);
+    assertEquals(1, boss.readAnnotationTerms().size());
+    Object isBoss = boss.readAnnotation(IsBoss.class);
     assertTrue(isBoss instanceof Boolean);
     assertTrue((Boolean) isBoss);
 
     Annotatable annotations = boss.annotations().getFirstNameAnnotations();
-    assertTrue(annotations.getAnnotationTerms().isEmpty());
+    assertTrue(annotations.readAnnotationTerms().isEmpty());
 
     annotations = boss.annotations().getLastNameAnnotations();
-    isBoss = annotations.getAnnotation(IsBoss.class);
+    isBoss = annotations.readAnnotation(IsBoss.class);
     assertTrue(isBoss instanceof Boolean);
     assertFalse((Boolean) isBoss);
 
     annotations = boss.annotations().getParentAnnotations();
-    isBoss = annotations.getAnnotation(IsBoss.class);
+    isBoss = annotations.readAnnotation(IsBoss.class);
     assertTrue(isBoss instanceof Boolean);
     assertFalse((Boolean) isBoss);
   }


Mime
View raw message