diff options
author | Jörg Barfurth <jb@openoffice.org> | 2001-07-06 07:42:02 +0000 |
---|---|---|
committer | Jörg Barfurth <jb@openoffice.org> | 2001-07-06 07:42:02 +0000 |
commit | 7d92e8553afa713d61c4fdd526f1efa532df4276 (patch) | |
tree | ff1254880ba47fd72f46cf5fb29e4ee2563ebe4a /officecfg | |
parent | aceea75918a740b3b5b7ddab7f1dddfd7a096aa9 (diff) |
Fallback for case of failing to decode an encoded name
Diffstat (limited to 'officecfg')
-rw-r--r-- | officecfg/org/openoffice/configuration/Decoder.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/officecfg/org/openoffice/configuration/Decoder.java b/officecfg/org/openoffice/configuration/Decoder.java index 649e69343db9..d153d1f8844d 100644 --- a/officecfg/org/openoffice/configuration/Decoder.java +++ b/officecfg/org/openoffice/configuration/Decoder.java @@ -2,9 +2,9 @@ * * $RCSfile: Decoder.java,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dg $ $Date: 2001-07-05 11:51:31 $ + * last change: $Author: jb $ $Date: 2001-07-06 08:42:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -215,7 +215,7 @@ public class Decoder extends Object } // return null, if the string was invalid - public static String decode(String sSource) + public static String decodeValid(String sSource) { StringBuffer aTarget = new StringBuffer(); @@ -263,6 +263,14 @@ public class Decoder extends Object } } + // return the original value, if the string was invalid + public static String decode(String sSource) + { + String sResult = decodeValid(sSource); + + return sResult != null ? sResult : sSource; + } + public static void main(String args[]) { if (args.length != 1) |