details: https://code.openbravo.com/erp/devel/pi/rev/e175a39a03a5
changeset: 33457:e175a39a03a5
user: Carlos Aristu <carlos.aristu <at> openbravo.com>
date: Fri Feb 16 09:03:06 2018 +0100
summary: fixes bug 37941: remove [dep-ann] warnings by adding the @Deprecated
annotation
Added missing @Deprecated annotation in:
- BaseProcessActionHandler.fixRequestMap: as method is still referenced in
other modules.
- HttpSessionWrapper: implementing HttpSession interface, so need to keep the
deprecated methods. Removed autogenerated TODO comments also.
- BaseTest: the whole class is deprecated but still used in other modules
(src-test).
- DalUtil.getId: recently deprecated, for the moment it is safer to add the
annotation and keep it.
- Utility.getTabURL + getTransplatedJasperReport: both used in several
modules still.
diffstat:
modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java
| 3 +-
src-core/src/org/openbravo/base/HttpSessionWrapper.java
| 18 ++-------
src-core/src/org/openbravo/database/SessionInfo.java
| 2 +
src-test/src/org/openbravo/test/base/BaseTest.java
| 5 ++-
src/org/openbravo/dal/core/DalUtil.java
| 3 +-
src/org/openbravo/erpCommon/utility/Utility.java
| 2 +
6 files changed, 17 insertions(+), 16 deletions(-)
diffs (218 lines):
diff -r 8d0fbb9abd2e -r e175a39a03a5
modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java
---
a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java
Thu Jan 25 12:46:30 2018 -0500
+++
b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java
Fri Feb 16 09:03:06 2018 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2017 Openbravo SLU
+ * All portions are Copyright (C) 2010-2018 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -220,6 +220,7 @@
*
* @deprecated use {@link BaseProcessActionHandler#fixRequestMap(Map,
JSONObject)}
*/
+ @Deprecated
protected Map<String, String> fixRequestMap(Map<String, Object> parameters) {
return fixRequestMap(parameters, null);
}
diff -r 8d0fbb9abd2e -r e175a39a03a5
src-core/src/org/openbravo/base/HttpSessionWrapper.java
--- a/src-core/src/org/openbravo/base/HttpSessionWrapper.java Thu Jan 25
12:46:30 2018 -0500
+++ b/src-core/src/org/openbravo/base/HttpSessionWrapper.java Fri Feb 16
09:03:06 2018 +0100
@@ -1,6 +1,6 @@
/*
************************************************************************************
- * Copyright (C) 2014 Openbravo S.L.U.
+ * Copyright (C) 2014-2018 Openbravo S.L.U.
* Licensed under the Apache Software License version 2.0
* You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
distributed
@@ -42,25 +42,21 @@
@Override
public long getCreationTime() {
- // TODO Auto-generated method stub
return 0;
}
@Override
public String getId() {
- // TODO Auto-generated method stub
return null;
}
@Override
public long getLastAccessedTime() {
- // TODO Auto-generated method stub
return 0;
}
@Override
public int getMaxInactiveInterval() {
- // TODO Auto-generated method stub
return 0;
}
@@ -72,15 +68,16 @@
/**
* @deprecated
*/
+ @Deprecated
@Override
public javax.servlet.http.HttpSessionContext getSessionContext() {
- // TODO Auto-generated method stub
return null;
}
/**
* @deprecated
*/
+ @Deprecated
@Override
public Object getValue(String arg0) {
return null;
@@ -89,6 +86,7 @@
/**
* @deprecated
*/
+ @Deprecated
@Override
public String[] getValueNames() {
return null;
@@ -96,13 +94,10 @@
@Override
public void invalidate() {
- // TODO Auto-generated method stub
-
}
@Override
public boolean isNew() {
- // TODO Auto-generated method stub
return false;
}
@@ -112,8 +107,6 @@
@Deprecated
@Override
public void putValue(String arg0, Object arg1) {
- // TODO Auto-generated method stub
-
}
@Override
@@ -124,9 +117,9 @@
/**
* @deprecated
*/
+ @Deprecated
@Override
public void removeValue(String arg0) {
- // TODO Auto-generated method stub
}
@Override
@@ -136,6 +129,5 @@
@Override
public void setMaxInactiveInterval(int arg0) {
- // TODO Auto-generated method stub
}
}
diff -r 8d0fbb9abd2e -r e175a39a03a5
src-core/src/org/openbravo/database/SessionInfo.java
--- a/src-core/src/org/openbravo/database/SessionInfo.java Thu Jan 25
12:46:30 2018 -0500
+++ b/src-core/src/org/openbravo/database/SessionInfo.java Fri Feb 16
09:03:06 2018 +0100
@@ -199,6 +199,7 @@
* explicit in the code this need
* @see #saveContextInfoIntoDB(Connection)
*/
+ @Deprecated
static void setDBSessionInfo(Connection conn, boolean onlyIfChanged) {
if (!isAuditActive || (onlyIfChanged && (changedInfo.get() == null ||
!changedInfo.get()))) {
if (log4j.isDebugEnabled()) {
@@ -214,6 +215,7 @@
* @deprecated In most of the cases this method is no longer required to be
invoked
* @see #saveContextInfoIntoDB(Connection)
*/
+ @Deprecated
public static void setDBSessionInfo(Connection conn) {
saveContextInfoIntoDB(conn);
}
diff -r 8d0fbb9abd2e -r e175a39a03a5
src-test/src/org/openbravo/test/base/BaseTest.java
--- a/src-test/src/org/openbravo/test/base/BaseTest.java Thu Jan 25
12:46:30 2018 -0500
+++ b/src-test/src/org/openbravo/test/base/BaseTest.java Fri Feb 16
09:03:06 2018 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2014 Openbravo SLU
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -61,6 +61,7 @@
* @author iperdomo
*/
+@Deprecated
public class BaseTest extends TestCase {
private static final Logger log = Logger.getLogger(BaseTest.class);
@@ -207,6 +208,7 @@
* @deprecated Behavior has been implemented in the {@link
OBPropertiesProvider}. Is now done
* automatically when initializing the DAL layer.
*/
+ @Deprecated
protected void setConfigPropertyFiles() {
}
@@ -390,6 +392,7 @@
* @param errorOccured
* @deprecated
*/
+ @Deprecated
public void setErrorOccured(boolean errorOccured) {
this.errorOccured = errorOccured;
}
diff -r 8d0fbb9abd2e -r e175a39a03a5 src/org/openbravo/dal/core/DalUtil.java
--- a/src/org/openbravo/dal/core/DalUtil.java Thu Jan 25 12:46:30 2018 -0500
+++ b/src/org/openbravo/dal/core/DalUtil.java Fri Feb 16 09:03:06 2018 +0100
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2015 Openbravo SLU
+ * All portions are Copyright (C) 2008-2018 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -436,6 +436,7 @@
* @deprecated It is not needed to used this method for lazy loading of id
in a proxy. Kept only
* for backwards compatibility.
*/
+ @Deprecated
public static Serializable getId(Object o) {
if (o instanceof HibernateProxy) {
return ((HibernateProxy)
o).getHibernateLazyInitializer().getIdentifier();
diff -r 8d0fbb9abd2e -r e175a39a03a5
src/org/openbravo/erpCommon/utility/Utility.java
--- a/src/org/openbravo/erpCommon/utility/Utility.java Thu Jan 25 12:46:30
2018 -0500
+++ b/src/org/openbravo/erpCommon/utility/Utility.java Fri Feb 16 09:03:06
2018 +0100
@@ -1670,6 +1670,7 @@
* {@link
org.openbravo.client.application.report.ReportingUtils#getTranslatedJasperReport(ConnectionProvider,
String, String, String)}
* instead.
*/
+ @Deprecated
public static JasperReport getTranslatedJasperReport(ConnectionProvider
conn, String reportName,
String language, String baseDesignPath) throws JRException {
return ReportingUtils.getTranslatedJasperReport(conn, reportName,
language, baseDesignPath);
@@ -1728,6 +1729,7 @@
/**
* @deprecated use {@link Utility#getTabURL(String, String, boolean)}
*/
+ @Deprecated
public static String getTabURL(ConnectionProvider conn, String tabId, String
type) {
return getTabURL(tabId, type, true);
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits