You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/09/15 01:26:54 UTC
[05/21] git commit: Remove unused classes.
Remove unused classes.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/808f5b09
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/808f5b09
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/808f5b09
Branch: refs/heads/master
Commit: 808f5b09b431587fe96b0f074540ea3d8e9709c0
Parents: d801e41
Author: Matt Sicker <ma...@apache.org>
Authored: Sun Sep 14 12:43:23 2014 -0500
Committer: Matt Sicker <ma...@apache.org>
Committed: Sun Sep 14 12:43:23 2014 -0500
----------------------------------------------------------------------
.../log4j/core/util/BundleResourceLoader.java | 57 --------------------
.../core/util/ClassLoaderResourceLoader.java | 54 -------------------
.../logging/log4j/core/util/ResourceLoader.java | 31 -----------
3 files changed, 142 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/808f5b09/log4j-core/src/main/java/org/apache/logging/log4j/core/util/BundleResourceLoader.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/BundleResourceLoader.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/BundleResourceLoader.java
deleted file mode 100644
index 6baf1bf..0000000
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/BundleResourceLoader.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.logging.log4j.core.util;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-
-import org.osgi.framework.Bundle;
-
-/**
- * Bundle-based ResourceLoader.
- */
-public final class BundleResourceLoader implements ResourceLoader {
-
- private final Bundle bundle;
-
- public BundleResourceLoader(final Bundle bundle) {
- this.bundle = bundle;
- }
-
- @Override
- public Class<?> loadClass(final String name) throws ClassNotFoundException {
- return bundle.loadClass(name);
- }
-
- @Override
- public URL getResource(final String name) {
- return bundle.getResource(name);
- }
-
- @Override
- public Enumeration<URL> getResources(final String name) throws IOException {
- final Enumeration<URL> enumeration = bundle.getResources(name);
- return enumeration;
- }
-
- @Override
- public String toString() {
- return this.getClass().getCanonicalName() + ": " + bundle.getSymbolicName();
- }
-}
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/808f5b09/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ClassLoaderResourceLoader.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ClassLoaderResourceLoader.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ClassLoaderResourceLoader.java
deleted file mode 100644
index 009d83d..0000000
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ClassLoaderResourceLoader.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.logging.log4j.core.util;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-
-/**
- * ClassLoader-based ResourceLoader.
- */
-public final class ClassLoaderResourceLoader implements ResourceLoader {
-
- private final ClassLoader loader;
-
- public ClassLoaderResourceLoader(final ClassLoader loader) {
- this.loader = loader != null ? loader : this.getClass().getClassLoader();
- }
-
- @Override
- public Class<?> loadClass(final String name) throws ClassNotFoundException {
- return loader.loadClass(name);
- }
-
- @Override
- public URL getResource(final String name) {
- return loader.getResource(name);
- }
-
- @Override
- public Enumeration<URL> getResources(final String name) throws IOException {
- return loader.getResources(name);
- }
-
- @Override
- public String toString() {
- return this.getClass().getCanonicalName() + '(' + loader.toString() + ')';
- }
-}
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/808f5b09/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ResourceLoader.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ResourceLoader.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ResourceLoader.java
deleted file mode 100644
index c714217..0000000
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/util/ResourceLoader.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.logging.log4j.core.util;
-
-import java.io.IOException;
-import java.net.URL;
-import java.util.Enumeration;
-
-/**
- * Abstract interface for a ClassLoader or similar object.
- */
-public interface ResourceLoader {
- Class<?> loadClass(String name) throws ClassNotFoundException;
- URL getResource(String name);
- Enumeration<URL> getResources(String name) throws IOException;
-}