From b68aa8b1b4d45ca5ae81e4ab0a24d7bd68245d7f Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 13:51:18 +0530 Subject: [PATCH 1/2] Fixing https://github.com/wso2/product-iots/issues/1142 --- .../mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 4a8e3dda95..291f541d11 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -194,7 +194,7 @@ public class AgentUI extends JFrame { lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2015, WSO2 Inc."); + jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220)); From ab8e4eac58c98972778c250ea402a8bbf5d707ea Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Wed, 17 Jan 2018 14:20:58 +0530 Subject: [PATCH 2/2] Retrieving current year for the copyright notice --- .../iot/virtualfirealarm/agent/virtual/ui/AgentUI.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java index 291f541d11..15b544389a 100644 --- a/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java +++ b/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/agent/virtual/ui/AgentUI.java @@ -22,10 +22,10 @@ import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentConstants import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.core.AgentManager; import org.wso2.carbon.device.mgt.iot.virtualfirealarm.agent.virtual.VirtualHardwareManager; -import javax.swing.*; import java.awt.*; -import java.net.URI; import java.net.URL; +import java.util.Calendar; +import javax.swing.*; public class AgentUI extends JFrame { @@ -193,8 +193,10 @@ public class AgentUI extends JFrame { lblAgentName.setHorizontalAlignment(SwingConstants.LEFT); lblAgentName.setText("Device Name: " + AgentManager.getInstance().getDeviceName()); + Calendar now = Calendar.getInstance(); + int currentYear = now.get(Calendar.YEAR); jLabel2.setHorizontalAlignment(SwingConstants.CENTER); - jLabel2.setText("Copyright (c) 2018, WSO2 Inc."); + jLabel2.setText("Copyright (c) " + currentYear + ", WSO2 Inc."); jPanel1.setBackground(new Color(220, 220, 220));