//# 0 errors, 44 messages
//#
/*
    //#LocaleString.java:1:1: class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#LocaleString.java:1:1: method: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  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.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/
package org.apache.roller.weblogger.webservices.adminprotocol.sdk;

import java.util.Locale;

class LocaleString {
    private Locale locale;
    
    public LocaleString(String localeString) {
    //#LocaleString.java:25: method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#input(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): "invalid locale string: "._tainted
    //#input(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): localeString
    //#input(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): localeString._tainted
    //#input(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): this
    //#output(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#1) num objects
    //#output(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#2) num objects
    //#output(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#3) num objects
    //#output(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): this.locale
    //#new obj(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#1)
    //#new obj(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#2)
    //#new obj(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#3)
    //#pre[1] (void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): localeString == null
    //#post(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): this.locale == null
    //#post(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#1) num objects == 0
    //#post(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#2) num objects == 0
    //#post(void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)): new Locale(LocaleString#3) num objects == 0
        if (localeString == null) {
    //#LocaleString.java:26: Warning: test always goes same way
    //#    test predetermined because localeString == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    from bb: Entry_BB_1
    //#    live edge: Entry_BB_1-->bb_2
    //#    tested vn: localeString == null
    //#    tested vn values: {1}
            locale = null;
            return;
        }
        
        String[] components = localeString.split("_");
    //#LocaleString.java:31: Warning: dead code
    //#    dead code here because localeString == null
    //#    severity: LOW
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_3
        
        if (components == null) {
            locale = null;
    //#LocaleString.java:34: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_4
            return;
        }
                
        if (components.length == 1) {
    //#LocaleString.java:38: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_5
            locale = new Locale(components[0]);
    //#LocaleString.java:39: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_6
        } else if (components.length == 2) {
    //#LocaleString.java:40: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_7
            locale = new Locale(components[0], components[1]);
    //#LocaleString.java:41: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_8
        } else if (components.length == 3) {
    //#LocaleString.java:42: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_9
            locale = new Locale(components[0], components[1], components[2]);
    //#LocaleString.java:43: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_10
        } else {
            throw new IllegalArgumentException("invalid locale string: " + localeString);
        }
    }
    //#LocaleString.java:47: Warning: dead code continues
    //#    dead code continues
    //#    severity: INFORMATIONAL
    //#    class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
    //#    method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    //#    dead bb: bb_12
    //#LocaleString.java:47: end of method: void org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString(String)
    
    public Locale getLocale() {
        return locale;
    //#LocaleString.java:50: method: Locale org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.getLocale()
    //#input(Locale getLocale()): this
    //#input(Locale getLocale()): this.locale
    //#output(Locale getLocale()): return_value
    //#pre[2] (Locale getLocale()): init'ed(this.locale)
    //#post(Locale getLocale()): return_value == this.locale
    //#post(Locale getLocale()): init'ed(return_value)
    //#LocaleString.java:50: end of method: Locale org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.getLocale()
    }
    
}
    //#output(org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init): __Descendant_Table[org/apache/roller/weblogger/webservices/adminprotocol/sdk/LocaleString]
    //#output(org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init): __Dispatch_Table.getLocale()Ljava/util/Locale;
    //#post(org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init): __Descendant_Table[org/apache/roller/weblogger/webservices/adminprotocol/sdk/LocaleString] == &__Dispatch_Table
    //#post(org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init): __Dispatch_Table.getLocale()Ljava/util/Locale; == &getLocale
    //#LocaleString.java:: end of method: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString.org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString__static_init
    //#LocaleString.java:: end of class: org.apache.roller.weblogger.webservices.adminprotocol.sdk.LocaleString
