Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2876#discussion_r202902116
  
    --- Diff: 
nifi-nar-bundles/nifi-extension-utils/nifi-processor-utils/src/main/java/org/apache/nifi/processor/util/list/ListedEntity.java
 ---
    @@ -0,0 +1,44 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You 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.nifi.processor.util.list;
    +
    +public class ListedEntity {
    +    /**
    +     * Milliseconds.
    +     */
    +    private long timestamp;
    +    /**
    +     * Bytes.
    +     */
    +    private long size;
    +
    +    public void setTimestamp(long timestamp) {
    --- End diff --
    
    You are right. I was using final fields and constructor, but when it's 
deserialized, I got an Exception around Jackson, so I added setters. I've added 
Jackson annotations to use custom constructor for deserialization. Now it's 
clear those are immutable.


---

Reply via email to