[ 
https://issues.apache.org/jira/browse/BEAM-6240?focusedWorklogId=181875&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-181875
 ]

ASF GitHub Bot logged work on BEAM-6240:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jan/19 16:06
            Start Date: 07/Jan/19 16:06
    Worklog Time Spent: 10m 
      Work Description: kanterov commented on pull request #7289: [BEAM-6240] 
Add a library of schema annotations for POJO and JavaBeans
URL: https://github.com/apache/beam/pull/7289#discussion_r245698709
 
 

 ##########
 File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/POJOUtilsTest.java
 ##########
 @@ -219,11 +231,39 @@ public void testGeneratedByteBufferSetters() {
     POJOWithByteArray pojo = new POJOWithByteArray();
     List<FieldValueSetter> setters =
         POJOUtils.getSetters(
-            POJOWithByteArray.class, POJO_WITH_BYTE_ARRAY_SCHEMA, new 
JavaFieldTypeSupplier());
+            POJOWithByteArray.class, POJO_WITH_BYTE_ARRAY_SCHEMA, 
JavaFieldTypeSupplier.INSTANCE);
     setters.get(0).set(pojo, BYTE_ARRAY);
     setters.get(1).set(pojo, BYTE_BUFFER.array());
 
     assertArrayEquals("not equal", BYTE_ARRAY, pojo.bytes1);
     assertEquals(BYTE_BUFFER, pojo.bytes2);
   }
+
+  static class Foo {
+    private final int field1;
+    private final String field2;
+
+    public Foo(int field1, String field2) {
+      this.field1 = field1;
+      this.field2 = field2;
+    }
+
+    @Override
+    public String toString() {
+      return "Foo{" + "field1=" + field1 + ", field2='" + field2 + '\'' + '}';
+    }
+  }
+
+  private static final Unsafe UNSAFE;
 
 Review comment:
   Can't find usage, can you explain?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 181875)
    Time Spent: 3h  (was: 2h 50m)

> Allow users to annotate POJOs and JavaBeans for richer functionality
> --------------------------------------------------------------------
>
>                 Key: BEAM-6240
>                 URL: https://issues.apache.org/jira/browse/BEAM-6240
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> Desired annotations:
>   * SchemaIgnore - ignore this field
>   * FieldName - allow the user to explicitly specify a field name
>   * SchemaCreate - register a function to be used to create an object (so 
> fields can be final, and no default constructor need be assumed).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to