You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2025/03/14 16:24:38 UTC

(ofbiz-framework) branch trunk updated: Improved: Fix Javadoc warnings (OFBIZ-12742)

This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 8f4b688088 Improved: Fix Javadoc warnings (OFBIZ-12742)
8f4b688088 is described below

commit 8f4b688088bb85a1234b6f40c022a890705e2d05
Author: Jacques Le Roux <ja...@les7arts.com>
AuthorDate: Fri Mar 14 17:22:56 2025 +0100

    Improved: Fix Javadoc warnings (OFBIZ-12742)
    
    Slightly improves AbstractCache class. But I don't understand yet why it still
    claims that:
    
    AbstractCache.java:23: warning: no comment
    public abstract class AbstractCache {
                    ^
    AbstractCache.java:27: warning: no comment
        protected AbstractCache(String id) {
---
 .../main/java/org/apache/ofbiz/entity/cache/AbstractCache.java    | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractCache.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractCache.java
index 32bbe5a5ff..ecb3158aa4 100644
--- a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractCache.java
+++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractCache.java
@@ -22,12 +22,20 @@ import org.apache.ofbiz.base.util.cache.UtilCache;
 import org.apache.ofbiz.entity.Delegator;
 import org.apache.ofbiz.entity.DelegatorFactory;
 
+/**
+ * EntityCache cache created in function of a delegator and an id
+ */
 public abstract class AbstractCache<K, V> {
 
     private final String delegatorName;
     private final String id;
     private final String cacheNamePrefix;
 
+    /**
+     * Create an abstract cache for an entity in function of a delegator and an id
+     * @param delegatorName defines the delegator used by the cache
+     * @param id identifies the cache in function of a delegator
+     */
     protected AbstractCache(String delegatorName, String id) {
         this.delegatorName = delegatorName;
         this.id = id;


Re: (ofbiz-framework) branch trunk updated: Improved: Fix Javadoc warnings (OFBIZ-12742)

Posted by Jacques Le Roux <jl...@apache.org>.
Le 14/03/2025 à 17:24, jleroux@apache.org a écrit :
>      Improved: Fix Javadoc warnings (OFBIZ-12742)
>      
>      Slightly improves AbstractCache class. But I don't understand yet why it still
>      claims that:
>      
>      AbstractCache.java:23: warning: no comment
>      public abstract class AbstractCache {
>                      ^
>      AbstractCache.java:27: warning: no comment
>          protected AbstractCache(String id) {
Actually the way most Abstract classes are currently documented in OFBiz is wrong.
Sincerely removing the warnings above is not obvious.
It's recommended to use @inheritdoc from classes extending the Abstract classes
https://stackoverflow.com/questions/2165008/javadoc-inheritdoc-tag-class
https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html
https://www.baeldung.com/javadoc-see-vs-link

We have none of such currently... A lot of work ahead...

Jacques