mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
Fix regression bug.
This commit is contained in:
parent
3ef7f6a7f0
commit
7a5b4ca75a
@ -25,6 +25,7 @@ import com.wisemapping.mail.NotificationService;
|
||||
import com.wisemapping.model.User;
|
||||
import com.wisemapping.rest.model.RestErrors;
|
||||
import com.wisemapping.security.Utils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
@ -42,6 +43,8 @@ import java.util.Locale;
|
||||
|
||||
public class BaseController {
|
||||
|
||||
final private Logger logger = Logger.getLogger("com.wisemapping.rest");
|
||||
|
||||
@Qualifier("messageSource")
|
||||
@Autowired
|
||||
private ResourceBundleMessageSource messageSource;
|
||||
@ -56,7 +59,7 @@ public class BaseController {
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ResponseBody
|
||||
public RestErrors handleClientErrors(@NotNull IllegalArgumentException ex) {
|
||||
System.err.println(ex.getMessage());
|
||||
logger.error(ex.getMessage(), ex);
|
||||
return new RestErrors(ex.getMessage(), Severity.WARNING);
|
||||
}
|
||||
|
||||
|
@ -653,7 +653,7 @@ public class MindmapController extends BaseController {
|
||||
if (found == null) {
|
||||
throw new LabelCouldNotFoundException("Label could not be found. Id: " + labelId);
|
||||
}
|
||||
for (String id : ",".split(ids)) {
|
||||
for (String id : ids.split(",")) {
|
||||
final int mindmapId = Integer.parseInt(id);
|
||||
final Mindmap mindmap = findMindmapById(mindmapId);
|
||||
final Label label = mindmap.findLabel(labelId);
|
||||
|
Loading…
Reference in New Issue
Block a user