felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1368464 - in /felix/trunk/bundleplugin/src/main/java/aQute: bnd/osgi/ bnd/service/repository/ lib/deployer/ lib/io/ lib/json/
Date Thu, 02 Aug 2012 13:26:26 GMT
Author: mcculls
Date: Thu Aug  2 13:26:25 2012
New Revision: 1368464

URL: http://svn.apache.org/viewvc?rev=1368464&view=rev
Log:
Another (in-place) bndlib update

Added:
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo
Modified:
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
    felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/io/IO.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/io/packageinfo
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/Handler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java
    felix/trunk/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Domain.java Thu Aug  2 13:26:25
2012
@@ -288,11 +288,15 @@ public abstract class Domain implements 
 			String url = e.getKey();
 			if (selected == null)
 				selected = url;
-
-			int size = Converter.cnv(Integer.class, e.getValue().get("size"));
-			if (size != 0 && Math.abs(requestedSize - size) < dist) {
-				dist = Math.abs(requestedSize - size);
-				selected = url;
+			if (e.getValue() != null) {
+				String s = e.getValue().get("size");
+				if (s != null) {
+					int size = Converter.cnv(Integer.class, s);
+					if (size != 0 && Math.abs(requestedSize - size) < dist) {
+						dist = Math.abs(requestedSize - size);
+						selected = url;
+					}
+				}
 			}
 		}
 		return selected;
@@ -300,6 +304,6 @@ public abstract class Domain implements 
 
 	public void setConditionalPackage(String string) {
 		set(CONDITIONAL_PACKAGE, string);
-		
+
 	}
 }

Modified: felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/osgi/Processor.java Thu Aug  2 13:26:25
2012
@@ -358,6 +358,9 @@ public class Processor extends Domain im
 					Class< ? > c = loader.loadClass(key);
 					Object plugin = c.newInstance();
 					customize(plugin, entry.getValue());
