directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1067702 - in /directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1: actions/ ber/grammar/
Date Sun, 06 Feb 2011 16:58:29 GMT
Author: akarasulu
Date: Sun Feb  6 16:58:29 2011
New Revision: 1067702

URL: http://svn.apache.org/viewvc?rev=1067702&view=rev
Log:
cleaning up some warnings in IDE around generics

Modified:
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadBitString.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadInteger.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadOctetString.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/CheckNotNullLength.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
    directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadBitString.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadBitString.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadBitString.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadBitString.java
Sun Feb  6 16:58:29 2011
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractReadBitString extends GrammarAction
+public abstract class AbstractReadBitString extends GrammarAction<Asn1Container>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractReadBitString.class
);

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadInteger.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadInteger.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadInteger.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadInteger.java
Sun Feb  6 16:58:29 2011
@@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractReadInteger extends GrammarAction
+public abstract class AbstractReadInteger extends GrammarAction<Asn1Container>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractReadInteger.class
);

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadOctetString.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadOctetString.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadOctetString.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/AbstractReadOctetString.java
Sun Feb  6 16:58:29 2011
@@ -35,7 +35,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public abstract class AbstractReadOctetString extends GrammarAction
+public abstract class AbstractReadOctetString extends GrammarAction<Asn1Container>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( AbstractReadOctetString.class
);

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/CheckNotNullLength.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/CheckNotNullLength.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/CheckNotNullLength.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/actions/CheckNotNullLength.java
Sun Feb  6 16:58:29 2011
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class CheckNotNullLength extends GrammarAction
+public class CheckNotNullLength extends GrammarAction<Asn1Container>
 {
     /** The logger */
     private static final Logger LOG = LoggerFactory.getLogger( CheckNotNullLength.class );

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/AbstractGrammar.java
Sun Feb  6 16:58:29 2011
@@ -47,7 +47,7 @@ public abstract class AbstractGrammar im
      * indice the states, the second dimension indices the Tag value, so it is
      * 256 wide.
      */
-    protected GrammarTransition[][] transitions;
+    protected GrammarTransition<Asn1Container>[][] transitions;
 
     /** The grammar name */
     private String name;
@@ -87,7 +87,7 @@ public abstract class AbstractGrammar im
      * @param tag The current tag
      * @return A valid transition if any, or null.
      */
-    public GrammarTransition getTransition( Enum<?> state, int tag )
+    public GrammarTransition<Asn1Container> getTransition( Enum<?> state, int
tag )
     {
         return transitions[state.ordinal()][tag & 0x00FF];
     }
@@ -113,7 +113,7 @@ public abstract class AbstractGrammar im
         byte tagByte = container.getCurrentTLV().getTag();
 
         // We will loop until no more actions are to be executed
-        GrammarTransition transition = ( ( AbstractGrammar ) container.getGrammar() ).getTransition(
currentState,
+        GrammarTransition<Asn1Container> transition = ( ( AbstractGrammar ) container.getGrammar()
).getTransition( currentState,
             tagByte );
 
         if ( transition == null )
@@ -134,7 +134,7 @@ public abstract class AbstractGrammar im
 
         if ( transition.hasAction() )
         {
-            Action action = transition.getAction();
+            Action<Asn1Container> action = transition.getAction();
             action.action( container );
         }
 

Modified: directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java?rev=1067702&r1=1067701&r2=1067702&view=diff
==============================================================================
--- directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java
(original)
+++ directory/shared/branches/m1/asn1-ber/src/main/java/org/apache/directory/shared/asn1/ber/grammar/GrammarTransition.java
Sun Feb  6 16:58:29 2011
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.asn1.ber.grammar;
 
 
+import org.apache.directory.shared.asn1.ber.Asn1Container;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 
 
@@ -29,10 +30,10 @@ import org.apache.directory.shared.asn1.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class GrammarTransition
+public class GrammarTransition<E extends Asn1Container>
 {
     /** The action associated to the transition */
-    private Action action;
+    private Action<E> action;
 
     /** The previous state */
     private Enum<?> previousState;
@@ -52,7 +53,7 @@ public class GrammarTransition
      * @param currentTag the current TLV's tag
      * @param action The action to execute. It could be null.
      */
-    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, int
currentTag, Action action )
+    public GrammarTransition( Enum<?> previousState, Enum<?> currentState, int
currentTag, Action<E> action )
     {
         this.previousState = previousState;
         this.currentState = currentState;
@@ -75,7 +76,7 @@ public class GrammarTransition
     /**
      * @return Returns the action associated with the transition
      */
-    public Action getAction()
+    public Action<E> getAction()
     {
         return action;
     }



Mime
View raw message