changeset 1026:6647dbc8be71

remove Buffer.CaseInsensitve
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 02 Nov 2016 23:52:33 -0600
parents cf0367978d8b
children 6d17a257b03f
files src/org/eclipse/jetty/io/AbstractBuffer.java src/org/eclipse/jetty/io/Buffer.java src/org/eclipse/jetty/io/ByteArrayBuffer.java
diffstat 3 files changed, 1 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
diff -r cf0367978d8b -r 6647dbc8be71 src/org/eclipse/jetty/io/AbstractBuffer.java
--- a/src/org/eclipse/jetty/io/AbstractBuffer.java	Wed Nov 02 23:46:43 2016 -0600
+++ b/src/org/eclipse/jetty/io/AbstractBuffer.java	Wed Nov 02 23:52:33 2016 -0600
@@ -85,11 +85,7 @@
 
 	private ByteArrayBuffer duplicate(int access)
 	{
-		Buffer b=this.buffer();
-		if (this instanceof Buffer.CaseInsensitve || b instanceof Buffer.CaseInsensitve)
-			return new ByteArrayBuffer.CaseInsensitive(asArray(), 0, length(),access);
-		else
-			return new ByteArrayBuffer(asArray(), 0, length(), access);
+		return new ByteArrayBuffer(asArray(), 0, length(), access);
 	}
 	
 	public Buffer asImmutableBuffer()
@@ -150,9 +146,6 @@
 		if (obj == null || !(obj instanceof Buffer)) return false;
 		Buffer b = (Buffer) obj;
 
-		if (this instanceof Buffer.CaseInsensitve ||  b instanceof Buffer.CaseInsensitve)
-			return equalsIgnoreCase(b);
-		
 		// reject different lengths
 		if (b.length() != length()) return false;
 
diff -r cf0367978d8b -r 6647dbc8be71 src/org/eclipse/jetty/io/Buffer.java
--- a/src/org/eclipse/jetty/io/Buffer.java	Wed Nov 02 23:46:43 2016 -0600
+++ b/src/org/eclipse/jetty/io/Buffer.java	Wed Nov 02 23:52:33 2016 -0600
@@ -351,12 +351,4 @@
 	/* ------------------------------------------------------------ */
 	String toString(Charset charset);
 
-	/*
-	 * Buffers implementing this interface should be compared with case insensitive equals
-	 *
-	 */
-	public interface CaseInsensitve
-	{}
-
-	
 }
diff -r cf0367978d8b -r 6647dbc8be71 src/org/eclipse/jetty/io/ByteArrayBuffer.java
--- a/src/org/eclipse/jetty/io/ByteArrayBuffer.java	Wed Nov 02 23:46:43 2016 -0600
+++ b/src/org/eclipse/jetty/io/ByteArrayBuffer.java	Wed Nov 02 23:52:33 2016 -0600
@@ -144,9 +144,6 @@
 		if (obj == null || !(obj instanceof Buffer)) 
 			return false;
 		
-		if (obj instanceof Buffer.CaseInsensitve)
-			return equalsIgnoreCase((Buffer)obj);
-		
 
 		Buffer b = (Buffer) obj;
 		
@@ -385,24 +382,4 @@
 		return _bytes.length - _put;
 	}
 
-	
-	public static class CaseInsensitive extends ByteArrayBuffer implements Buffer.CaseInsensitve
-	{
-		public CaseInsensitive(String s)
-		{
-			super(s);
-		}
-		
-		public CaseInsensitive(byte[] b, int o, int l, int rw)
-		{
-			super(b,o,l,rw);
-		}
-
-		@Override
-		public boolean equals(Object obj)
-		{
-			return obj instanceof Buffer && equalsIgnoreCase((Buffer)obj);
-		}
-		
-	}
 }