freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [06/54] [partial] incubator-freemarker git commit: Top level package name change to org.apache.freemarker, and some of of the internal package structure changes. Other smaller cleanup. To be continued...
Date Thu, 16 Feb 2017 23:08:31 GMT
http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ecb4e230/src/main/java/freemarker/template/utility/UnsupportedNumberClassException.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/utility/UnsupportedNumberClassException.java
b/src/main/java/freemarker/template/utility/UnsupportedNumberClassException.java
deleted file mode 100644
index 891f824..0000000
--- a/src/main/java/freemarker/template/utility/UnsupportedNumberClassException.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * 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 freemarker.template.utility;
-
-/**
- * Thrown when FreeMarker runs into a {@link Number} subclass that it doesn't yet support.
 
- */
-public class UnsupportedNumberClassException extends RuntimeException {
-
-    private final Class fClass;
-    
-    public UnsupportedNumberClassException(Class pClass) {
-        super("Unsupported number class: " + pClass.getName());
-        fClass = pClass;
-    }
-    
-    public Class getUnsupportedClass() {
-        return fClass;
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ecb4e230/src/main/java/freemarker/template/utility/WriteProtectable.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/utility/WriteProtectable.java b/src/main/java/freemarker/template/utility/WriteProtectable.java
deleted file mode 100644
index cb38351..0000000
--- a/src/main/java/freemarker/template/utility/WriteProtectable.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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 freemarker.template.utility;
-
-/**
- * Implemented by objects that can be made <em>permanently</em> read-only. This
usually meant to freeze the
- * configuration JavaBean properties, so that the object can be safely shared among independently
developed components.
- * 
- * @since 2.3.21
- */
-public interface WriteProtectable {
-
-    /**
-     * Makes this object permanently read-only.
-     */
-    void writeProtect();
-    
-    boolean isWriteProtected();
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ecb4e230/src/main/java/freemarker/template/utility/XmlEscape.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/utility/XmlEscape.java b/src/main/java/freemarker/template/utility/XmlEscape.java
deleted file mode 100644
index 11c300f..0000000
--- a/src/main/java/freemarker/template/utility/XmlEscape.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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 freemarker.template.utility;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.Map;
-
-import freemarker.template.TemplateTransformModel;
-
-/**
- * Performs an XML escaping of a given template fragment. Specifically,
- * <tt>&lt;</tt> <tt>&gt;</tt> <tt>&quot;</tt>
<tt>'</tt> and <tt>&amp;</tt> are all turned into entity references.
- *
- * <p>An instance of this transform is initially visible as shared
- * variable called <tt>xml_escape</tt>.</p>
- */
-public class XmlEscape implements TemplateTransformModel {
-
-    private static final char[] LT = "&lt;".toCharArray();
-    private static final char[] GT = "&gt;".toCharArray();
-    private static final char[] AMP = "&amp;".toCharArray();
-    private static final char[] QUOT = "&quot;".toCharArray();
-    private static final char[] APOS = "&apos;".toCharArray();
-
-    public Writer getWriter(final Writer out, Map args) {
-        return new Writer()
-        {
-            @Override
-            public void write(int c)
-            throws IOException {
-                switch(c)
-                {
-                    case '<': out.write(LT, 0, 4); break;
-                    case '>': out.write(GT, 0, 4); break;
-                    case '&': out.write(AMP, 0, 5); break;
-                    case '"': out.write(QUOT, 0, 6); break;
-                    case '\'': out.write(APOS, 0, 6); break;
-                    default: out.write(c);
-                }
-            }
-
-            @Override
-            public void write(char cbuf[], int off, int len)
-            throws IOException {
-                int lastoff = off;
-                int lastpos = off + len;
-                for (int i = off; i < lastpos; i++) {
-                    switch (cbuf[i])
-                    {
-                        case '<': out.write(cbuf, lastoff, i - lastoff); out.write(LT,
0, 4); lastoff = i + 1; break;
-                        case '>': out.write(cbuf, lastoff, i - lastoff); out.write(GT,
0, 4); lastoff = i + 1; break;
-                        case '&': out.write(cbuf, lastoff, i - lastoff); out.write(AMP,
0, 5); lastoff = i + 1; break;
-                        case '"': out.write(cbuf, lastoff, i - lastoff); out.write(QUOT,
0, 6); lastoff = i + 1; break;
-                        case '\'': out.write(cbuf, lastoff, i - lastoff); out.write(APOS,
0, 6); lastoff = i + 1; break;
-                    }
-                }
-                int remaining = lastpos - lastoff;
-                if (remaining > 0) {
-                    out.write(cbuf, lastoff, remaining);
-                }
-            }
-            @Override
-            public void flush() throws IOException {
-                out.flush();
-            }
-
-            @Override
-            public void close() {
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/ecb4e230/src/main/java/freemarker/template/utility/package.html
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/utility/package.html b/src/main/java/freemarker/template/utility/package.html
deleted file mode 100644
index 03f8132..0000000
--- a/src/main/java/freemarker/template/utility/package.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  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.
--->
-<html>
-<head>
-</head>
-<body bgcolor="white">
-<p>Various classes used by core FreeMarker code but might be useful outside of it too.</p>
-</body>
-</html>
\ No newline at end of file


Mime
View raw message