You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2022/10/28 14:55:00 UTC

[jira] [Updated] (TIKA-3905) Move class TranslatorExample into package org.apache.language.translate, class RecentFiles into package org.apache.tika.metadata

     [ https://issues.apache.org/jira/browse/TIKA-3905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr updated TIKA-3905:
----------------------------------
    Fix Version/s:     (was: 2.5.0)

> Move class TranslatorExample into package org.apache.language.translate, class RecentFiles into package org.apache.tika.metadata
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-3905
>                 URL: https://issues.apache.org/jira/browse/TIKA-3905
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 2.5.0
>            Reporter: yiy27
>            Priority: Major
>         Attachments: RecentFiles-java.png, TranslatorExample-java-1.png
>
>
> *Issue Description*
>  
> Package _*org.apache.tika.example*_ is a promiscuous package, and groups together miscellaneous functionalities that might be useful to different subsystems. The package structure violates the “high cohesion and low coupling” design rules. I found that Class {_}*TranslatorExample*{_}, and _*RecentFiles*_ are not used by classes in their package{_}.{_} The project has grown larger, leading to becoming increasingly hard to maintain. During the development process, one groups together classes (that often co-change) with similar responsibilities in one package to facilitate maintenance, which prevents a change that causes other packages to be modified. For example, if one modifies package _*org.apache.tika.metadata*_ (i.e., package rename), and forget to change class _*RecentFiles*_ during the maintenance process, there are indirect consequences for the class RecentFiles.
> Location: The source file can be found at path File  tika-example/src/main/java/org/apache/tika/example/TranslatorExample.java
> tika-example/src/main/java/org/apache/tika/example/RecentFiles.java
>  
> *Refactoring suggestions*
>  
> I suggest to move class _*TranslatorExample*_ into package {_}*org.apache.language.translate*{_}, class _*RecentFiles*_ into package {_}*org.apache.tika.metadata*{_}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)