File tree Expand file tree Collapse file tree 4 files changed +8
-9
lines changed
Expand file tree Collapse file tree 4 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 1212
1313public class PathExaminer {
1414
15- public Path getFullPath (Path root , String requestPathString ) {
16- return root .resolve (requestPathString .substring (1 ));
15+ public Path getFullPath (Path root , String requestPath ) {
16+ return root .resolve (requestPath .substring (1 ));
1717 }
1818
1919 public Path getPath (String input ) {
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ private Range getRange(String[] parts) {
3636 }
3737
3838 private String [] getParts (String headerValue ) {
39- String rangeString = headerValue .substring (6 );
40- return rangeString .split ("-" , 2 );
39+ String range = headerValue .substring (6 );
40+ return range .split ("-" , 2 );
4141 }
4242
4343 private int parseRangeValue (String value ) {
Original file line number Diff line number Diff line change @@ -69,20 +69,20 @@ public void readsDirContentsToPathList() throws Exception {
6969
7070 @ Test
7171 public void makesFullPathFromRootPathAndRequestPathString () throws Exception {
72- String requestPathString = "/example.txt" ;
72+ String requestPath = "/example.txt" ;
7373
7474 Path expected = Paths .get ("tmp/serving-dir/example.txt" );
7575 assertEquals (expected ,
76- pathExaminer .getFullPath (root , requestPathString ));
76+ pathExaminer .getFullPath (root , requestPath ));
7777 }
7878
7979 @ Test
8080 public void makesFullPathCorrectlyWhenRequestPathIsSlash () throws Exception {
81- String requestPathString = "/" ;
81+ String requestPath = "/" ;
8282
8383 Path expected = Paths .get ("tmp/serving-dir" );
8484 assertEquals (expected ,
85- pathExaminer .getFullPath (root , requestPathString ));
85+ pathExaminer .getFullPath (root , requestPath ));
8686 }
8787
8888 @ Test
Original file line number Diff line number Diff line change 11package httpserver .header ;
22
33import httpserver .Range ;
4- import httpserver .header .RangeHeaderValueParser ;
54import org .junit .Test ;
65
76import static org .junit .Assert .*;
You can’t perform that action at this time.
0 commit comments