10000 fix class name · funnycoding/java_learning@f3807aa · GitHub
[go: up one dir, main page]

Skip to content

Commit f3807aa

Browse files
committed
fix class name
1 parent c5b9e55 commit f3807aa

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

java_concurrency_in_practice/src/main/java/chapter2/UnSafeCachingFactorizer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ public void service(ServletRequest req, ServletResponse res) {
3636
}
3737
}
3838

39+
40+
3941
// ------ 下面是模拟的业务方法,没有实际意义 ------
4042
void encodeIntoResponse(ServletResponse resp, BigInteger[] factors) {
4143
}

java_concurrency_in_practice/src/main/java/chapter2/UnsafeCountingFactorizer.java renamed to java_concurrency_in_practice/src/main/java/chapter2/UnSafeCountingFactorizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
* @author XuYanXin
1111
* @program java_learning
1212
* @description 存在线程安全问题的 Servlet ,service 中的 ++count 是非原子操作,在多线程环境下会出现竞态条件问题
13-
* @date 2020/9/25 5:50 下午
13+
* @date 2020/9/28 1:53 上午
1414
*/
1515

16-
public class UnsafeCountingFactorizer extends GenericServlet implements Servlet {
16+
public class UnSafeCountingFactorizer extends GenericServlet implements Servlet {
1717
// 可变变量 计数器,在多线程环境下存在 安全问题
1818
private long count = 0;
1919

java_concurrency_in_practice/src/test/java/chapger1/UnsafeCountingFactorizerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package chapger1;
22

33
import chapter1.SafeSequence;
4-
import chapter2.UnsafeCountingFactorizer;
4+
import chapter2.UnSafeCountingFactorizer;
55
import javax.servlet.http.HttpServletRequest;
66
import javax.servlet.http.HttpServletResponse;
77
import org.junit.Assert;
@@ -18,7 +18,7 @@
1818
public class UnsafeCountingFactorizerTest extends Mockito {
1919
@Test
2020
public void unsafeCounterTest() throws InterruptedException {
21-
UnsafeCountingFactorizer uncf = new UnsafeCountingFactorizer();
21+
UnSafeCountingFactorizer uncf = new UnSafeCountingFactorizer();
2222
HttpServletRequest request = mock(HttpServletRequest.class);
2323
HttpServletResponse response = mock(HttpServletResponse.class);
2424

0 commit comments

Comments
 (0)
0