Skip to content

Commit

Permalink
remove registry
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChu authored and jumperchen committed Oct 6, 2023
1 parent fef2c40 commit 2081e73
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 407 deletions.
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

0 comments on commit 2081e73

Please sign in to comment.