Revision: 709 http://openutils.svn.sourceforge.net/openutils/?rev=709&view=rev Author: fcarone Date: 2008-02-29 07:33:01 -0800 (Fri, 29 Feb 2008) Log Message: ----------- fix for check on the original object during interception copyright added Modified Paths: -------------- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java Modified: trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java =================================================================== --- trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java 2008-02-27 13:19:33 UTC (rev 708) +++ trunk/openutils-spring-rmibernate/src/main/java/it/openutils/spring/rmibernate/server/aspects/SerializationInterceptor.java 2008-02-29 15:33:01 UTC (rev 709) @@ -1,3 +1,19 @@ +/* + * Copyright Openmind http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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 under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package it.openutils.spring.rmibernate.server.aspects; import it.openutils.spring.rmibernate.server.aspects.util.EntitySerializer; @@ -52,6 +68,7 @@ private static ThreadLocal<HibernateLazyService> hibernateLazyService = new ThreadLocal<HibernateLazyService>(); + @SuppressWarnings("unchecked") private static Map<Class, Object> proxies = Collections.synchronizedMap(new HashMap<Class, Object>()); /** @@ -106,6 +123,7 @@ * @param lazyRef reference to a lazy field * @return proxied object */ + @SuppressWarnings("unchecked") public static Object getEnhancedObject(Object o, SessionFactory sessionFactory, LazyReference lazyRef) { if (o == null) @@ -233,8 +251,7 @@ } if (original.getClass().getName().startsWith("java.") - && !(original instanceof Collection) - || (original instanceof Map)) + && !((original instanceof Collection) || (original instanceof Map))) { return original; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |