Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove registry #3074

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions bin/genmd5sign

This file was deleted.

102 changes: 0 additions & 102 deletions bin/md5java

This file was deleted.

11 changes: 1 addition & 10 deletions zk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,7 @@ task gentime(type: Exec) {
commandLine './gentime', "$projectDir/codegen/resources/metainfo/zk/build"
}

task genmd5sign() {
doLast {
exec {
workingDir "$rootDir/bin"
commandLine './genmd5sign', "$projectDir/codegen/resources/metainfo/zk/buildsign", "org.zkoss.zk.ui.sys.WebAppFactoryImpl,org.zkoss.zk.ui.http.WebManager,org.zkoss.zk.ui.sys.Registry", "$projectDir/build/classes/java/main", "$projectDir/codegen/resources/metainfo/zk/build", "$rootDir"
}
}
}
genmd5sign.dependsOn(gentime)
gentime.mustRunAfter(compileJava)
processResources.dependsOn(genmd5sign)
processResources.dependsOn(gentime)

description = 'ZK Kernel'
4 changes: 0 additions & 4 deletions zk/src/main/java/org/zkoss/zk/ui/http/SimpleWebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
import org.zkoss.zk.ui.ext.ScopeListener;
import org.zkoss.zk.ui.impl.AbstractWebApp;
import org.zkoss.zk.ui.impl.ScopeListeners;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.util.Configuration;

/**
Expand All @@ -56,8 +54,6 @@ public void init(Object context, Configuration config) {
throw new IllegalArgumentException("context");
_ctx = (ServletContext) context;
super.init(context, config);

Registry.sign(this, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private final Map<String, Object> _attrs = new AttributesMap() {
Expand Down
4 changes: 0 additions & 4 deletions zk/src/main/java/org/zkoss/zk/ui/http/WebManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@
import org.zkoss.zk.ui.sys.ConfigParser;
import org.zkoss.zk.ui.sys.DesktopCtrl;
import org.zkoss.zk.ui.sys.ExecutionsCtrl;
import org.zkoss.zk.ui.sys.Registry;
import org.zkoss.zk.ui.sys.RequestInfo;
import org.zkoss.zk.ui.sys.SessionsCtrl;
import org.zkoss.zk.ui.sys.UiFactory;
import org.zkoss.zk.ui.sys.WebAppCtrl;
import org.zkoss.zk.ui.sys.WebAppFactory;
import org.zkoss.zk.ui.sys.WebAppFactoryImpl;
import org.zkoss.zk.ui.sys.WebAppsCtrl;
import org.zkoss.zk.ui.util.Configuration;

Expand Down Expand Up @@ -284,8 +282,6 @@ public WebManager(ServletContext ctx, String updateURI, String resourceURI) {
}
}
}

Registry.sign(_wapp, Registry.class, WebManager.class, WebAppFactoryImpl.class);
}

private void checkAndAddExtendlet(String ext, Extendlet extlet) {
Expand Down
24 changes: 0 additions & 24 deletions zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

import org.slf4j.Logger;
Expand Down Expand Up @@ -173,34 +172,11 @@ else if (config == null)
final XMLResourcesLocator locator = org.zkoss.zk.ui.impl.Utils.getXMLResourcesLocator();
final List<XMLResourcesLocator.Resource> xmls = locator.getDependentXMLResources("metainfo/zk/config.xml",
"config-name", "depends");

Registry reg = Registry.getInstance();
for (XMLResourcesLocator.Resource res : xmls) {
if (log.isDebugEnabled())
log.debug("Loading " + res.url);
try {
if (checkVersion(res.url, res.document)) {
try {
String path = res.url.toExternalForm();
int end = path.lastIndexOf('/'); // no need to use OS's separator
if (end >= 0) {
InputStream inputStream = null;
try {
path = path.substring(0, end + 1) + Strings.toString(Registry.PREFS_0);
inputStream = new URL(path).openStream();
if (inputStream != null) {
Properties props = new Properties();
props.load(inputStream);
for (Map.Entry<Object, Object> me : props.entrySet())
reg.addKeys((String) me.getKey(), (String) me.getValue());
}
} finally {
if (inputStream != null)
inputStream.close();
}
}
} catch (Exception ignored) {
}
final Element el = res.document.getRootElement();
if (!syscfgLoaded) {
parseSubZScriptConfig(el);
Expand Down
Loading