happyfish100 / happyfish100/fastdfs-client-java

StorageClient需要每次调用时创建吧 Test样例中有些误导

Open
#97 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.6k
Forks
891
PR merge metrics
No merged PRs in 30d

Description

StorageClient类注释清楚的写着 不是线程安全的 放在全局变量中定义 并发下会有空指针的问题

每次调用后 finally中会把storage server = null 并发下其他线程在使用storageserver的时候 会有空指针的问题

建议修改Test类中的使用样例 避免误导

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Test class and inspect the StorageClient usage examples alongside the class comment about thread safety. Update the examples so they do not suggest sharing a global StorageClient across concurrent calls, then run the relevant tests to confirm the examples still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.