Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7A8E9C49 for ; Thu, 13 Oct 2011 13:28:33 +0000 (UTC) Received: (qmail 66286 invoked by uid 500); 13 Oct 2011 13:28:33 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 66235 invoked by uid 500); 13 Oct 2011 13:28:33 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 66087 invoked by uid 99); 13 Oct 2011 13:28:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2011 13:28:33 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Oct 2011 13:28:32 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C6ABF306CE8 for ; Thu, 13 Oct 2011 13:28:11 +0000 (UTC) Date: Thu, 13 Oct 2011 13:28:11 +0000 (UTC) From: "Pinaki Poddar (Commented) (JIRA)" To: dev@openjpa.apache.org Message-ID: <624761442.8989.1318512491815.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <319365990.13234.1314271889098.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (OPENJPA-2044) Invalid header in MetaModel classes generated by AnnotationProcessor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126563#comment-13126563 ] Pinaki Poddar commented on OPENJPA-2044: ---------------------------------------- If you are fixing this, please put the fix of reading the content of an URL into openjpa-lib/...../Files.java > Invalid header in MetaModel classes generated by AnnotationProcessor > -------------------------------------------------------------------- > > Key: OPENJPA-2044 > URL: https://issues.apache.org/jira/browse/OPENJPA-2044 > Project: OpenJPA > Issue Type: Bug > Components: criteria > Affects Versions: 2.0.1, 2.1.1, 2.2.0 > Environment: Any > Reporter: Dale Lane > Assignee: Kevin Sutter > Priority: Trivial > Labels: openjpa > Fix For: 2.2.0 > > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6: > -Aopenjpa.header= : A url whose content will appear as comment header to the generated file(s). > This option does not work. > If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like: > sun.net.www. content.text.PlainTextInputStream@9ea09ea > in the header instead. > I suspect that the AnnotationProcessor is essentially doing: > URL headerurl = new URL(); > String newHeaderComment = headerurl.getContent().toString(); > The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent() > Then the toString() call just returns the string representation of the instance of the InputStream object. > I think the AnnotationProcessor should read from the stream instead? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira