[Joafip-svn] SF.net SVN: joafip:[2955] trunk
Brought to you by:
luc_peuvrier
|
From: <luc...@us...> - 2011-10-30 03:34:35
|
Revision: 2955
http://joafip.svn.sourceforge.net/joafip/?rev=2955&view=rev
Author: luc_peuvrier
Date: 2011-10-30 03:34:28 +0000 (Sun, 30 Oct 2011)
Log Message:
-----------
fix done, no more NullProxyCallBack
Modified Paths:
--------------
trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperExternalizableExtend.java
trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperSerializableExtend.java
trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/UsingNullProxyCallBack.java
Removed Paths:
-------------
trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/NullProxyCallBack.java
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/entity/objectio/ObjectAndPersistInfo.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -41,7 +41,6 @@
import net.sf.joafip.store.service.objectio.ObjectIOInvalidClassException;
import net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation;
import net.sf.joafip.store.service.proxy.IProxyCallBackToImplement;
-import net.sf.joafip.store.service.proxy.NullProxyCallBack;
import net.sf.joafip.store.service.proxy.ProxyManager2;
/**
@@ -52,9 +51,6 @@
@NotStorableClass
public class ObjectAndPersistInfo extends ObjectAndItsClassInfo {
- private static final NullProxyCallBack NULL_PROXY_CALL_BACK_INSTANCE = NullProxyCallBack
- .getInstance();
-
private static final ObjectClassInfoAndDeclared[] NO_WROTE_OBJECTS =
/**/new ObjectClassInfoAndDeclared[0];
@@ -125,7 +121,7 @@
public FieldInfo[] fieldToSetInfo;
- private IProxyCallBackToImplement proxyCallBack = NULL_PROXY_CALL_BACK_INSTANCE;
+ private IProxyCallBackToImplement proxyCallBack;
private final boolean proxyIntanceOrEnhanced;
Deleted: trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/NullProxyCallBack.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/NullProxyCallBack.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/NullProxyCallBack.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -1,201 +0,0 @@
-/*
- * Copyright 2009 Luc Peuvrier
- *
- * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE
- * Licensed under the LGPL License, Version 3, 29 June 2007 (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.gnu.org/licenses/lgpl.html
- *
- * 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 net.sf.joafip.store.service.proxy;
-
-import net.sf.joafip.NotStorableClass;
-import net.sf.joafip.store.entity.objectio.ObjectAndPersistInfo;
-import net.sf.joafip.store.service.classinfo.ClassInfoFactory;
-import net.sf.joafip.store.service.objectio.ObjectIOClassNotFoundException;
-import net.sf.joafip.store.service.objectio.ObjectIODataCorruptedException;
-import net.sf.joafip.store.service.objectio.ObjectIODataRecordNotFoundException;
-import net.sf.joafip.store.service.objectio.ObjectIOException;
-import net.sf.joafip.store.service.objectio.ObjectIOInvalidClassException;
-import net.sf.joafip.store.service.objectio.ObjectIONotSerializableException;
-import net.sf.joafip.store.service.objectio.manager.IObjectIOManagerForProxyObjectIO;
-
-/**
- *
- * @author luc peuvrier
- *
- */
-@NotStorableClass
-public final class NullProxyCallBack implements IProxyCallBack,
- IProxyCallBackToImplement {
-
- public static final NullProxyCallBack INSTANCE =
- /**/new NullProxyCallBack();
-
- private NullProxyCallBack() {
- super();
- }
-
- public static NullProxyCallBack getInstance() {
- return INSTANCE;
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void initialize$JOAFIP$(IProxyCallBackToImplement proxyCallBack)
- throws ProxyException {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void initializeFileAccessSessionIdentifier(
- final IObjectIOManagerForProxyObjectIO objectIOManager) {
- throw new UnsupportedOperationException();
- // do nothing
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void intercept$JOAFIP$() {
- // FIXMELUC ___call when proxied construct, construct not need
- // interception
- // throw new UnsupportedOperationException();
- // do nothing
- }
-
- @SuppressWarnings("PMD")
- @Override
- public void constructorEnd$JOAFIP$() {
- // no implementation
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void methodEnd$JOAFIP$() {
- // FIXMELUC ___call when proxied construct, construct not need
- // interception
- // throw new UnsupportedOperationException();
- // do nothing
- }
-
- @Override
- @SuppressWarnings("PMD")
- public boolean isLoaded$JOAFIP$() {
- throw new UnsupportedOperationException();
- // not loaded also means not construct
- // return false;
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void forceLoad$JOAFIP$() throws ObjectIOException,
- ObjectIODataRecordNotFoundException, ObjectIOInvalidClassException,
- ObjectIOClassNotFoundException, ObjectIODataCorruptedException,
- ObjectIONotSerializableException {
- // do nothing
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void unload$JOAFIP$() {
- // do nothing
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public long getMyFileAccessSessionIdentifier$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void setIsLoaded$JOAFIP$() throws ObjectIOException {
- throw new UnsupportedOperationException();
- }
-
- @SuppressWarnings("PMD")
- @Override
- public void setIsLoadedNoSave$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void setLoading$JOAFIP$(final boolean loading) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public IObjectIOManagerForProxyObjectIO getObjectIOManager$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public ClassInfoFactory getClassInfoFactory$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void setInstance$JOAFIP$(
- final ObjectAndPersistInfo objectAndPersistInfo) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public ObjectAndPersistInfo getInstance$JOAFIP$() {
- throw new UnsupportedOperationException();
- // return null;
- }
-
- @Override
- public IProxyCallBackToImplement getProxyCallBack$JOAFIP$() {// NOPMD
- return this;
- }
-
- @Override
- @SuppressWarnings("PMD")
- public void setProxyCallBack$JOAFIP$(
- final IProxyCallBackToImplement proxyCallBack) {
- // no implementation
- throw new UnsupportedOperationException();
- }
-
- // @Override
- // @SuppressWarnings("PMD")
- // public Exception getLoadTrace$JOAFIP$() {
- // // no implementation
- // return null;
- // }
-
- // @Override
- // @SuppressWarnings("PMD")
- // public Exception getUnloadTrace$JOAFIP$() {
- // // no implementation
- // return null;
- // }
-
- @Override
- @SuppressWarnings("PMD")
- public int getInObjectCount$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- @SuppressWarnings("PMD")
- public boolean isAutoSaveEnabled$JOAFIP$() {
- throw new UnsupportedOperationException();
- }
-}
Modified: trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java
===================================================================
--- trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip/src/main/java/net/sf/joafip/store/service/proxy/ProxyManager2.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -48,9 +48,6 @@
@NotStorableClass
public final class ProxyManager2 implements IProxyManagerForObjectIO {
- private static final NullProxyCallBack NULL_PROXY_CALL_BACK_INSTANCE = NullProxyCallBack
- .getInstance();
-
private static final String NO_OBJECT_CLASS =
/**/"object class information is not defined: error proxy call back is not setted for ";
@@ -279,7 +276,6 @@
objectAndPersistInfo.setStorageInfo(storageInfo);
if (constructed) {
- assert getProxyCallBack(instanceCreated) != NULL_PROXY_CALL_BACK_INSTANCE;
assert objectAndPersistInfo.isNotWeak();
objectAndPersistInfo.setIsLoaded();
}
@@ -592,8 +588,7 @@
final Object object) {
final IProxyCallBackToImplement proxyCallBack = getProxyCallBack(object);
final ObjectAndPersistInfo objectAndPersistInfo;
- if (proxyCallBack == null
- || proxyCallBack == NULL_PROXY_CALL_BACK_INSTANCE) {// NOPMD
+ if (proxyCallBack == null) {
objectAndPersistInfo = null;
} else {
objectAndPersistInfo = proxyCallBack.getInstance$JOAFIP$();
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperExternalizableExtend.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperExternalizableExtend.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperExternalizableExtend.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -4,19 +4,16 @@
import java.io.ObjectInput;
import net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation;
-import net.sf.joafip.store.service.proxy.NullProxyCallBack;
@SuppressWarnings("PMD")
public class SuperExternalizableExtend extends SuperExternalizable {
+ @SuppressWarnings("unused")
private IProxyCallBackProxyDelegation $proxyCallBack$;// NOPMD
@Override
public void readExternal(final ObjectInput in) throws IOException,
ClassNotFoundException {
- if ($proxyCallBack$ == null) {
- $proxyCallBack$ = NullProxyCallBack.INSTANCE;
- }
super.readExternal(in);
}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperSerializableExtend.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperSerializableExtend.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/SuperSerializableExtend.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -4,7 +4,6 @@
import java.io.ObjectInputStream;
import net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation;
-import net.sf.joafip.store.service.proxy.NullProxyCallBack;
@SuppressWarnings("PMD")
public class SuperSerializableExtend extends SuperSerializable {
@@ -14,14 +13,12 @@
*/
private static final long serialVersionUID = -5560800790933799145L;
+ @SuppressWarnings("unused")
private IProxyCallBackProxyDelegation $proxyCallBack$;// NOPMD
@Override
protected void readObject(final ObjectInputStream in) throws IOException,
ClassNotFoundException {
- if ($proxyCallBack$ == null) {
- $proxyCallBack$ = NullProxyCallBack.INSTANCE;
- }
super.readObject(in);
}
Modified: trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/UsingNullProxyCallBack.java
===================================================================
--- trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/UsingNullProxyCallBack.java 2011-10-30 03:09:09 UTC (rev 2954)
+++ trunk/joafip-4test/src/main/java/net/sf/joafip/store/service/bytecode/UsingNullProxyCallBack.java 2011-10-30 03:34:28 UTC (rev 2955)
@@ -1,12 +1,11 @@
package net.sf.joafip.store.service.bytecode;
import net.sf.joafip.store.service.proxy.IProxyCallBack;
-import net.sf.joafip.store.service.proxy.NullProxyCallBack;
@SuppressWarnings("PMD")
public class UsingNullProxyCallBack {
- IProxyCallBack proxyCallBack = NullProxyCallBack.INSTANCE;
+ IProxyCallBack proxyCallBack;
public UsingNullProxyCallBack() {// NOPMD
super();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|