You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "yiy27 (Jira)" <ji...@apache.org> on 2022/10/27 14:46:00 UTC
[jira] [Created] (TIKA-3909) Move class TextStatsFromTikaEval into package org.apache.tika.eval.textstats
yiy27 created TIKA-3909:
---------------------------
Summary: Move class TextStatsFromTikaEval into package org.apache.tika.eval.textstats
Key: TIKA-3909
URL: https://issues.apache.org/jira/browse/TIKA-3909
Project: Tika
Issue Type: Bug
Affects Versions: 2.5.0
Reporter: yiy27
Fix For: 2.5.0
Attachments: TextStatsFromTikaEval-java.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 _*TextStatsFromTikaEval*_ is 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.eval.textstats*_ (i.e., package rename), and forget to change class _*TextStatsFromTikaEval*_ during the maintenance process, there are indirect consequences for the class {_}*TextStatsFromTikaEval*{_}.
Location: The source file can be found at path File tika-example/src/main/java/org/apache/tika/example/TextStatsFromTikaEval.java
*Refactoring suggestions*
I suggest to move class _*TextStatsFromTikaEval*_ into package {_}*org.apache.tika.eval.textstats*{_}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)