Skip to content

Commit

Permalink
Merge pull request #8 from 2lambda123/disable-codebase-field
Browse files Browse the repository at this point in the history
Respect the property com.gs.transport_protocol.lrmi.support-codebase …
  • Loading branch information
2lambda123 authored Jan 19, 2024
2 parents 1859601 + 624b3e5 commit 3065af1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
@com.gigaspaces.api.InternalApi
public class EntryClassBase implements Serializable {

private static final boolean support_code_base = Boolean.getBoolean("com.gs.transport_protocol.lrmi.support-codebase");

private static final long serialVersionUID = 2L;

/**
Expand Down Expand Up @@ -55,7 +57,7 @@ public EntryClassBase(EntryClass eclass, String codebase) {
* Sets the codebase to the codebase of the given class.
*/
public void setCodebase(Class cls) {
codebase = RMIClassLoader.getClassAnnotation(cls);
codebase = support_code_base ? RMIClassLoader.getClassAnnotation(cls) : null;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
@com.gigaspaces.api.InternalApi
public class ServiceTypeBase implements Serializable {

private static final boolean support_code_base = Boolean.getBoolean("com.gs.transport_protocol.lrmi.support-codebase");

private static final long serialVersionUID = 2L;

/**
Expand Down Expand Up @@ -55,7 +57,7 @@ public ServiceTypeBase(ServiceType type, String codebase) {
* Sets the codebase to the codebase of the given class.
*/
public void setCodebase(Class cls) {
codebase = RMIClassLoader.getClassAnnotation(cls);
codebase = support_code_base ? RMIClassLoader.getClassAnnotation(cls) : null;
}

/**
Expand Down

0 comments on commit 3065af1

Please sign in to comment.