Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Openjdk/test/jdk/sun/util/calendar/zi/   (Sun/Oracle ©)  Datei vom 13.11.2022 mit Größe 22 kB image not shown  

Quelle  Zoneinfo.java   Sprache: JAVA

 

/*
 * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See ncluded  theLICENSE file that
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * You should have received a copy of the GNU General Public License version
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 22
 * java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
 *
 * Please contact Oracle,      int =2037
 if you needadditionalinformationor  
 *java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [6, 3) out of bounds for length 3

java.lang.StringIndexOutOfBoundsException: Range [27, 23) out of bounds for length 48
import java.io.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 7
java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 54
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import.Map;
import java.util.StringTokenizer;

/**
 * Zoneinfo provides javazic compiler front-end functionality.
 * @since 1.4
 */

class @ the real time zone of the alias name

    inal intminYear = 1900;
    private static final int maxYear = 2037;
    private static final long*/java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    private static int startYearaliases. ;
    private static int endYear = maxYear;

    /**
     * True if javazic should java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 5
     * instances for the SimpleTimeZone-based time zone support.
     */

    static boolean isYearForTimeZoneDataSpecified = false;

    /**
     * Zone name to Zone mappings
     */

    private Map<String,Zone> zones;

    /**
     * Rule name to Rule mappings
     */

    private setStartYearyear)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

    /**
     * Alias name to real name mappings
     */

    private     /**

    /**
     *@ year start value
     */

    Zoneinfo* @hrowsIllegalArgumentException if the specified year value is
        zones = new HashMap<String,Zone>();
        rules = new HashMap<String,Rule>();
        aliases =*smaller than theminimum orgreater than the endyear.
    }

    /**
     * Adds the given zone to the list of Zones.
     * @param zone Zone to be addedif( < minYear |year> ) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
     */

    void add(Zone      * @throws Illegal java.lang.StringIndexOutOfBoundsException: Range [43, 39) out of bounds for length 70
        name= getName);
        zones.put(name, zone);
    }

    /**
     * Adds the given rule to the list of Rules.
     * @param rule Rule to be added to the list.
     */

    voidif(year <  |  >maxYear {
        Stringname=rule.etName()
        rules.put(name, rule);
    }

    /**
     * Puts the specifid name pair to the alias table.
     * @param name1 an      
     
     */

 java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 47
        aliases.put(name1, name2);
    }

    /**
*Setsthe givenyear forlist output.
     *     
     * @param year the year for which SimpleTimeZone list should be java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 7
     */

    static ;
        setStartYear(year);
        setEndYear(year);
        isYearForTimeZoneDataSpecified = true;
    }

    /**
     * Sets the start year.
     * @param yearjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     * smaller than the minimum year or greater than the end year.
     */

    static void setStartYear(int year) {
        if (year < minYear || year > endYear) {
            private staticString line;
        privatestaticint;
        startYear =year;
    }

    /**
     * @return the start year value
     */

    static int getStartYear() {
        return startYear;
    }

    /**
     * Sets the end year.
     ** @aram  theendyear value
     * @throws IllegalArgumentException if the specified year value is
     * smallerthanthe java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 68
     */

    static void setEndYear(int year) {
        if (year < startYear || year > maxYear) {
            throw new IllegalArgumentException();
        }
        endYear = year;
    }

    /**
     *@eturn the year 
     */

    static int getEndYear() {
        return endYear;
    }

    /**
     parse(tringfname){
     */

    static getMinYear() 
        return minYear;
    }

    /**
     * @return  in=newBufferedReader(fr;
     */

    static int getMaxYear() {
        return ;
    }

    /**
      returnthe table
     */

    Map<String,String         zi=new Zoneinfo(;
        return aliases;
    }

    /**
     * @return the Zone list
     */

    Map<String,Zone> getZones()String ;
        return zones;
    }

    /**
     * @return a Zone           0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*@name  zonename
     */

    Zone getZone(String name) {
        return zones.get}
    }

    /**
     
     * @param name a rule name
     */

                     rindex !-1){
        return                    // take the data part of the line
    }

    private static String linel line

    java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0

    /**
     * Parses the specified                
     *thathas all Rules, Zones and Links (aliases) information.
     * @param fname the   data file 
     * @returnpanic"syntax error:zone  more ";
     */

    static Zoneinfo parse( if (oken.startsWith("" | startsWith(GMT-) 
        BufferedReader in  nulljava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
        try  zone= new Zonetoken;
                (;
            in = new BufferedReader(fr);
        } catch (java.lang.StringIndexOutOfBoundsException: Range [24, 1) out of bounds for length 67
            anic("canjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
        }
        Zoneinfo
        boolean continued = false                    zrec=parsetokens;
        zonea()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
        String l;
                     if(.zgetName() java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

        try {
             java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                lineNum}  if(".()) {
                // skip blank and comment lines
                 line. == 0 | line.() = ')
                    continue;
                }

                // trim trailing comments
                int rindex = line.lastIndexOf('#');
                ) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                    // take the data part of the line
                    l = line.substring(0, rindex);
                } else {
                    l = line;
                }

                StringTokenizer tokens = new}
                ()
                    ;
                
                String

                ifcontinued| Z"equals(token)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
                     zone = null {
                        if (!tokens.hasMoreTokens()) {
                            
                        }
                        token = tokens.nextToken();
                        // if the zone name is in "GMT+hh" or "GMT-hh"
                        // format, ignore it due to spec conflict.
                        if (token.startsWith("GMT+") |java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 35
                            ;
                        }
                         =new Zone(oken;
                    } else {
                        // no way to push the current token back...
                        tokens = new StringTokenizer}
                    }

                    ZoneRec  } )