+					if ( plugin instanceof Closeable){
+						addClose((Closeable)plugin);
+					}
 					list.add(plugin);
 				}
 				catch (Throwable t) {

Added: felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo?rev=1368464&view=auto
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo (added)
+++ felix/trunk/bundleplugin/src/main/java/aQute/bnd/service/repository/packageinfo Thu Aug
 2 13:26:25 2012
@@ -0,0 +1 @@
+version 1.0

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/deployer/FileRepo.java Thu Aug  2 13:26:25
2012
@@ -147,21 +147,26 @@ public class FileRepo implements Plugin,
 		else
 			version = new Version(versionString);
 
-		reporter.trace("bsn=%s version=%s", bsn, version);
+		if (reporter != null)
+			reporter.trace("bsn=%s version=%s", bsn, version);
 
 		File dir = new File(root, bsn);
 		dir.mkdirs();
 		String fName = bsn + "-" + version.getWithoutQualifier() + ".jar";
 		File file = new File(dir, fName);
 
-		reporter.trace("updating %s ", file.getAbsolutePath());
+		if (reporter != null)
+			reporter.trace("updating %s ", file.getAbsolutePath());
 		if (!file.exists() || file.lastModified() < jar.lastModified()) {
 			jar.write(file);
-			reporter.progress(-1, "updated " + file.getAbsolutePath());
+			if (reporter != null)
+				reporter.progress(-1, "updated " + file.getAbsolutePath());
 			fireBundleAdded(jar, file);
 		} else {
-			reporter.progress(-1, "Did not update " + jar + " because repo has a newer version");
-			reporter.trace("NOT Updating " + fName + " (repo is newer)");
+			if (reporter != null) {
+				reporter.progress(-1, "Did not update " + jar + " because repo has a newer version");
+				reporter.trace("NOT Updating " + fName + " (repo is newer)");
+			}
 		}
 
 		File latest = new File(dir, bsn + "-latest.jar");

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/io/IO.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/io/IO.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/io/IO.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/io/IO.java Thu Aug  2 13:26:25 2012
@@ -222,6 +222,38 @@ public class IO {
 		return sw.toString();
 	}
 
+	/**
+	 * Create a temporary file.
+	 *
+	 * @param directory
+	 *            the directory in which to create the file. Can be null, in
+	 *            which case the system TMP directory is used
+	 * @param pattern
+	 *            the filename prefix pattern. Must be at least 3 characters
+	 *            long
+	 * @param suffix
+	 *            the filename suffix. Can be null, in which case (system)
+	 *            default suffix is used
+	 * @return
+	 * @throws IllegalArgumentException
+	 *             when pattern is null or too short
+	 * @throws IOException
+	 *             when the specified (non-null) directory is not a directory
+	 */
+	public static File createTempFile(File directory, String pattern, String suffix) throws
IllegalArgumentException,
+			IOException {
+		if ((pattern == null) || (pattern.length() < 3)) {
+			throw new IllegalArgumentException("Pattern must be at least 3 characters long, got "
+					+ ((pattern == null) ? "null" : pattern.length()));
+		}
+
+		if ((directory != null) && !directory.isDirectory()) {
+			throw new FileNotFoundException("Directory " + directory + " is not a directory");
+		}
+
+		return File.createTempFile(pattern, suffix, directory);
+	}
+
 	public static File getFile(String filename) {
 		return new File(filename.replace("/", File.separator));
 	}

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/io/packageinfo
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/io/packageinfo?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/io/packageinfo (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/io/packageinfo Thu Aug  2 13:26:25 2012
@@ -1 +1 @@
-version 1.2.0
+version 1.3.0

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/BooleanHandler.java Thu Aug  2 13:26:25
2012
@@ -12,22 +12,22 @@ public class BooleanHandler extends Hand
 	}
 
 	@Override
-	Object decode(boolean s) {
+	Object decode(Decoder dec, boolean s) {
 		return s;
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		return Boolean.parseBoolean(s);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		return s.intValue() != 0;
 	}
 
 	@Override
-	Object decode() {
+	Object decode(Decoder dec) {
 		return false;
 	}
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/ByteArrayHandler.java Thu Aug  2
13:26:25 2012
@@ -5,12 +5,16 @@ import java.lang.reflect.*;
 import java.util.*;
 
 import aQute.lib.base64.*;
+import aQute.lib.hex.*;
 
 public class ByteArrayHandler extends Handler {
 
 	@Override
 	void encode(Encoder app, Object object, Map<Object,Type> visited) throws IOException,
Exception {
-		StringHandler.string(app, Base64.encodeBase64((byte[]) object));
+		if ( app.codec.isHex())
+			StringHandler.string(app, Hex.toHexString((byte[]) object));
+		else
+			StringHandler.string(app, Base64.encodeBase64((byte[]) object));
 	}
 
 	@Override
@@ -26,7 +30,10 @@ public class ByteArrayHandler extends Ha
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
-		return Base64.decodeBase64(s);
+	Object decode(Decoder dec, String s) throws Exception {
+		if ( dec.codec.isHex())
+			return Hex.toByteArray(s);
+		else
+			return Base64.decodeBase64(s);
 	}
 }

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/CharacterHandler.java Thu Aug  2
13:26:25 2012
@@ -13,22 +13,22 @@ public class CharacterHandler extends Ha
 	}
 
 	@Override
-	Object decode(boolean s) {
+	Object decode(Decoder dec, boolean s) {
 		return s ? 't' : 'f';
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		return (char) Integer.parseInt(s);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		return (char) s.shortValue();
 	}
 
 	@Override
-	Object decode() {
+	Object decode(Decoder dec) {
 		return 0;
 	}
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/DateHandler.java Thu Aug  2 13:26:25
2012
@@ -18,14 +18,14 @@ public class DateHandler extends Handler
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		synchronized (sdf) {
 			return sdf.parse(s);
 		}
 	}
 
 	@Override
-	Object decode(Number s) throws Exception {
+	Object decode(Decoder dec, Number s) throws Exception {
 		return new Date(s.longValue());
 	}
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/EnumHandler.java Thu Aug  2 13:26:25
2012
@@ -17,8 +17,9 @@ public class EnumHandler extends Handler
 		StringHandler.string(app, object.toString());
 	}
 
+	@Override
 	@SuppressWarnings("unchecked")
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		return Enum.valueOf(type, s);
 	}
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/FileHandler.java Thu Aug  2 13:26:25
2012
@@ -25,7 +25,8 @@ public class FileHandler extends Handler
 		}
 	}
 
