felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r788736 - in /felix/trunk/karaf/gshell/gshell-core/src: main/java/org/apache/felix/karaf/gshell/core/config/ main/java/org/apache/geronimo/gshell/vfs/config/ test/java/org/apache/geronimo/gshell/commands/text/
Date Fri, 26 Jun 2009 15:19:28 GMT
Author: gnodet
Date: Fri Jun 26 15:19:28 2009
New Revision: 788736

URL: http://svn.apache.org/viewvc?rev=788736&view=rev
Log:
Update to latest blueprint api

Modified:
    felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/config/NamespaceHandler.java
    felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/vfs/config/CacheStrategyConverter.java
    felix/trunk/karaf/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/commands/text/SortTest.java

Modified: felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/config/NamespaceHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/config/NamespaceHandler.java?rev=788736&r1=788735&r2=788736&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/config/NamespaceHandler.java
(original)
+++ felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/felix/karaf/gshell/core/config/NamespaceHandler.java
Fri Jun 26 15:19:28 2009
@@ -189,7 +189,7 @@
 
     private MutableBeanMetadata parseAction(ParserContext context, ComponentMetadata enclosingComponent,
Element element) {
         MutableBeanMetadata action = context.createMetadata(MutableBeanMetadata.class);
-        action.setInitialization(MutableBeanMetadata.INITIALIZATION_LAZY);
+        action.setActivation(MutableBeanMetadata.ACTIVATION_LAZY);
         action.setScope(MutableBeanMetadata.SCOPE_PROTOTYPE);
         action.setClassName(element.getAttribute("class"));
         NodeList children = element.getChildNodes();

Modified: felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/vfs/config/CacheStrategyConverter.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/vfs/config/CacheStrategyConverter.java?rev=788736&r1=788735&r2=788736&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/vfs/config/CacheStrategyConverter.java
(original)
+++ felix/trunk/karaf/gshell/gshell-core/src/main/java/org/apache/geronimo/gshell/vfs/config/CacheStrategyConverter.java
Fri Jun 26 15:19:28 2009
@@ -19,15 +19,16 @@
 package org.apache.geronimo.gshell.vfs.config;
 
 import org.osgi.service.blueprint.container.Converter;
+import org.osgi.service.blueprint.container.ReifiedType;
 import org.apache.commons.vfs.CacheStrategy;
 
 public class CacheStrategyConverter implements Converter {
 
-    public boolean canConvert(Object o, Object type) {
-        return o instanceof String && type == CacheStrategy.class;
+    public boolean canConvert(Object o, ReifiedType type) {
+        return o instanceof String && type.getRawClass() == CacheStrategy.class;
     }
 
-    public Object convert(Object o, Object type) throws Exception {
+    public Object convert(Object o, ReifiedType type) throws Exception {
         if (canConvert(o, type)) {
             String text = o.toString();
             if (text.equalsIgnoreCase("MANUAL")) {

Modified: felix/trunk/karaf/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/commands/text/SortTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/commands/text/SortTest.java?rev=788736&r1=788735&r2=788736&view=diff
==============================================================================
--- felix/trunk/karaf/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/commands/text/SortTest.java
(original)
+++ felix/trunk/karaf/gshell/gshell-core/src/test/java/org/apache/geronimo/gshell/commands/text/SortTest.java
Fri Jun 26 15:19:28 2009
@@ -23,12 +23,19 @@
 import java.util.Collections;
 
 import junit.framework.TestCase;
+import org.apache.geronimo.gshell.ansi.AnsiRenderWriter;
 
 /**
  * TODO: remove this file when gshell is upgraded
  */
 public class SortTest extends TestCase {
 
+    public void testAnsi() {
+        AnsiRenderWriter w = new AnsiRenderWriter(System.out);
+        w.println("Hey, @|cyan Hello| world");
+        w.flush();
+    }
+
     public void testFieldIndexesDefaultSep() {
         SortAction.SortComparator comparator = new SortAction.SortComparator(false, false,
false, false, '\0', null);
         List<Integer> indexes = comparator.getFieldIndexes(" ad  re  t ");



Mime
View raw message