FIx?
This commit is contained in:
parent
cf00454f8b
commit
6fe5831f11
@ -39,6 +39,7 @@ import org.springframework.web.bind.annotation.PutMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -100,8 +101,11 @@ public class CourseConfiguration {
|
|||||||
} else if (m.getAnnotation(PutMapping.class) != null) {
|
} else if (m.getAnnotation(PutMapping.class) != null) {
|
||||||
paths = ArrayUtils.addAll(m.getAnnotation(PutMapping.class).value(), m.getAnnotation(PutMapping.class).path());
|
paths = ArrayUtils.addAll(m.getAnnotation(PutMapping.class).value(), m.getAnnotation(PutMapping.class).path());
|
||||||
}
|
}
|
||||||
|
if (paths == null) {
|
||||||
return paths != null && paths.length > 0 ? paths[0] : "";
|
return "";
|
||||||
|
} else {
|
||||||
|
return Arrays.stream(paths).filter(path -> !"".equals(path)).findFirst().orElseGet(() -> "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getHints(Class<? extends AssignmentEndpoint> e) {
|
private List<String> getHints(Class<? extends AssignmentEndpoint> e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user