Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
retog committed Sep 5, 2009
1 parent 1e6cc11 commit b28d143
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 917 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.wymiwyg</groupId>
<artifactId>wrhapi</artifactId>
<version>0.7</version>
<version>0.8-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WRHAPI</name>
<build>
Expand Down Expand Up @@ -58,10 +58,10 @@
</build>
<description>Web Request Handler API</description>
<dependencies>
<dependency>
<!-- <dependency>
<groupId>org.wymiwyg</groupId>
<artifactId>wymiwyg-commons-core</artifactId>
</dependency>
</dependency> -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi_R4_core</artifactId>
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/wymiwyg/wrhapi/activator/Activator.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* cardinality="0..n"
* @scr.property name="port" value="8282"
* @scr.property name="mappings"
* values.name=""
* values.name="[placeholder]"
*
*/
public class Activator {
Expand Down Expand Up @@ -180,6 +180,9 @@ private Map<String, ParameterizedPath> getMappings(String[] mappings) throws IOE
Set<String> knownServiceNames = new HashSet<String>(nameServiceMap.
keySet());
for (String mapping : mappings) {
if ("[placeholder]".equals(mapping)) {
continue;
}
int firstEqualsPos = mapping.indexOf('=');
if (firstEqualsPos == -1) {
log.warn("invalid mapping " + mapping);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,14 @@
import java.util.SortedSet;
import java.util.TreeSet;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* @author reto
*/
public class AcceptHeaderIterator implements Iterator<AcceptHeaderEntry> {

Log log = LogFactory.getLog(AcceptHeaderIterator.class);
private Iterator<AcceptHeaderEntry> iterator;



/**
*
*/
Expand All @@ -87,7 +82,7 @@ public class AcceptHeaderIterator implements Iterator<AcceptHeaderEntry> {
AcceptHeaderEntry currentHeader = new AcceptHeaderEntry(currentstring);
acceptHeaderSet.add(currentHeader);
} catch (InvalidPatternException e) {
log.error(e.toString());
throw new RuntimeException(e);
}
}
iterator = acceptHeaderSet.iterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*/
package org.wymiwyg.wrhapi.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


import java.util.Iterator;
import java.util.SortedSet;
Expand All @@ -28,7 +27,7 @@
* @author reto
*/
public class AcceptLanguagesIterator implements Iterator<AcceptLanguageHeaderEntry> {
Log log = LogFactory.getLog(AcceptLanguagesIterator.class);

private Iterator<AcceptLanguageHeaderEntry> iterator;

/**
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/org/wymiwyg/wrhapi/util/EnhancedRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import java.util.Iterator;
import java.util.StringTokenizer;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.wymiwyg.wrhapi.HandlerException;
import org.wymiwyg.wrhapi.HeaderName;
import org.wymiwyg.wrhapi.Request;
Expand All @@ -38,7 +37,6 @@
* @author reto
*/
public class EnhancedRequest extends RequestWrapper {
private static final Log log = LogFactory.getLog(EnhancedRequest.class);

private String host;

Expand Down Expand Up @@ -180,7 +178,7 @@ public Cookie[] getCookies() throws HandlerException {
try {
resultCollection.add(new Cookie(tokens.nextToken()));
} catch (InvalidCookieException e) {
log.warn("Invalid cookie: " + e.toString());
throw new HandlerException(e);
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/org/wymiwyg/wrhapi/util/MediaRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@

import javax.activation.MimeType;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* @author reto
*/
public class MediaRange implements Comparable<MediaRange> {
private static Log logger = LogFactory.getLog(MediaRange.class);

private String type, subtype;
// accessed by AccedHeaderEntry
Map<String, String> parameters = new HashMap<String, String>();
Expand Down Expand Up @@ -145,9 +143,6 @@ && match(subtype, mimeType.getSubType())) {
*/
private boolean match(String pattern, String string) {
boolean result = pattern.equals("*") || pattern.equals(string);
if (logger.isDebugEnabled()) {
logger.debug(string + " matches " + pattern + "?" + result);
}
return result;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class KeyValuePair<T> {
String key;
T value;

KeyValuePair(String key, T value) {
public KeyValuePair(String key, T value) {
super();
this.key = key;
this.value = value;
Expand Down

This file was deleted.

Loading

0 comments on commit b28d143

Please sign in to comment.