Sophie

Sophie

distrib > Mageia > 6 > armv7hl > by-pkgid > c59e45e733fb8c80471f7845e7d35a13 > files > 3

derby-10.11.1.1-4.mga6.src.rpm

--- java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj.orig	2015-06-18 17:00:53.946356696 +0100
+++ java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj	2015-06-18 17:01:24.982950034 +0100
@@ -12,6 +12,7 @@
 	CACHE_TOKENS = true;
 	UNICODE_INPUT = true;
     JDK_VERSION = "1.5";
+    TOKEN_EXTENDS = "org.apache.derby.impl.sql.compile.TokenBase";
 }
 
 PARSER_BEGIN(SQLParser)
--- java/engine/org/apache/derby/impl/sql/compile/TokenBase.java.orig	2014-06-09 14:54:14.096762143 +0100
+++ java/engine/org/apache/derby/impl/sql/compile/TokenBase.java	2014-06-09 14:54:58.672044878 +0100
@@ -0,0 +1,35 @@
+/*
+
+Derby - Class org.apache.derby.impl.sql.compile.Token
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+
+package org.apache.derby.impl.sql.compile;
+
+/**
+ * Base class for the Token class generated by JavaCC.
+ */
+abstract class TokenBase {
+    /**
+     * beginOffset and endOffset are useful for siphoning substrings out of
+     * the Statement so that we can recompile the substrings at upgrade time.
+     * For instance, VIEW definitions and the Restrictions on Published Tables
+     * need to be recompiled at upgrade time.
+     */
+    int beginOffset, endOffset;
+}
--- java/engine/org/apache/derby/impl/sql/build.xml.orig	2014-06-09 14:54:14.096762143 +0100
+++ java/engine/org/apache/derby/impl/sql/build.xml	2014-06-09 14:54:58.672044878 +0100
@@ -57,11 +57,10 @@
       Token.java
       TokenMgrError.java
 
-      3 of those files are checked into the codeline:
+      2 of those files are checked into the codeline:
 
       CharStream.java
       ParseException.java
-      Token.java
 
       We don't want generated code to clash with the checked-in versions. So
       we delete the conflicting classes here.
@@ -70,7 +69,6 @@
       <fileset dir="${generated.src.dir}/${derby.dir}/impl/sql/compile">
         <include name="CharStream.java"/>
         <include name="ParseException.java"/>
-        <include name="Token.java"/>
       </fileset>
     </delete>