Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62452 Details for
Bug 180109
[compiler] JDT Throws ClassCastException on incremental build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
The file in which the exception is reported by JDT.
SortedSetQueue.java (text/java), 5.89 KB, created by
Greg Gibeling
on 2007-03-29 21:55:37 EDT
(
hide
)
Description:
The file in which the exception is reported by JDT.
Filename:
MIME Type:
Creator:
Greg Gibeling
Created:
2007-03-29 21:55:37 EDT
Size:
5.89 KB
patch
obsolete
>/* > * File: $RCSfile: SortedSetQueue.java,v $ > * Version: $Revision: 1.1 $ > * Author: Greg Gibeling > * Copyright: Copyright 2005-2007 UC Berkeley > * > * $Log: SortedSetQueue.java,v $ > * Revision 1.1 2007/03/10 02:03:28 sshd_server > * Implemented > * > * > */ > >/* > * Copyright (c) 2005-2007, Regents of the University of California > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without modification, > * are permitted provided that the following conditions are met: > * > * - Redistributions of source code must retain the above copyright notice, > * this list of conditions and the following disclaimer. > * - Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer > * in the documentation and/or other materials provided with the > * distribution. > * - Neither the name of the University of California, Berkeley nor the > * names of its contributors may be used to endorse or promote > * products derived from this software without specific prior > * written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND > * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED > * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE > * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR > * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES > * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; > * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON > * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS > * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ >package rcf.core.util.queue; > >import rcf.core.concurrent.events.EventSink; >import rcf.core.framework.source.Revision; >import rcf.core.util.collection.CollectionAttributes; >import rcf.core.util.collection.ImmutableCollection; >import rcf.core.util.collection.set.SingletonSet; >import rcf.core.util.collection.sortedset.SkipListSortedSet; >import rcf.core.util.collection.sortedset.SortedSet; >import rcf.core.util.collection.transaction.CollectionTransaction; >import rcf.core.util.queue.eventexception.QueueEmptyException; >import rcf.core.util.reference.WeakReference; > >/** > * TODO: Javadoc > * <p> > * TODO: Unit tests, Code review, Javadoc review, Seal/Finalize > * TODO: equals, hashCode, toString > * > * @author <a href="mailto:gdgib@berkeley.edu">Greg Gibeling</a> > * @version $Revision: 1.1 $ > */ >@Revision(value = "$Revision: 1.1 $", date = "$Date: 2007/03/10 02:03:28 $", tag = "$Name: $") >public class SortedSetQueue<T> extends SkipListSortedSet<T> implements SortedSet<T>, Queue<T> { > /** TODO: Javadoc */ > private QueueHelpers.CollectionTransactionProxy<T> collectionTransactionProxy; > > /** TODO: Javadoc */ > protected final QueueCost<T> queueCost; > > /** > * TODO: Javadoc > * > * @param _attributes > * @param _queueCost > */ > public SortedSetQueue(CollectionAttributes<T> _attributes, QueueCost<T> _queueCost) { > super(_attributes); > queueCost = _queueCost; > if (queueCost != null) queueCost.initialize(this); > } > > /** > * TODO: Javadoc > * > * @param _attributes > * @param _queueCost > * @param _c > */ > public SortedSetQueue(CollectionAttributes<T> _attributes, QueueCost<T> _queueCost, ImmutableCollection<T> _c) { > super(_attributes, _c); > queueCost = _queueCost; > if (queueCost != null) queueCost.initialize(this); > } > > /* @see rcf.core.util.collection.AbstractCollection#createdSyndicate() */ > @SuppressWarnings("unchecked") > protected void createdSyndicate() { > super.createdSyndicate(); > > collectionTransactionProxy = new QueueHelpers.CollectionTransactionProxy<T>(this); > syndicate().add(new WeakReference<EventSink<CollectionTransaction<T>>>(collectionTransactionProxy), (Class)CollectionTransaction.class); > } > > /* @see rcf.core.util.queue.ReadQueue#dequeue() */ > public T dequeue() { > if (isEmpty() || ((queueCost != null) && !queueCost.checkDequeue(first()))) return null; > SkiplistNode<T> curr = head.next[0]; > removeSkipList(head.next[0]); > return curr.get(); > } > > /* @see rcf.core.util.queue.ReadQueue#dequeuePeek() */ > public T dequeuePeek() { > return first(); > } > > /* @see rcf.core.util.collection.AbstractCollection#destroyedSyndicate() */ > protected void destroyedSyndicate() { > collectionTransactionProxy = null; > } > > /* @see rcf.core.util.queue.WriteQueue#enqueue(T) */ > public boolean enqueue(T o) { > if ((queueCost != null) && !queueCost.checkEnqueue(o)) return false; > add(o); > return true; > } > > /* @see rcf.core.util.queue.WriteQueue#enqueueAll(ImmutableCollection, boolean) */ > public boolean enqueueAll(ImmutableCollection<T> c, boolean reversed) { > if ((queueCost != null) && !queueCost.checkEnqueue(c)) return false; > addAll(c, reversed); > return true; > } > > /* @see rcf.core.concurrent.events.EventSource#events() */ > @SuppressWarnings("unchecked") > public ImmutableCollection<Class<?>> events() { > return isImmutable() ? (ImmutableCollection)SingletonSet.getEmpty() : QueueHelpers.queueCollectionEventTypes(); > } > > /* @see rcf.core.util.queue.WriteQueue#isFull() */ > public boolean isFull() { > return false; > } > > /* @see rcf.core.util.queue.Queue#queueCost() */ > public QueueCost<T> queueCost() { > return queueCost; > } > > /* @see rcf.core.util.queue.ReadQueue#remove() */ > public T remove() { > if (isEmpty()) throw new QueueEmptyException(); > SkiplistNode<T> curr = head.next[0]; > removeSkipList(head.next[0]); > return curr.get(); > } > > /* @see rcf.core.util.queue.ReadQueue#element() */ > public T removePeek() { > if (isEmpty()) throw new QueueEmptyException(); > return dequeuePeek(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 180109
: 62452 |
63416