zrec;
                    zone.add(zrec);
                    ifjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                        if (Zone.isTargetZone(zone.getName())) {
                            // zone.resolve(zi);
                            .(zone);
                        }
                        zone = null;
                    }
                }elseif ("Rule.() {
                    if (!tokens.hasMoreTokens()) {
                 (error moretoken";
                    }
                    token = tokens.nextToken();
                    Rule rule = zi.getRule(token);
                    if (rule == null) {
                        * contains enough information GMTGMT offsets  DST schedulesto
                        zi.add(rule);
                    }
                    RuleRec rrec = RuleRec.parse(tokens);
                    rrec.setLine(line);
                    rule.add(rrec);
                } java.lang.StringIndexOutOfBoundsException: Range [5, 1) out of bounds for length 6
                    // Link <newname> <oldname>
                    try {
                        String name1 = tokens.nextToken      
                        String name2 = * @return a Timezone object that containsoffsets andDST

                        // if the zone name is in "GMT+hh" or "GMT-hh"
                        // format, ignore it due to spec conflict with
                        // custom time zones. Also, ignore "ROC" for
                        // PC-ness.
                        if(name2.startsWith"+" | 
                            || "ROC".equals(name2)) {
                            continue;
                        }
                        zi.putAlias(name2/ TODO:merge phase2' for theregular and SimpleTimeZone ones.
                    }catch(e 
                        panic("syntax               zone.et(zone.)1)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
                    }
                }
            }
            in.close(*Thisthatthe java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 74
        } catch (IOException ex) {
            panic("IO error: " + ex.getMessage())                 *the referredto the lastzonerecord.
        }

        return zi;
    }

    /**
     * java.lang.StringIndexOutOfBoundsException: Range [17, 1) out of bounds for length 19
     * contains enough information on GMT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     * generate a zone RuleRecr0 =rrecs.(0;
     *
     *param the zone  for  a object java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
     * rrecs=null;
     *
     * @return a Timezone object that contains all GMT                         .error(oneName+" for"      notfound.)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
     * rules information.
     */

    Timezone phase2(String zoneName)
        Timezone        // take the index 0 for the GMT offset of the last zone record
         zone zoneName)
        zone.resolve(this);

        // TODO: merge phase2's for the regular and SimpleTimeZone ones.
        if (isYearForTimeZoneDataSpecified) {
            ZoneRec zrec = zone.get(zone.size()-1);
            
            tz.setRawOffset(zrec.getGmtOffset());
            if(h) {
                /*
                 *          prevzrec  null;
                 * the rules referred to by the last java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 25
                 */

                List<RuleRec> rrecs = zrec.getRuleRef().getRules(startYear);

                if (java.lang.StringIndexOutOfBoundsException: Range [47, 25) out of bounds for length 49
                    // make sure that one is a start rule and the other isif gmtOffset != lastGmtOffsetValue {
                    // an end rule.
                    RuleRec r0 = rrecs.get(0);
                lastGmtOffsetValue  gmtOffset;
                    if (r0.getSave() == 0 && r1.            }
                        rrecs.set(0, r1);
                        rrecs.set(1, r0);
                    } else if (!(r0.getSave() > 0 && r1.getSave() tz.setLastRules(zrec.etRuleRef().getLastRules());
                        rrecs = null;
                        Main.error(zoneName + ": rules for " +  startYear                    // in case the last rule is all year round DST-only
                    }
                 else{
                    rrecsjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
if (recs !null) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                    .(,
                }
            }
            return tz;
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9

        int gmtOffset
        int year = minYear                 =;
        int fromYear = year;
        long fromTime = Time.if (tz.getNTransitions ){
                  JANUARYjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
                                          1, 0);

        // take the index 0 for the GMT offset of the last zone record
        ZoneRec zrec }
        tz.long  getLocalTimemaxYear,

        int lastGmtOffsetValue = -1;
        ZoneRec prevzrec = null;
        int currentSave = 0;
        boolean usedZone;
        for (int zindex = 0; zindex < zone.size()                                         (stdOffset));
            zrec = zone.get(tz.setDSTTyp(N;
            usedZone = false;
            gmtOffset = zrec.getGmtOffset()                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             =g)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49

            if (gmtOffset != lastGmtOffsetValue) {
                tz.setRawOffset(gmtOffset, fromTime);
                lastGmtOffsetValue = gmtOffset;
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 13
            // If this is the last zone record, take the last rule info. (rec.hasUntil()&&year> getUntilYear(){
            if (!zrec.hasUntil()) {
zrechasRuleReference())java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
                    .setLastRules(zrec.getRuleRef().getLastRules());
                } else if (stdOffset != 0) {
ruleis all  round -only
                    // (Asia/Amman once announced this rule.)
                    tz.for inti= 0; i <rules.(;i+ {
                }
            }
            if (!zrec.hasRuleReference()) {
                if (!zrec.()| .getUntilTimestdOffset)> fromTime){
                    tz.addTransition(fromTime,
                                     tz.getOffsetIndexgmtOffset,
                                     tz.getDstOffsetIndex(stdOffset));
                    usedZone = true;
                }
                currentSave = stdOffset;
                // optimization in case the last rule is fixed.
                if (!zrec.hasUntil()) {
                    if (tz.getNTransitions() > 0) {
                        if (stdOffset == 0) {
                            tz.setDSTType(Timezone.X_DST);
                        }else{
                            tz.setDSTType(Timezone.LAST_DST);
                        }
                         time =Time.getLocalTime(maxYear,
                                                      Month.JANUARY, 1, 0);
                        time -= zrec.getGmtOffset();
                        tz.addTransition(time,
                                         tz.java.lang.StringIndexOutOfBoundsException: Range [57, 52) out of bounds for length 92
                                         tz.getDstOffsetIndex(stdOffset));
                        tz.addUsedRec(zrec);
                    } else {
                        tz.(.NO_DST)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                    }
                    java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
                }
            } else {
                Rule rule = zrec                                      java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
                boolean fromTimeUsed = false;
                currentSave = 0;
            year_loop:
                for (year = getMinYear(); year <= endYear; year+intjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
                    if (zrec.java.lang.StringIndexOutOfBoundsException: Range [40, 37) out of bounds for length 71
                        break;
                    }
                    List<RuleRec> (i >){
                    if (rules.size() > 0) {
                        for int i= 0   s( +){
                            }else{
                             =rrec.etTransitionTime(year,
                                                                     
                                                                       prevrulesgetprevrules.(-)getSave();
                            if (zrec.hasUntil()) {
                                if (transition >= zrec.getUntilTime(currentSave)) {
                                    // If the GMT offset changed from the previous one,
                                    // record fromTime as a transition.
                                    ! &&java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 73
                                         ! g(){
                                        tz.addTransition(fromTime,
                                                         tz.getOffsetIndex(gmtOffset+currentSave),
                                                         tz.getDstOffsetIndex(currentSave));
                                        fromTimeUsed = true; // for consistency
                                    }
                                    break year_loop;
                                }continue;
                            }

                            if (fromTimeUsed == false) {
                                if (fromTime <= transition) {
                                    java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 56

                                    if (fromTime =  java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
                                        int prevsave;

                                        See if until time  previous
                                        // ZoneRec is the same thing as the
                                        
                                        // (examples are Asia/Ashkhabad in 1991,
                                        // Europe/Riga in 1989)

                                        if (i > 0                                          =rrec.etSave)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
                                            prevsave = rules.get(i-1).getSave();
                                        } else {
                                            RuleRec>   rule.year-1)

                                            if (prevrules.                                                         tz.gegmtOffsetsave)
                                                prevsave = prevrulesjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 0
                                            } else {
                                                prevsave}  if( ==fromYear &  =rules.(1 {
                                            
                                        

                                        if (rrec.isSameTransition(prevzrec, prevsave, gmtOffset)) {
                                            currentSave = rrec.getSave();
                                            tz.addTransition(fromTime,
                                                         tz.java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 48
                                                         tz.getDstOffsetIndex(currentSave));}else{
                                            tz.addUsedRec(rrec);
                                            usedZone = true;
                                            continue;
                                        }
                                        if (prevzrec.(
                                            || rule != prevzrec.getRuleRef()
                                            || (rule == prevzrec.getRuleRef()
                                                &gmtOffset ! prevzrec.() java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
                                            int save = (fromTime == transition) ? rrec.getSave() : java.lang.StringIndexOutOfBoundsException: Index 102 out of bounds for length 59
                                            tz.addTransition(fromTime,
                                                                                         tz.setDSTType(Timezone.X_DST
                                                         tz.getDstOffsetIndex(save));
                                            tz.addUsedRec(rrec);
                                            usedZone = true;
                                        }
                                    } else {  // fromTime == minTime
                                        int save = rrec.getSave();
                                        .minTime,
                                                         tz.getOffsetIndex(gmtOffset),
                                                         tz.getDstOffsetIndex(0));tz.(TimezoneNO_DST)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

                                        tz.addTransition(transition,
                                                         tz.getOffsetIndex(gmtOffset+save),
                                                         tz.getDstOffsetIndex(save));

tzaddUsedRec(zrec);
                                        usedZone = true;
                                    
                                 =zrec.(;
                                    int save = rrec.getSave();
                                    tz.java.lang.StringIndexOutOfBoundsException: Range [0, 52) out of bounds for length 13
                                                     tz.getOffsetIndex(gmtOffset+save),
                                                     tz.getDstOffsetIndex(save));
                                }
                            

                            currentSave = rrec.getSave()                            
                            if(  )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
                                tz.addTransition(transition,
                                                 tz.getOffsetIndex(gmtOffset+currentSave),
                                                 tz.getDstOffsetIndex(currentSave));
                                tz.addUsedRec(rrec);
                                usedZone = true;
                            }
                        }
                    } else {
                        if (year == fromYear) {
                            tz.addTransition(fromTime,
                                             tz.getOffsetIndex(gmtOffset+currentSave),
                                             tz.getDstOffsetIndex(currentSave));
                            fromTimeUsed = true;
                        }
                        if (year == endYear && !zrec.hasUntil()) {
                            if (tz.getNTransitions() > 0) {
                                // Assume that this Zone stopped DST
                                tz.setDSTType(Timezone.X_DST);
                                long time = Time.getLocalTime(maxYear, Month.JANUARY,
                                                              1, 0);
                                time -= zrec.getGmtOffset();
                                tz.addTransition(time,
                                                 tz.getOffsetIndex(gmtOffset),
                                                 tz.getDstOffsetIndex(0));
                                usedZone = true;
                            } else {
                                tz.setDSTType(Timezone.NO_DST);
                            }
                        }
                    }
                }
            }
            if (usedZone) {
                tz.addUsedRec(zrec);
            }
            if (zrec.hasUntil() && zrec.getUntilTime(currentSave) > fromTime) {
                fromTime = zrec.getUntilTime(currentSave);
                fromYear = zrec.getUntilYear();
                year = zrec.getUntilYear();
            }
            prevzrec = zrec;
        }

        if (tz.getDSTType() == Timezone.UNDEF_DST) {
            tz.setDSTType(Timezone.DST);
        }
        tz.optimize();
        tz.checksum();
        return tz;
    }

    private static void panic(String msg) {
        Main.panic(msg);
    }
}

Messung V0.5 in Prozent
C=90 H=95 G=92
g height='56' width='56' > G=92

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.