Agreed. For major changes to core features, RTC may be preferable, but
for small fixes or new features, CTR is fine.
On Aug 21, 2009, at 11:07 AM, Niclas Hedhman wrote:
Most projects at ASF uses "Commit-Then-Review" (CTR), and even
projects with
strict "Review-Then-Commit" (RTC) normally employ CTR for non-core
parts,
such as demos, tests, docs, extensions et cetera.
CTR typically allows for great efficiency, and although it can feel
intimidating at first to commit directly at first, it is really No
Big Deal.
Everyone makes mistakes, and that is Ok, so I urge you all to boost
your
self confidence and just go ahead. Each commit will be received as a
mail on
pivot-comm...@i.a.o mailing list and we are all expected to review
those
commits, at least to some degree to ensure noone introduce malicious
code
(very unlikely, but still). So, if you go down the wrong path,
others will
ask questions and perhaps correct mistakes...
Another common recited mantra at ASF; Don't ask for permission,
instead ask
for forgiveness if needed. Some also call it Just Forking Do It.
-- Niclas
On Aug 21, 2009 10:46 PM, "Sandro Martini"
<sandro.mart...@gmail.com> wrote:
Hi,
this is the patch for the inner classes (trivial):
Index: test/org/apache/pivot/collections/test/MapListTest.java
===================================================================
--- test/org/apache/pivot/collections/test/MapListTest.java
(revision
806566)
+++ test/org/apache/pivot/collections/test/MapListTest.java
(working
copy)
@@ -143,7 +143,7 @@
assertEquals(0, mapList.getLength());
}
- private class TestMapListListener implements
MapListListener<String, Integer> {
+ private static class TestMapListListener implements
MapListListener<String, Integer> {
private MapList<String, Integer> mapList;
private Map<String, Integer> previousSource;
private int calls;
@@ -157,7 +157,7 @@
}
}
- private class TestComparator implements Comparator<Pair<String,
Integer>> {
+ private static class TestComparator implements
Comparator<Pair<String, Integer>> {
@Override
public int compare(Pair<String, Integer> o1, Pair<String,
Integer> o2) {
return o1.key.compareTo(o2.key);
And this is that for the random:
Index: src/org/apache/pivot/wtk/ApplicationContext.java
===================================================================
--- src/org/apache/pivot/wtk/ApplicationContext.java (revision
806566)
+++ src/org/apache/pivot/wtk/ApplicationContext.java (working copy)
@@ -48,6 +48,7 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Iterator;
+import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
@@ -89,7 +90,10 @@
private boolean paintPending = false;
private boolean debugRepaint = false;
+
+ private Random random = null;
+
private transient DropTargetListener dropTargetListener = new
DropTargetListener() {
public void dragEnter(DropTargetDragEvent event) {
if (dragDescendant != null) {
@@ -267,6 +271,9 @@
try {
debugRepaint =
Boolean
.parseBoolean
(System.getProperty("org.apache.pivot.wtk.debugRepaint"));
+ if (debugRepaint == true)
+ random = new Random();
+
} catch (SecurityException ex) {
// No-op
}
@@ -378,8 +385,8 @@
}
if (debugRepaint) {
- graphics.setColor(new
java.awt.Color((int)(Math.random() * 256),
- (int)(Math.random() * 256),
(int)(Math.random() * 256), 75));
+ graphics.setColor(new
java.awt.Color(random.nextInt(256),
+ random.nextInt(256),
random.nextInt(256), 75));
graphics.fillRect(0, 0, getWidth(),
getHeight());
}
} catch (RuntimeException exception) {
If Ok i can commit, tell me.
Bye