-	Object decode(String s) throws Exception {
+	@Override
+	Object decode(Decoder dec, String s) throws Exception {
 		File tmp = File.createTempFile("json", ".bin");
 		FileOutputStream fout = new FileOutputStream(tmp);
 		try {

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/Handler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/Handler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/Handler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/Handler.java Thu Aug  2 13:26:25
2012
@@ -15,19 +15,19 @@ abstract class Handler {
 		throw new UnsupportedOperationException("Cannot be mapped to array " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") String s) throws Exception {
+	Object decode(Decoder dec, @SuppressWarnings("unused") String s) throws Exception {
 		throw new UnsupportedOperationException("Cannot be mapped to string " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") Number s) throws Exception {
+	Object decode(Decoder dec, @SuppressWarnings("unused") Number s) throws Exception {
 		throw new UnsupportedOperationException("Cannot be mapped to number " + this);
 	}
 
-	Object decode(@SuppressWarnings("unused") boolean s) {
+	Object decode(Decoder dec, @SuppressWarnings("unused") boolean s) {
 		throw new UnsupportedOperationException("Cannot be mapped to boolean " + this);
 	}
 
-	Object decode() {
+	Object decode(Decoder dec) {
 		return null;
 	}
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/JSONCodec.java Thu Aug  2 13:26:25
2012
@@ -51,6 +51,7 @@ public class JSONCodec {
 	private static ByteArrayHandler					byteh				= new ByteArrayHandler();
 
 	boolean											ignorenull;
+	boolean											useHex;
 
 	/**
 	 * Create a new Encoder with the state and appropriate API.
@@ -191,7 +192,8 @@ public class JSONCodec {
 					else if (Map.class.isAssignableFrom(rawClass))
 						h = new MapHandler(rawClass, pt.getActualTypeArguments()[0], pt.getActualTypeArguments()[1]);
 					else if (Dictionary.class.isAssignableFrom(rawClass))
-						h = new MapHandler(Hashtable.class, pt.getActualTypeArguments()[0], pt.getActualTypeArguments()[1]);
+						h = new MapHandler(Hashtable.class, pt.getActualTypeArguments()[0],
+								pt.getActualTypeArguments()[1]);
 					else
 						throw new IllegalArgumentException("Found a parameterized type that is not a map or
collection");
 				}
@@ -270,19 +272,19 @@ public class JSONCodec {
 				return h.decodeArray(isr);
 
 			case '"' :
-				return h.decode(parseString(isr));
+				return h.decode(isr, parseString(isr));
 
 			case 'n' :
 				isr.expect("ull");
-				return h.decode();
+				return h.decode(isr);
 
 			case 't' :
 				isr.expect("rue");
-				return h.decode(Boolean.TRUE);
+				return h.decode(isr,Boolean.TRUE);
 
 			case 'f' :
 				isr.expect("alse");
-				return h.decode(Boolean.FALSE);
+				return h.decode(isr,Boolean.FALSE);
 
 			case '0' :
 			case '1' :
@@ -295,7 +297,7 @@ public class JSONCodec {
 			case '8' :
 			case '9' :
 			case '-' :
-				return h.decode(parseNumber(isr));
+				return h.decode(isr,parseNumber(isr));
 
 			default :
 				throw new IllegalArgumentException("Unexpected character in input stream: " + (char)
c);
@@ -486,4 +488,19 @@ public class JSONCodec {
 		return ignorenull;
 	}
 
+	/**
+	 * Use hex instead of default base 64 encoding
+	 * 
+	 * @param useHex
+	 * @return
+	 */
+	public JSONCodec setHex(boolean useHex) {
+		this.useHex = useHex;
+		return this;
+	}
+
+	public boolean isHex() {
+		return useHex;
+	}
+
 }
\ No newline at end of file

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/MapHandler.java Thu Aug  2 13:26:25
2012
@@ -62,7 +62,7 @@ public class MapHandler extends Handler 
 			Object key = r.codec.parseString(r);
 			if (!(keyType == null || keyType == Object.class)) {
 				Handler h = r.codec.getHandler(keyType);
-				key = h.decode((String) key);
+				key = h.decode(r,(String) key);
 			}
 
 			c = r.skipWs();

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/NumberHandler.java Thu Aug  2 13:26:25
2012
@@ -21,23 +21,23 @@ public class NumberHandler extends Handl
 	}
 
 	@Override
-	Object decode(boolean s) {
-		return decode(s ? 1d : 0d);
+	Object decode(Decoder dec, boolean s) {
+		return decode(dec,s ? 1d : 0d);
 	}
 
 	@Override
-	Object decode(String s) {
+	Object decode(Decoder dec, String s) {
 		double d = Double.parseDouble(s);
-		return decode(d);
+		return decode(dec, d);
 	}
 
 	@Override
-	Object decode() {
-		return decode(0d);
+	Object decode(Decoder dec) {
+		return decode(dec,0d);
 	}
 
 	@Override
-	Object decode(Number s) {
+	Object decode(Decoder dec, Number s) {
 		double dd = s.doubleValue();
 
 		if (type == double.class || type == Double.class)

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/SpecialHandler.java Thu Aug  2 13:26:25
2012
@@ -25,7 +25,7 @@ public class SpecialHandler extends Hand
 	}
 
 	@Override
-	Object decode(String s) throws Exception {
+	Object decode(Decoder dec, String s) throws Exception {
 		if (type == Pattern.class)
 			return Pattern.compile(s);
 

Modified: felix/trunk/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java?rev=1368464&r1=1368463&r2=1368464&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java (original)
+++ felix/trunk/bundleplugin/src/main/java/aQute/lib/json/StringHandler.java Thu Aug  2 13:26:25
2012
@@ -59,19 +59,23 @@ public class StringHandler extends Handl
 		app.append('"');
 	}
 
-	Object decode(String s) throws Exception {
+	@Override
+	Object decode(Decoder dec, String s) throws Exception {
 		return s;
 	}
 
-	Object decode(Number s) {
+	@Override
+	Object decode(Decoder dec, Number s) {
 		return s.toString();
 	}
 
-	Object decode(boolean s) {
+	@Override
+	Object decode(Decoder dec, boolean s) {
 		return Boolean.toString(s);
 	}
 
-	Object decode() {
+	@Override
+	Object decode(Decoder dec ) {
 		return null;
 	}
 
@@ -87,6 +91,7 @@ public class StringHandler extends Handl
 	 * An array can be assigned to a string. This means that the stream is
 	 * interpreted as the array but stored in its complete in the string.
 	 */
+	@Override
 	Object decodeArray(Decoder r) throws Exception {
 		return collect(r, ']');
 	}



Mime
View raw message