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