From 740313c78ac838d9c4fb948391f0cd0e3e46ceb1 Mon Sep 17 00:00:00 2001 From: "minkee.lee" Date: Tue, 12 Aug 2014 22:38:18 +0900 Subject: [PATCH] CLI: Bug fix - default property. - No default-property when create VM with command. Change-Id: Ia32da8ce002c3d1fce0dca0c87cc33a3847aa2b6 Signed-off-by: minkee.lee --- .../src/org/tizen/emulator/manager/console/ConsoleCreateVM.java | 9 ++++++--- .../src/org/tizen/emulator/manager/vms/VMPropertyValue.java | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common-project/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java b/common-project/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java index 5afa088..16bd73b 100644 --- a/common-project/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java +++ b/common-project/src/org/tizen/emulator/manager/console/ConsoleCreateVM.java @@ -147,7 +147,8 @@ public class ConsoleCreateVM { } if (image != null) { - property = new VMPropertyValue(image, image.getPlatform().getTemplate()); +// property = new VMPropertyValue(image, image.getPlatform().getTemplate()); + property = new VMPropertyValue(image); } else { throw new ConsoleException("There not avaliable custom platform."); } @@ -214,7 +215,8 @@ public class ConsoleCreateVM { + "Base Image ID Platform: " + image.getPlatformName() + "Platform: " + property.baseImage.getPathName()); } else { - property = new VMPropertyValue(image, image.getPlatform().getTemplate()); +// property = new VMPropertyValue(image, image.getPlatform().getTemplate()); + property = new VMPropertyValue(image); } break; } @@ -238,7 +240,8 @@ public class ConsoleCreateVM { + "Base Image ID Platform: " + image.getPlatformName() + "Platform: " + property.baseImage.getPathName()); } else { - property = new VMPropertyValue(image, image.getPlatform().getTemplate()); +// property = new VMPropertyValue(image, image.getPlatform().getTemplate()); + property = new VMPropertyValue(image); } } } diff --git a/common-project/src/org/tizen/emulator/manager/vms/VMPropertyValue.java b/common-project/src/org/tizen/emulator/manager/vms/VMPropertyValue.java index 12e3f70..70eb545 100644 --- a/common-project/src/org/tizen/emulator/manager/vms/VMPropertyValue.java +++ b/common-project/src/org/tizen/emulator/manager/vms/VMPropertyValue.java @@ -93,6 +93,10 @@ public class VMPropertyValue implements Cloneable { private VMPropertyValue(){} // for clone + public VMPropertyValue(BaseImage image) { + this(image, image.getDefaultProperty()); + } + public VMPropertyValue(BaseImage image, VMProperty template) { this.baseImage = image; this.template = template; -- 2.7.4