svn commit: r688220 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r688220 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

doogie-3
Author: doogie
Date: Fri Aug 22 16:02:17 2008
New Revision: 688220

URL: http://svn.apache.org/viewvc?rev=688220&view=rev
Log:
Stop deprecation warnings about ByteWrapper.

Modified:
    ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java

Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=688220&r1=688219&r2=688220&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Fri Aug 22 16:02:17 2008
@@ -55,7 +55,6 @@
 import org.ofbiz.entity.model.ModelFieldType;
 import org.ofbiz.entity.model.ModelViewEntity;
 import org.ofbiz.entity.model.ModelViewEntity.ModelAlias;
-import org.ofbiz.entity.util.ByteWrapper;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 /**
@@ -637,6 +636,7 @@
         }
     }
 
+    @SuppressWarnings("deprecation")
     public byte[] getBytes(String name) {
         Object value = get(name);
         if (value == null) {
@@ -655,10 +655,10 @@
         if (value instanceof byte[]) {
             return (byte[]) value;
         }
-        if (value instanceof ByteWrapper) {
+        if (value instanceof org.ofbiz.entity.util.ByteWrapper) {
             // NOTE DEJ20071022: the use of ByteWrapper is not recommended and is deprecated, only old data should be stored that way
             Debug.logWarning("Found a ByteWrapper object in the database for field [" + this.getEntityName() + "." + name + "]; converting to byte[] and returning, but note that you need to update your database to unwrap these objects for future compatibility", module);
-            ByteWrapper wrapper = (ByteWrapper) value;
+            org.ofbiz.entity.util.ByteWrapper wrapper = (org.ofbiz.entity.util.ByteWrapper) value;
             return wrapper.getBytes();
         }
         // uh-oh, this shouldn't happen...